Class: Pod::Command::Bdtransform::ToDev
- Inherits:
-
Pod::Command::Bdtransform
- Object
- Pod::Command
- Pod::Command::Bdtransform
- Pod::Command::Bdtransform::ToDev
- Defined in:
- lib/cocoapods-BDTransform/command/BDTransform/ToDev.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ ToDev
constructor
A new instance of ToDev.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ ToDev
Returns a new instance of ToDev.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToDev.rb', line 20 def initialize(argv) super @podspec = argv.option('podspec') subspecs = argv.option('subspecs') targets = argv.option('targets') @subspecs = subspecs.split(',') unless subspecs.nil? @targets = targets.split(',') unless targets.nil? if @podspec @podspecName = File.basename(@podspec, ".*") else @podspec = 'no support' end @podProjectPath = Dir::pwd + "/" + "Pods/Pods.xcodeproj" end |
Class Method Details
.options ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToDev.rb', line 12 def self. [ ['--podspec=', 'the absolute path of your podspec to dev. i.e --podspec=xxx/xxx.podspec'], ['--subspecs=', 'build with given subspecs. i.e --subspecs=Core,Monitor'], ['--targets=', 'the effected target of this operation. Default action effects all your target of Project'] ] end |
Instance Method Details
#run ⇒ Object
41 42 43 44 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToDev.rb', line 41 def run accessor BDAwesomeTransmit::BDPodsTrans.transmit(@podspec,@subspecs,@sandboxPath,@podProjectPath,@podspecName,@workspacePath,@workspaceName,@targets) end |
#validate! ⇒ Object
36 37 38 39 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToDev.rb', line 36 def validate! help! 'A Podspec path is required.' unless File::exist?(@podspec) help! 'Did not find your Pods Dir in current Dir' unless File::directory?(@podProjectPath) end |