Class: Pindo::Command::Deploy::Pullconfig
- Inherits:
-
Pindo::Command::Deploy
- Object
- Pindo::Command
- Pindo::Command::Deploy
- Pindo::Command::Deploy::Pullconfig
- Defined in:
- lib/pindo/command/deploy/pullconfig.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Pullconfig
constructor
A new instance of Pullconfig.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Pullconfig
Returns a new instance of Pullconfig.
28 29 30 31 32 |
# File 'lib/pindo/command/deploy/pullconfig.rb', line 28 def initialize(argv) @args_appconfig_repo_name = argv.shift_argument super @additional_args = argv.remainder! end |
Instance Method Details
#run ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/pindo/command/deploy/pullconfig.rb', line 44 def run app_config_dir = clong_buildconfig_repo(repo_name: @args_appconfig_repo_name) current=Dir.pwd if !app_config_dir.eql?(current) && File.exist?(File.join(app_config_dir, 'config.json')) FileUtils.cp_r(File.join(app_config_dir, "config.json"), current) end end |
#validate! ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/pindo/command/deploy/pullconfig.rb', line 34 def validate! super if @args_appconfig_repo_name.nil? say "You need input a bundle id" @args_appconfig_repo_name = ask('App Config Repo Name : ') || nil end help! 'You need input a repo name' if @args_appconfig_repo_name.nil? || @args_appconfig_repo_name.empty? end |