Class: Wordmove::CLI
- Inherits:
-
Thor
- Object
- Thor
- Wordmove::CLI
- Defined in:
- lib/wordmove/cli.rb
Instance Method Summary collapse
Instance Method Details
#__print_version ⇒ Object
6 7 8 |
# File 'lib/wordmove/cli.rb', line 6 def __print_version puts Wordmove::VERSION end |
#doctor ⇒ Object
16 17 18 |
# File 'lib/wordmove/cli.rb', line 16 def doctor Wordmove::Doctor.start end |
#init ⇒ Object
11 12 13 |
# File 'lib/wordmove/cli.rb', line 11 def init Wordmove::Generators::Movefile.start end |
#pull ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/wordmove/cli.rb', line 65 def pull () begin deployer = Wordmove::Deployer::Base.deployer_for(.deep_symbolize_keys) rescue MovefileNotFound => e logger.error(e.) exit 1 end Wordmove::Hook.run(:pull, :before, ) guardian = Wordmove::Guardian.new(options: , action: :pull) () do |task| deployer.send("pull_#{task}") if guardian.allows(task.to_sym) end Wordmove::Hook.run(:pull, :after, ) end |
#push ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/wordmove/cli.rb', line 89 def push () begin deployer = Wordmove::Deployer::Base.deployer_for(.deep_symbolize_keys) rescue MovefileNotFound => e logger.error(e.) exit 1 end Wordmove::Hook.run(:push, :before, ) guardian = Wordmove::Guardian.new(options: , action: :push) () do |task| deployer.send("push_#{task}") if guardian.allows(task.to_sym) end Wordmove::Hook.run(:push, :after, ) end |