class RXCode::XCode::CommandLine
Attributes
action[RW]
sdk[RW]
target[W]
Public Class Methods
new(options = nil) { |self| ... }
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 8 def initialize(options = nil) if options options.each { |attr_name, attr_value| self.send("#{attr_name}=", attr_value) } end yield self if block_given? end
Public Instance Methods
action_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 20 def action_arguments if action [ action ] else [] end end
command()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 119 def command command_args = command_line_arguments.join(' ') command_variables = command_environment.collect { |var_name, value| "#{var_name}='#{value}'" }.join(' ') "#{xcodebuild_binary} #{command_args} #{command_variables}" end
command_environment()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 101 def command_environment default_environment.merge(environment) end
command_line_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 115 def command_line_arguments project_arguments + target_arguments + configuration_arguments + sdk_arguments + action_arguments end
command_variables()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 105 def command_variables environment.collect { |var_name, value| "#{var_name}='#{value}'" }.join(' ') end
configuration()
click to toggle source
configuration_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 67 def configuration_arguments [ '-configuration', configuration] end
default_environment()
click to toggle source
dry_run?()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 126 def dry_run? ENV['DRY_RUN'] =~ /^(1|yes|true)$/i end
environment()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 97 def environment @environment ||= {} end
project_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 38 def project_arguments [ '-project', project_file_path ] end
project_file_path()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 34 def project_file_path ENV['PROJECT_FILE_PATH'] || "#{project_name}.xcodeproj" end
project_name()
click to toggle source
run(print_command = false)
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 130 def run(print_command = false) puts(command) if print_command system(command) unless dry_run? end
sdk_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 75 def sdk_arguments if sdk.nil? [] else [ '-sdk', sdk ] end end
symroot()
click to toggle source
target()
click to toggle source
target_arguments()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 53 def target_arguments if target [ "-target", "'#{target}'" ] else [] end end
target_name()
click to toggle source
# File lib/rxcode/tasks/ios_framework.rb, line 49 def target_name ENV['TARGET_NAME'] end