xcodeproj 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9ec16130cc4237b7257b542daf86218199f2ac6b03a00cda2d88d0ca317c905
4
- data.tar.gz: f820d365aa7a808bdd3d6aec34db9a1aabb3b391ecb6fe41593628888ad31424
3
+ metadata.gz: bad4a5d9e130051e4ec9f5ba1123c0945646361aa179f50978277f886ac8ae26
4
+ data.tar.gz: 3dffd3ec7bd653c19005942c6e61e315819b62d29f96ab854ea4e9863b9e87d1
5
5
  SHA512:
6
- metadata.gz: 12be0ca390e13b6bf56430b686ff1e1e667012b2bba6044b48a860f01d41a3209acd9c831ee304b0c8650dbd4a68abea4b796dcc3a124790a5f6e777ff760309
7
- data.tar.gz: 5f6ee8bafbc375fbd78a94857933804bc997a1bc4497b57bda370fc816f7f888939cde6dfd1de18636e909f3da8442333ada8df0c03a19ec2cb24152d6f715cf
6
+ metadata.gz: ffb0fa8556611d4f0440490fe902e7dbfbbff9155edade6040bb0a5a6490536a01954c93f5784a6cf4da0e40852b1c06844718b2b6645407968b5ba697a47bc6
7
+ data.tar.gz: e1f4f116e2faab02c2dcd6031a7a37940fbc22cebfbe20a7c6a56628ce0cedf8b83184a3405bf83d3d2f4c390744197a0db8c57f1da5c11d3137a18f24764b01
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
2
  # The version of the xcodeproj gem.
3
3
  #
4
- VERSION = '1.5.6'.freeze unless defined? Xcodeproj::VERSION
4
+ VERSION = '1.5.7'.freeze unless defined? Xcodeproj::VERSION
5
5
  end
@@ -113,8 +113,15 @@ module Xcodeproj
113
113
  /x
114
114
 
115
115
  def expand_build_setting(build_setting_value, config_value)
116
+ if build_setting_value.is_a?(Array) && config_value.is_a?(String)
117
+ config_value = split_build_setting_array_to_string(config_value)
118
+ elsif build_setting_value.is_a?(String) && config_value.is_a?(Array)
119
+ build_setting_value = split_build_setting_array_to_string(build_setting_value)
120
+ end
121
+
116
122
  default = build_setting_value.is_a?(String) ? '' : []
117
123
  inherited = config_value || default
124
+
118
125
  return build_setting_value.gsub(Regexp.union(Constants::INHERITED_KEYWORDS), inherited) if build_setting_value.is_a? String
119
126
  build_setting_value.map { |value| Constants::INHERITED_KEYWORDS.include?(value) ? inherited : value }.flatten
120
127
  end
@@ -268,7 +268,7 @@ module Xcodeproj
268
268
  uuid = subproject_reference.uuid if subproject_reference
269
269
  dep.target_proxy.remote_global_id_string == target.uuid && dep.target_proxy.container_portal == uuid
270
270
  else
271
- dep.target == target
271
+ dep.target.uuid == target.uuid
272
272
  end
273
273
  end
274
274
  end
@@ -319,7 +319,7 @@ module Xcodeproj
319
319
  if existing.is_a?(Hash) && value.is_a?(Hash)
320
320
  return value if existing.keys == value.keys && existing == value
321
321
  elsif existing == value
322
- return value if existing == value
322
+ return value
323
323
  end
324
324
  mark_project_as_dirty!
325
325
  @simple_attributes_hash[attrb.plist_name] = value
@@ -10,10 +10,13 @@ module Xcodeproj
10
10
  # Either the Xcode target to reference,
11
11
  # or an existing XML 'BuildableReference' node element to reference
12
12
  #
13
- def initialize(target_or_node)
13
+ # @param [Xcodeproj::Project] the root project to reference from
14
+ # (when nil the project of the target is used)
15
+ #
16
+ def initialize(target_or_node, root_project = nil)
14
17
  create_xml_element_with_fallback(target_or_node, 'BuildableReference') do
15
18
  @xml_element.attributes['BuildableIdentifier'] = 'primary'
16
- set_reference_target(target_or_node, true) if target_or_node
19
+ set_reference_target(target_or_node, true, root_project) if target_or_node
17
20
  end
18
21
  end
19
22
 
@@ -49,13 +52,16 @@ module Xcodeproj
49
52
  # @param [Xcodeproj::Project::Object::AbstractTarget] target
50
53
  # The target this BuildableReference refers to.
51
54
  #
55
+ # @param [Xcodeproj::Project] the root project to reference from
56
+ # (when nil the project of the target is used)
57
+ #
52
58
  # @param [Bool] override_buildable_name
53
59
  # If true, buildable_name will also be updated by computing a name from the target
54
60
  #
55
- def set_reference_target(target, override_buildable_name = false)
61
+ def set_reference_target(target, override_buildable_name = false, root_project = nil)
56
62
  @xml_element.attributes['BlueprintIdentifier'] = target.uuid
57
63
  @xml_element.attributes['BlueprintName'] = target.name
58
- @xml_element.attributes['ReferencedContainer'] = construct_referenced_container_uri(target)
64
+ @xml_element.attributes['ReferencedContainer'] = construct_referenced_container_uri(target, root_project)
59
65
  self.buildable_name = construct_buildable_name(target) if override_buildable_name
60
66
  end
61
67
 
@@ -96,14 +102,24 @@ module Xcodeproj
96
102
 
97
103
  # @param [Xcodeproj::Project::Object::AbstractTarget] target
98
104
  #
105
+ # @param [Xcodeproj::Project] the root project to reference from
106
+ # (when nil the project of the target is used)
107
+ #
99
108
  # @return [String] A string in the format "container:[path to the project
100
109
  # file relative to the project_dir_path, always ending with
101
110
  # the actual project directory name]"
102
111
  #
103
- def construct_referenced_container_uri(target)
104
- project = target.project
105
- relative_path = project.path.relative_path_from(project.path + project.root_object.project_dir_path).to_s
106
- relative_path = project.path.basename if relative_path == '.'
112
+ def construct_referenced_container_uri(target, root_project = nil)
113
+ target_project = target.project
114
+ root_project ||= target_project
115
+ root_project_dir_path = root_project.root_object.project_dir_path
116
+ path = if !root_project_dir_path.to_s.empty?
117
+ root_project.path + root_project_dir_path
118
+ else
119
+ root_project.path.dirname
120
+ end
121
+ relative_path = target_project.path.relative_path_from(path).to_s
122
+ relative_path = target_project.path.basename if relative_path == '.'
107
123
  "container:#{relative_path}"
108
124
  end
109
125
  end
@@ -127,10 +127,13 @@ module Xcodeproj
127
127
  # or an existing XML 'TestableReference' node element to reference,
128
128
  # or nil to create an new, empty TestableReference
129
129
  #
130
- def initialize(target_or_node = nil)
130
+ # @param [Xcodeproj::Project] the root project to reference from
131
+ # (when nil the project of the target is used)
132
+ #
133
+ def initialize(target_or_node = nil, root_project = nil)
131
134
  create_xml_element_with_fallback(target_or_node, 'TestableReference') do
132
135
  self.skipped = false
133
- add_buildable_reference BuildableReference.new(target_or_node) unless target_or_node.nil?
136
+ add_buildable_reference BuildableReference.new(target_or_node, root_project) unless target_or_node.nil?
134
137
  end
135
138
  end
136
139
 
@@ -183,7 +183,7 @@ module Xcodeproj
183
183
 
184
184
  #-------------------------------------------------------------------------#
185
185
 
186
- # Load all schemes from all projects in workspace
186
+ # Load all schemes from all projects in workspace or in the workspace container itself
187
187
  #
188
188
  # @param [String] workspace_dir_path
189
189
  # path of workspaces dir
@@ -195,6 +195,13 @@ module Xcodeproj
195
195
  project_full_path = file_reference.absolute_path(workspace_dir_path)
196
196
  load_schemes_from_project(project_full_path)
197
197
  end
198
+
199
+ # Load schemes that are in the workspace container.
200
+ workspace_abs_path = File.absolute_path(workspace_dir_path)
201
+ Dir[File.join(workspace_dir_path, 'xcshareddata', 'xcschemes', '*.xcscheme')].each do |scheme|
202
+ scheme_name = File.basename(scheme, '.xcscheme')
203
+ @schemes[scheme_name] = workspace_abs_path
204
+ end
198
205
  end
199
206
 
200
207
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodeproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-04 00:00:00.000000000 Z
11
+ date: 2018-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atomos
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: CFPropertyList
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.3.3
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '4.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: 2.3.3
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '4.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: claide
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +84,14 @@ dependencies:
78
84
  requirements:
79
85
  - - "~>"
80
86
  - !ruby/object:Gem::Version
81
- version: 0.2.3
87
+ version: 0.2.4
82
88
  type: :runtime
83
89
  prerelease: false
84
90
  version_requirements: !ruby/object:Gem::Requirement
85
91
  requirements:
86
92
  - - "~>"
87
93
  - !ruby/object:Gem::Version
88
- version: 0.2.3
94
+ version: 0.2.4
89
95
  description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
90
96
  boring management tasks or build Xcode-friendly libraries. Also includes support
91
97
  for Xcode workspaces (.xcworkspace) and configuration files (.xcconfig).
@@ -174,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
180
  version: '0'
175
181
  requirements: []
176
182
  rubyforge_project:
177
- rubygems_version: 2.7.4
183
+ rubygems_version: 2.7.6
178
184
  signing_key:
179
185
  specification_version: 3
180
186
  summary: Create and modify Xcode projects from Ruby.