Class: Pindo::Command::Ios::Podpush
- Inherits:
-
Ios
- Object
- Ios
- Pindo::Command::Ios::Podpush
- Defined in:
- lib/pindo/command/ios/podpush.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Podpush
constructor
A new instance of Podpush.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Podpush
Returns a new instance of Podpush.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/pindo/command/ios/podpush.rb', line 52 def initialize(argv) @pod_spec_file = argv.shift_argument || nil @options = (argv) @project_dir = @options[:path] @force_push = @options[:force] || false super(argv) @additional_args = argv.remainder! end |
Class Method Details
.option_items ⇒ Object
41 42 43 44 45 46 |
# File 'lib/pindo/command/ios/podpush.rb', line 41 def self.option_items @option_items ||= Pindo::Options::OptionGroup.merge( Pindo::Options::PodOptions.select(:path), Pindo::Options::CommonOptions.select(:force) ) end |
.options ⇒ Object
48 49 50 |
# File 'lib/pindo/command/ios/podpush.rb', line 48 def self. option_items.map(&:to_claide_option).concat(super) end |
Instance Method Details
#run ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/pindo/command/ios/podpush.rb', line 68 def run if @force_push run_force_push else run_normal_push end end |
#validate! ⇒ Object
63 64 65 66 |
# File 'lib/pindo/command/ios/podpush.rb', line 63 def validate! super @project_dir=Dir.pwd if @project_dir.nil? || @project_dir.empty? end |