lib/ambient.rb in ambient-xcode-0.1.0 vs lib/ambient.rb in ambient-xcode-0.2.0
- old
+ new
@@ -15,11 +15,13 @@
@use_defaults = false
@project_options = {}
@shared_target_options = {}
@target_options = {}
+ @scheme_options = {}
@parents = {}
+
def configure(&block)
instance_eval &block
end
def project_helper
@@ -40,24 +42,29 @@
if scheme
@target_options[target] ||= {}
@target_options[target][scheme] ||= {}
@target_options[target][scheme][option] = value
else
- # require 'pry'; binding.pry
@shared_target_options[target] ||= {}
@shared_target_options[target][option] = value
end
else
- @project_options[option] = value
+ if scheme
+ @scheme_options[scheme] ||= {}
+ @scheme_options[scheme][option] = value
+ else
+ @project_options[option] = value
+ end
end
end
def setup_project
project_helper.print_info
reset_project_to_defaults
reset_targets_to_defaults
process_project_options
+ process_scheme_options
process_shared_target_options
process_target_options
end
def reset_project_to_defaults
@@ -75,9 +82,14 @@
end
def process_project_options
puts "applying ambient project settings"
project_helper.process_project_options(@project_options)
+ end
+
+ def process_scheme_options
+ puts "applying ambient scheme settings"
+ project_helper.process_scheme_options(@scheme_options)
end
def process_shared_target_options
puts "applying ambient shared target settings"
project_helper.process_shared_target_options(@shared_target_options)