ambient-xcode 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4aa28492d2fc79beba415905f23fa9c2722ad2b4
4
- data.tar.gz: 7248bebe4500754766259c4b62aeab11c557523b
3
+ metadata.gz: 1bd28337f7264024fc33327b9bbf6532f3d83e6d
4
+ data.tar.gz: 55d2e05c9978c8cfece5859c1bf5cc5a32b64482
5
5
  SHA512:
6
- metadata.gz: 85f740558e295eef751f7f6733e22e25cf3c11940af934d181f45b91098eb84f0d8ee55da851d296c42fa6cf0b3ada174256fd4ca5ee91f260dbfea56b48ba68
7
- data.tar.gz: 82c0d6752fb83e4575b387af0dc56fb8c46427966e7b391dcd2f71bc58567d9f5db3d75b3805d8266515a19bed96521592e6f878fb96e8cf4c1e7d9be961a8a1
6
+ metadata.gz: ade3993664e0f19b09c891cfc993d39829038a1fb1286a7a75a97f749dcf80d5a660770108f558a8acc9b92b7975cfcad3d6278ff6ac191588bb95f2ab892762
7
+ data.tar.gz: d0acaf3d838ef1266ebfb9a6fe815bdb3aba2b522c81c38d3ab8d5e929ebd38c7ecf2d52530d4b5f6b5eb82275b41a3f4bfd85ab884894d14718bb7fc67229e4
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'ambient-xcode'
6
- gem.version = '0.4.0'
6
+ gem.version = '0.5.0'
7
7
  gem.authors = ['Daniel Green']
8
8
  gem.email = ['dan2552@gmail.com']
9
9
  gem.description = %q{CLI for configuring Xcode projects from a Ruby file.}
data/lib/ambient.rb CHANGED
@@ -31,7 +31,8 @@ module Ambient
31
31
  @project_helper ||= ProjectHelper.new
32
32
  end
33
33
 
34
- def set_parent_target(target, child, parent)
34
+ def set_parent_scheme(target: nil, child: nil, parent: nil)
35
+ target = target || :all
35
36
  @parents[target] ||= {}
36
37
  @parents[target][child] = parent
37
38
  end
@@ -75,6 +76,7 @@ module Ambient
75
76
  reset_project_to_defaults if @use_defaults
76
77
  reset_targets_to_defaults if @use_defaults
77
78
  reset_capabilites_to_defaults if @use_defaults
79
+ load_in_parent_scheme_values
78
80
  process_project_options
79
81
  process_scheme_options
80
82
  process_shared_target_options
@@ -116,7 +118,6 @@ module Ambient
116
118
 
117
119
  def process_target_options
118
120
  puts "applying ambient target settings"
119
- load_in_parent_target_values
120
121
  project_helper.process_target_options(@target_options)
121
122
  end
122
123
 
@@ -130,13 +131,19 @@ module Ambient
130
131
  project_helper.process_development_teams(@development_teams)
131
132
  end
132
133
 
133
- def load_in_parent_target_values
134
+ def load_in_parent_scheme_values
134
135
  @parents.each do |target, parents|
135
136
  parents.each do |child, parent|
136
137
  if parent
137
- options = @target_options[target]
138
- child_options = options[child]
139
- parent_options = options[parent]
138
+ if target == :all
139
+ puts "Identified #{child} as a child of #{parent}"
140
+ child_options = @scheme_options[child]
141
+ parent_options = @scheme_options[parent]
142
+ else
143
+ target_options = @target_options[target]
144
+ child_options = target_options[child]
145
+ parent_options = target_options[parent]
146
+ end
140
147
  child_options.merge!(parent_options) { |_, child, _| child }
141
148
  end
142
149
  end
data/lib/dsl.rb CHANGED
@@ -106,15 +106,19 @@ class SchemeScope
106
106
  @name = name
107
107
  @parent = parent
108
108
 
109
- child = name
110
-
111
- if @target
112
- Ambient.configure { set_parent_target(target.name, child, parent) }
109
+ Ambient.configure do
110
+ set_parent_scheme(
111
+ target: target && target.name,
112
+ child: name,
113
+ parent: parent
114
+ )
113
115
  end
114
116
  end
115
117
 
116
118
  def configure(&block)
117
- instance_eval(&block)
119
+ if block
120
+ instance_eval(&block)
121
+ end
118
122
  end
119
123
 
120
124
  def option(option_name, value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ambient-xcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj