xcake 0.6.7 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +15 -1
- data/docs/Cakefile.md +3 -3
- data/lib/xcake/configurable.rb +29 -47
- data/lib/xcake/configuration/sugar.rb +3 -1
- data/lib/xcake/generator/configuration_generator.rb +1 -1
- data/lib/xcake/project/sugar.rb +7 -2
- data/lib/xcake/resources/Cakefile +6 -6
- data/lib/xcake/version.rb +1 -1
- data/xcake.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15ae8927c93b407871e67a817c72925d9f15a1e3
|
4
|
+
data.tar.gz: 25e31bc7f9c9e1cddd9aced2237b0020391d8046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db7173db7391ba932be4fd4b61d7a6212834ae7a20d894231b7a78246e70618611376599dbbf6e913a0150ab78c86122882bed9317ec71cd794cce420fe478a5
|
7
|
+
data.tar.gz: 33cafc01d11a285895317027a0eaf92342b9b54be77d792e896231cefb7ec5adcb4b8d20c7a2d5c890c9dbb8e17f93e28e621df62f5e8877bb67aa8c9db93dd7
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -17,6 +17,7 @@ GEM
|
|
17
17
|
minitest (~> 5.1)
|
18
18
|
thread_safe (~> 0.3, >= 0.3.4)
|
19
19
|
tzinfo (~> 1.1)
|
20
|
+
ast (2.2.0)
|
20
21
|
claide (0.9.1)
|
21
22
|
coderay (1.1.1)
|
22
23
|
colored (1.2)
|
@@ -37,13 +38,17 @@ GEM
|
|
37
38
|
minitest (5.8.4)
|
38
39
|
molinillo (0.4.4)
|
39
40
|
necromancer (0.3.0)
|
41
|
+
parser (2.3.1.0)
|
42
|
+
ast (~> 2.2)
|
40
43
|
pastel (0.5.3)
|
41
44
|
equatable (~> 0.5.0)
|
42
45
|
tty-screen (~> 0.4.3)
|
46
|
+
powerpack (0.1.1)
|
43
47
|
pry (0.10.3)
|
44
48
|
coderay (~> 1.1.0)
|
45
49
|
method_source (~> 0.8.1)
|
46
50
|
slop (~> 3.4)
|
51
|
+
rainbow (2.1.0)
|
47
52
|
rake (10.5.0)
|
48
53
|
rspec (3.4.0)
|
49
54
|
rspec-core (~> 3.4.0)
|
@@ -58,6 +63,13 @@ GEM
|
|
58
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
59
64
|
rspec-support (~> 3.4.0)
|
60
65
|
rspec-support (3.4.1)
|
66
|
+
rubocop (0.39.0)
|
67
|
+
parser (>= 2.3.0.7, < 3.0)
|
68
|
+
powerpack (~> 0.1)
|
69
|
+
rainbow (>= 1.99.1, < 3.0)
|
70
|
+
ruby-progressbar (~> 1.7)
|
71
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
72
|
+
ruby-progressbar (1.8.0)
|
61
73
|
simplecov (0.11.2)
|
62
74
|
docile (~> 1.1.0)
|
63
75
|
json (~> 1.8)
|
@@ -106,6 +118,7 @@ GEM
|
|
106
118
|
tzinfo (1.2.2)
|
107
119
|
thread_safe (~> 0.1)
|
108
120
|
uber (0.0.15)
|
121
|
+
unicode-display_width (1.0.5)
|
109
122
|
unicode_utils (1.4.0)
|
110
123
|
verse (0.4.0)
|
111
124
|
unicode_utils (~> 1.4.0)
|
@@ -124,8 +137,9 @@ DEPENDENCIES
|
|
124
137
|
pry (~> 0.10)
|
125
138
|
rake (~> 10.0)
|
126
139
|
rspec (~> 3.4.0)
|
140
|
+
rubocop (~> 0.39.0)
|
127
141
|
xcake!
|
128
142
|
yard (~> 0.8)
|
129
143
|
|
130
144
|
BUNDLED WITH
|
131
|
-
1.
|
145
|
+
1.12.1
|
data/docs/Cakefile.md
CHANGED
@@ -18,7 +18,7 @@ and here is much more complicated one:
|
|
18
18
|
|
19
19
|
application_for :ios, 8.0 do |target|
|
20
20
|
target.name = "test"
|
21
|
-
target.all_configurations.supported_devices = :iphone_only
|
21
|
+
target.all_configurations.each { |c| c.supported_devices = :iphone_only }
|
22
22
|
|
23
23
|
unit_tests_for target
|
24
24
|
end
|
@@ -259,7 +259,7 @@ We can apply a particular shared setting across all of our configurations.
|
|
259
259
|
Xcake provides a simply way of doing this via an "all" configuration.
|
260
260
|
|
261
261
|
```ruby
|
262
|
-
all_configurations.supported_devices = :iphone_only
|
262
|
+
all_configurations.each { |c| c.supported_devices = :iphone_only }
|
263
263
|
```
|
264
264
|
|
265
265
|
### Targets
|
@@ -269,7 +269,7 @@ target we want to modify the configuration for.
|
|
269
269
|
|
270
270
|
```ruby
|
271
271
|
|
272
|
-
target.all_configurations.supported_devices = :iphone_only
|
272
|
+
target.all_configurations.each { |c| c.supported_devices = :iphone_only }
|
273
273
|
|
274
274
|
debug_configuration :staging do |configuration|
|
275
275
|
configuration.settings["KEY"] = "VALUE"
|
data/lib/xcake/configurable.rb
CHANGED
@@ -15,41 +15,31 @@ module Xcake
|
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
|
-
attr_accessor :
|
18
|
+
attr_accessor :all_configurations
|
19
19
|
|
20
20
|
public
|
21
21
|
|
22
22
|
attr_accessor :debug_configurations
|
23
23
|
attr_accessor :release_configurations
|
24
24
|
|
25
|
-
#
|
26
|
-
# flattens them and returns them as an array.
|
25
|
+
# @return [Array<Configuration>] list of configurations
|
27
26
|
#
|
28
|
-
|
29
|
-
|
30
|
-
# and shared "all" settings, in this priority:
|
31
|
-
#
|
32
|
-
# - default settings
|
33
|
-
# - shared settings
|
34
|
-
# - configuration settings
|
35
|
-
#
|
36
|
-
# @return [Array<Configuration>] list of all configurations flattened
|
37
|
-
#
|
38
|
-
def flatten_configurations
|
39
|
-
all_settings = all_configurations.settings
|
40
|
-
flattened_configurations = []
|
27
|
+
def all_configurations
|
28
|
+
configurations = []
|
41
29
|
|
42
|
-
debug_configurations.
|
43
|
-
|
44
|
-
|
30
|
+
if debug_configurations.empty?
|
31
|
+
configurations << debug_configuration("Debug")
|
32
|
+
else
|
33
|
+
configurations.concat(debug_configurations)
|
45
34
|
end
|
46
35
|
|
47
|
-
release_configurations.
|
48
|
-
|
49
|
-
|
36
|
+
if release_configurations.empty?
|
37
|
+
configurations << release_configuration("Release")
|
38
|
+
else
|
39
|
+
configurations.concat(release_configurations)
|
50
40
|
end
|
51
41
|
|
52
|
-
|
42
|
+
configurations
|
53
43
|
end
|
54
44
|
|
55
45
|
# @return [Array<Configuration>] list of debug configurations
|
@@ -64,23 +54,6 @@ module Xcake
|
|
64
54
|
@release_configurations ||= []
|
65
55
|
end
|
66
56
|
|
67
|
-
# This returns the shared "all" configuration
|
68
|
-
# use this if you want to set a setting that
|
69
|
-
# applies across all configurations.
|
70
|
-
#
|
71
|
-
# Note: If this setting is set on a configuration
|
72
|
-
# already then this won't override it.
|
73
|
-
#
|
74
|
-
# @example Set a setting across all configurations
|
75
|
-
#
|
76
|
-
# t.all_configurations.settings["INFO_PLIST"] = "./myapp/info.plist"
|
77
|
-
#
|
78
|
-
# @return [Configuration] configuration for the shared settings
|
79
|
-
#
|
80
|
-
def all_configurations
|
81
|
-
@all_configuration ||= Configuration.new(:all)
|
82
|
-
end
|
83
|
-
|
84
57
|
# This either finds a release configuration
|
85
58
|
# with the same name or creates one.
|
86
59
|
#
|
@@ -102,28 +75,37 @@ module Xcake
|
|
102
75
|
private
|
103
76
|
|
104
77
|
def build_configuration(method, name, &block)
|
105
|
-
|
78
|
+
case method
|
79
|
+
when :debug
|
80
|
+
configuration_name = debug_configurations
|
81
|
+
default_settings = default_debug_settings
|
82
|
+
when :release
|
83
|
+
configuration_name = release_configurations
|
84
|
+
default_settings = default_release_settings
|
85
|
+
end
|
86
|
+
|
106
87
|
if name.nil?
|
107
|
-
|
88
|
+
build_configuration = configuration_name.first
|
108
89
|
else
|
109
|
-
|
90
|
+
build_configuration = configuration_name.detect do |c|
|
110
91
|
c.name == name.to_s
|
111
92
|
end
|
112
93
|
end
|
113
94
|
|
114
|
-
if
|
95
|
+
if build_configuration.nil?
|
115
96
|
if name.nil?
|
116
97
|
name = method.to_s[0].upcase + method.to_s[1..-1]
|
117
98
|
end
|
118
99
|
|
119
|
-
|
100
|
+
build_configuration = Configuration.new(name) do |b|
|
101
|
+
b.settings.merge!(default_settings)
|
120
102
|
block.call(b) if block_given?
|
121
103
|
end
|
122
104
|
|
123
|
-
configuration_name <<
|
105
|
+
configuration_name << build_configuration
|
124
106
|
end
|
125
107
|
|
126
|
-
|
108
|
+
build_configuration
|
127
109
|
end
|
128
110
|
end
|
129
111
|
end
|
@@ -18,7 +18,9 @@ module Xcake
|
|
18
18
|
# @example Using Supported Devices
|
19
19
|
#
|
20
20
|
# Target.new do |t|
|
21
|
-
# t.all_configurations.
|
21
|
+
# t.all_configurations.each do |c|
|
22
|
+
# c.supported_devices = :ipad_only
|
23
|
+
# end
|
22
24
|
# end
|
23
25
|
#
|
24
26
|
def supported_devices=(devices)
|
@@ -21,7 +21,7 @@ module Xcake
|
|
21
21
|
def create_build_configurations_for(configuration_object)
|
22
22
|
puts "Creating build configurations for #{configuration_object}..."
|
23
23
|
|
24
|
-
configuration_object.
|
24
|
+
configuration_object.all_configurations.each do |configuration|
|
25
25
|
puts "Creating build configuration #{configuration.name} for #{configuration_object}..."
|
26
26
|
|
27
27
|
build_configuration = @context.native_object_for(configuration)
|
data/lib/xcake/project/sugar.rb
CHANGED
@@ -63,8 +63,13 @@ module Xcake
|
|
63
63
|
t.deployment_target = host_target.deployment_target
|
64
64
|
t.language = host_target.language
|
65
65
|
|
66
|
-
|
67
|
-
t.all_configurations.
|
66
|
+
host_path = "#{host_target.name}.app/#{host_target.name}"
|
67
|
+
t.all_configurations.each do |c|
|
68
|
+
c.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_path}"
|
69
|
+
end
|
70
|
+
t.all_configurations.each do |c|
|
71
|
+
c.settings["BUNDLE_LOADER"] = "$(TEST_HOST)"
|
72
|
+
end
|
68
73
|
|
69
74
|
block.call(t) if block_given?
|
70
75
|
end
|
@@ -18,13 +18,13 @@ application_for :ios, 8.0 do |target|
|
|
18
18
|
|
19
19
|
#Update these with the details of your app
|
20
20
|
target.name = "YourApp"
|
21
|
-
target.all_configurations.product_bundle_identifier = "com.yourcompany.yourapp"
|
21
|
+
target.all_configurations.each { |c| c.product_bundle_identifier = "com.yourcompany.yourapp"}
|
22
22
|
|
23
23
|
# Uncomment to target iPhone devices only
|
24
24
|
#
|
25
25
|
# File patterns can be seen here https://guides.cocoapods.org/syntax/podspec.html#group_file_patterns
|
26
26
|
#
|
27
|
-
#target.all_configurations.supported_devices = :iphone_only
|
27
|
+
#target.all_configurations.each { |c| .supported_devices = :iphone_only}
|
28
28
|
|
29
29
|
# Uncomment this to include additional files
|
30
30
|
#
|
@@ -38,13 +38,13 @@ application_for :ios, 8.0 do |target|
|
|
38
38
|
|
39
39
|
# Uncomment to set your own build settings
|
40
40
|
#
|
41
|
-
#target.all_configurations.settings["ENABLE_BITCODE"] = "NO"
|
42
|
-
#target.all_configurations.settings["GCC_PREFIX_HEADER"] = "APP-Prefix-Header.pch"
|
43
|
-
#target.all_configurations.settings["SWIFT_OBJC_BRIDGING_HEADER"] = "APP-Bridging-Header.h"
|
41
|
+
#target.all_configurations.each { |c| c.settings["ENABLE_BITCODE"] = "NO"}
|
42
|
+
#target.all_configurations.each { |c| c.settings["GCC_PREFIX_HEADER"] = "APP-Prefix-Header.pch"}
|
43
|
+
#target.all_configurations.each { |c| c.settings["SWIFT_OBJC_BRIDGING_HEADER"] = "APP-Bridging-Header.h"}
|
44
44
|
|
45
45
|
# Uncomment to define your own preprocessor macros
|
46
46
|
#
|
47
|
-
#target.all_configurations.preprocessor_definitions["API_ENDPOINT"] = "https://example.org".to_obj_c
|
47
|
+
#target.all_configurations.each { |c| c.preprocessor_definitions["API_ENDPOINT"] = "https://example.org".to_obj_c}
|
48
48
|
|
49
49
|
# Comment to remove Unit Tests for your app
|
50
50
|
#
|
data/lib/xcake/version.rb
CHANGED
data/xcake.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.4.0"
|
28
28
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
|
+
spec.add_development_dependency "rubocop", "~> 0.39.0"
|
29
30
|
spec.add_development_dependency "yard", "~> 0.8"
|
30
31
|
spec.add_development_dependency "pry", "~> 0.10"
|
31
32
|
spec.add_dependency "claide", "~> 0.9.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.39.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.39.0
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: yard
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|