xcodeproj 1.0.0.beta.3 → 1.0.0.beta.4
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 +4 -4
- data/lib/xcodeproj/differ.rb +5 -5
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/project/object.rb +1 -1
- data/lib/xcodeproj/project/object/build_rule.rb +28 -0
- data/lib/xcodeproj/scheme.rb +5 -5
- data/lib/xcodeproj/scheme/environment_variables.rb +5 -5
- data/lib/xcodeproj/workspace/file_reference.rb +2 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5365dce5249a3e06f6eeadfc7c4fb00242228b9
|
4
|
+
data.tar.gz: 5f931366bea51e6fd3a6a76f7f313ac7df39f888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a0e3e88d47c4cf489301a2d8bb66c09727d4664bc725581efea2b7eac97d6702c8b53c8a1819f6bab3065696aaf5b6472c363182bf2ab7f74d7d645164ea625
|
7
|
+
data.tar.gz: 0c95879d61ef84e23d52ecc882e5c7e294c58c7238234cec1b0e6cc77ba797776156d1f80b4dead5a316ed8099f77e8212f9ed9014f202969c0ef50d27d30c88
|
data/lib/xcodeproj/differ.rb
CHANGED
@@ -47,15 +47,15 @@ module Xcodeproj
|
|
47
47
|
options[:key_2] ||= 'value_2'
|
48
48
|
options[:id_key] ||= nil
|
49
49
|
|
50
|
-
if value_1.class == value_2.class
|
51
|
-
|
50
|
+
method = if value_1.class == value_2.class
|
51
|
+
case value_1
|
52
52
|
when Hash then :hash_diff
|
53
53
|
when Array then :array_diff
|
54
54
|
else :generic_diff
|
55
55
|
end
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
else
|
57
|
+
:generic_diff
|
58
|
+
end
|
59
59
|
send(method, value_1, value_2, options)
|
60
60
|
end
|
61
61
|
|
@@ -46,12 +46,40 @@ module Xcodeproj
|
|
46
46
|
#
|
47
47
|
attribute :output_files, Array
|
48
48
|
|
49
|
+
# @return [ObjectList<String>] the compiler flags used when creating the
|
50
|
+
# respective output files.
|
51
|
+
#
|
52
|
+
attribute :output_files_compiler_flags, Array
|
53
|
+
|
49
54
|
# @return [String] the content of the script to use for the build rule.
|
50
55
|
#
|
51
56
|
# @note This attribute is present if the #{#compiler_spec} is
|
52
57
|
# `com.apple.compilers.proxy.script`
|
53
58
|
#
|
54
59
|
attribute :script, String
|
60
|
+
|
61
|
+
# @!group Helpers
|
62
|
+
|
63
|
+
# Adds an output file with the specified compiler flags.
|
64
|
+
#
|
65
|
+
# @param [PBXFileReference] file the file to add.
|
66
|
+
#
|
67
|
+
# @param [String] compiler_flags the compiler flags for the file.
|
68
|
+
#
|
69
|
+
# @return [Void]
|
70
|
+
#
|
71
|
+
def add_output_file(file, compiler_flags = '')
|
72
|
+
(self.output_files ||= []) << file
|
73
|
+
(self.output_files_compiler_flags ||= []) << compiler_flags
|
74
|
+
end
|
75
|
+
|
76
|
+
# @return [Array<[PBXFileReference, String]>]
|
77
|
+
# An array containing tuples of output files and their compiler
|
78
|
+
# flags.
|
79
|
+
#
|
80
|
+
def output_files_and_flags
|
81
|
+
(output_files || []).zip(output_files_compiler_flags || [])
|
82
|
+
end
|
55
83
|
end
|
56
84
|
end
|
57
85
|
end
|
data/lib/xcodeproj/scheme.rb
CHANGED
@@ -300,11 +300,11 @@ module Xcodeproj
|
|
300
300
|
# scheme.save_as('path/to/Project.xcodeproj') #=> true
|
301
301
|
#
|
302
302
|
def save_as(project_path, name, shared = true)
|
303
|
-
if shared
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
303
|
+
scheme_folder_path = if shared
|
304
|
+
self.class.shared_data_dir(project_path)
|
305
|
+
else
|
306
|
+
self.class.user_data_dir(project_path)
|
307
|
+
end
|
308
308
|
scheme_folder_path.mkpath
|
309
309
|
scheme_path = scheme_folder_path + "#{name}.xcscheme"
|
310
310
|
File.open(scheme_path, 'w') do |f|
|
@@ -109,11 +109,11 @@ module Xcodeproj
|
|
109
109
|
@xml_element.attributes['key'] = node_or_variable[:key]
|
110
110
|
@xml_element.attributes['value'] = node_or_variable[:value]
|
111
111
|
|
112
|
-
if node_or_variable.key?(:enabled)
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
112
|
+
@xml_element.attributes['isEnabled'] = if node_or_variable.key?(:enabled)
|
113
|
+
bool_to_string(node_or_variable[:enabled])
|
114
|
+
else
|
115
|
+
bool_to_string(true)
|
116
|
+
end
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -76,10 +76,9 @@ module Xcodeproj
|
|
76
76
|
when 'absolute'
|
77
77
|
File.expand_path(path)
|
78
78
|
when 'developer'
|
79
|
-
raise
|
80
|
-
"#{self}"
|
79
|
+
raise "Developer workspace file reference type is not yet supported (#{path})"
|
81
80
|
else
|
82
|
-
raise "Unsupported workspace file reference type
|
81
|
+
raise "Unsupported workspace file reference type `#{type}`"
|
83
82
|
end
|
84
83
|
end
|
85
84
|
end
|
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.0.0.beta.
|
4
|
+
version: 1.0.0.beta.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.6.3
|
152
152
|
signing_key:
|
153
153
|
specification_version: 3
|
154
154
|
summary: Create and modify Xcode projects from Ruby.
|