Permalink
Browse files

Merge remote-tracking branch 'moredip/master'

  • Loading branch information...
moredip committed Mar 9, 2013
2 parents 3aba525 + 87cda95 commit 7647abac3fbb77585959d19e3b2c787e07b325e5
Showing with 7 additions and 3 deletions.
  1. +4 −3 gem/lib/frank-cucumber/cli.rb
  2. +3 −0 gem/lib/frank-cucumber/frankifier.rb
@@ -31,6 +31,7 @@ def skeleton
method_option WITHOUT_ASYNC_SOCKET, :type => :boolean
method_option WITHOUT_LUMBERJACK, :type => :boolean
method_option :build_configuration, :aliases=>'--conf', :type=>:string, :default => 'Debug'
+ method_option :target, :type=>:string
def setup
@libs = %w(Shelley CocoaAsyncSocket CocoaLumberjack CocoaHTTPServer Frank)
@libsMac = %w(CocoaAsyncSocketMac CocoaLumberjackMac CocoaHTTPServerMac FrankMac)
@@ -42,13 +43,13 @@ def setup
@libsMac -= %w(CocoaLumberjackMac) if options[WITHOUT_LUMBERJACK]
directory ".", "Frank"
- Frankifier.frankify!( File.expand_path('.'), :build_config => options[:build_configuration] )
+ Frankifier.frankify!( File.expand_path('.'), :build_config => options[:build_configuration], :target => options[:target] )
end
desc "update", "updates the frank server components inside your Frank directory"
long_desc "This updates the parts of Frank that are embedded inside your app (e.g. libFrank.a and frank_static_resources.bundle)"
def update
- %w{libFrank.a libCocoaAsyncSocket.a libCocoaLumberjack.a libCocoaHTTPServer.a libShelley.a libFrankMac.a libShelleyMac libCocoaAsyncSocketMac.a libCocoaLumberjackMac.a libCocoaHTTPServerMac.a}.each do |f|
+ %w{libFrank.a libCocoaAsyncSocket.a libCocoaLumberjack.a libCocoaHTTPServer.a libShelley.a libFrankMac.a libShelleyMac.a libCocoaAsyncSocketMac.a libCocoaLumberjackMac.a libCocoaHTTPServerMac.a}.each do |f|
copy_file f, File.join( 'Frank', f ), :force => true
end
directory( 'frank_static_resources.bundle', 'Frank/frank_static_resources.bundle', :force => true )
@@ -91,7 +92,7 @@ def build
extra_opts = XCODEBUILD_OPTIONS.map{ |o| "-#{o} \"#{options[o]}\"" if options[o] }.compact.join(' ')
# If there is a scheme specified we don't want to inject the default configuration
- # If there is a configuration specified, we also do not want to inject the default configuration
+ # If there is a configuration specified, we also do not want to inject the default configuration
if options['scheme'] || options['configuration']
separate_configuration_option = ""
else
@@ -13,6 +13,7 @@ def self.frankify! root_dir, options = {}
def initialize( root_dir, options = {} )
@root = Pathname.new( root_dir )
@target_build_configuration = options[:build_config]
+ @target_selection = options[:target]
end
def frankify!
@@ -53,6 +54,8 @@ def decide_on_project
def decide_on_target
targets = @project.targets
+ @target = targets.find { |item| item.name.eql?(@target_selection) } if @target_selection
+ return @target if @target
@target = case targets.size
when 0
raise "Sorry, this project appears to contain no targets. Nothing I can do here."

0 comments on commit 7647aba

Please sign in to comment.