xcake 0.6.22 → 0.6.23

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
  SHA1:
3
- metadata.gz: 12859d445783f2e2a40fea70164a1f630ce36533
4
- data.tar.gz: 37d241806844ab53332346567127a596b5640f7e
3
+ metadata.gz: 4cd5d71c3ac6a1f9f2c04fd05d10c70c14194f98
4
+ data.tar.gz: 1955097615457d19444a8d39c2012f69e8401875
5
5
  SHA512:
6
- metadata.gz: b2518df409472db361955d32a12f339e00fdc1b4c5ce00683fcb2f0cb5bcdf93030c910ce0513f642c298ba9dfaf7bf778d584ac66b651010e4f332fa2772bf4
7
- data.tar.gz: 1dc004d966679cb4105dbe8294ad76c7eaa4cb003142701626984c38b61cfad12817594c3a9ec535381b6ec9599bf601877232c6416b3c8a76b01246cfa3cc93
6
+ metadata.gz: a562a1e293bebe3b982ed04203de827bf998d937d1d8d9762e88c0d93c90981cafafb875e8979956f5e639020d27bb6f89d69ac75a98f2f0d203866419da3d78
7
+ data.tar.gz: f05d12ca029db9a1911bc5dbcac92ec1b464e7e658554b65b27169a54075d15ac8c6b66625064cc231705b5035aaaeaef92f87e0fa8e5cb1f48a9581ac4b7211
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v0.6.23
2
+ =======
3
+ - Adds support for Localized Files.
4
+ - Swift is no-longer optimized for debug configurations when Xcake is ran with
5
+ older versions of Xcodeproj.
6
+
1
7
  v0.6.22
2
8
  =======
3
9
  - Fixes crash with `after_save` hook.
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcake (0.6.20)
4
+ xcake (0.6.23)
5
+ activesupport (< 5)
5
6
  claide (>= 0.9.1, < 2.0)
6
7
  cork
7
8
  hooks (~> 0.4.1)
@@ -16,15 +17,15 @@ GEM
16
17
  minitest (~> 5.1)
17
18
  thread_safe (~> 0.3, >= 0.3.4)
18
19
  tzinfo (~> 1.1)
19
- ast (2.2.0)
20
+ ast (2.3.0)
20
21
  claide (1.0.0)
21
22
  coderay (1.1.1)
22
23
  colored (1.2)
23
24
  cork (0.1.0)
24
25
  colored (~> 1.2)
25
- coveralls (0.8.13)
26
- json (~> 1.8)
27
- simplecov (~> 0.11.0)
26
+ coveralls (0.8.14)
27
+ json (>= 1.8, < 3)
28
+ simplecov (~> 0.12.0)
28
29
  term-ansicolor (~> 1.3)
29
30
  thor (~> 0.19.1)
30
31
  tins (~> 1.6.0)
@@ -36,7 +37,7 @@ GEM
36
37
  json (1.8.3)
37
38
  method_source (0.8.2)
38
39
  minitest (5.9.0)
39
- parser (2.3.1.0)
40
+ parser (2.3.1.2)
40
41
  ast (~> 2.2)
41
42
  powerpack (0.1.1)
42
43
  pry (0.10.3)
@@ -58,8 +59,8 @@ GEM
58
59
  diff-lcs (>= 1.2.0, < 2.0)
59
60
  rspec-support (~> 3.4.0)
60
61
  rspec-support (3.4.1)
61
- rubocop (0.40.0)
62
- parser (>= 2.3.1.0, < 3.0)
62
+ rubocop (0.41.1)
63
+ parser (>= 2.3.1.1, < 3.0)
63
64
  powerpack (~> 0.1)
64
65
  rainbow (>= 1.99.1, < 3.0)
65
66
  ruby-progressbar (~> 1.7)
@@ -67,9 +68,9 @@ GEM
67
68
  rubocop-git (0.1.1)
68
69
  rubocop (>= 0.24.1)
69
70
  ruby-progressbar (1.8.1)
70
- simplecov (0.11.2)
71
+ simplecov (0.12.0)
71
72
  docile (~> 1.1.0)
72
- json (~> 1.8)
73
+ json (>= 1.8, < 3)
73
74
  simplecov-html (~> 0.10.0)
74
75
  simplecov-html (0.10.0)
75
76
  slop (3.6.0)
@@ -81,12 +82,12 @@ GEM
81
82
  tzinfo (1.2.2)
82
83
  thread_safe (~> 0.1)
83
84
  uber (0.0.15)
84
- unicode-display_width (1.0.5)
85
- xcodeproj (1.0.0)
85
+ unicode-display_width (1.1.0)
86
+ xcodeproj (1.1.0)
86
87
  activesupport (>= 3)
87
88
  claide (>= 1.0.0, < 2.0)
88
89
  colored (~> 1.2)
89
- yard (0.8.7.6)
90
+ yard (0.9.0)
90
91
 
91
92
  PLATFORMS
92
93
  ruby
@@ -102,4 +103,4 @@ DEPENDENCIES
102
103
  yard (~> 0.8)
103
104
 
104
105
  BUNDLED WITH
105
- 1.11.2
106
+ 1.12.5
@@ -41,3 +41,8 @@ This document describes the level of support Xcake has for the various aspects o
41
41
 
42
42
  - No manual control. For Application targets, xcake creates them based on the configurations for those targets (i.e "myApp-Debug". "myApp-Release")
43
43
  - Xcode auto-creates them currently for other target types.
44
+
45
+ ## Files
46
+
47
+ - Can Include Normal Files
48
+ - Can Include Localized Files
@@ -1,3 +1,5 @@
1
+ require 'pathname'
2
+
1
3
  module Xcake
2
4
  # This generator handles adding nodes
3
5
  # to the project and creating a build phase
@@ -45,10 +47,34 @@ module Xcake
45
47
  # @!group Visitable
46
48
 
47
49
  def visit_node(node)
48
- native_group = @context.native_object_for(node)
49
50
 
50
- file_reference = native_group[node.component] ||
51
- native_group.new_reference(node.component)
51
+ # Tweak this to respect localizable files
52
+ #
53
+ # If ".lproj" is in file path
54
+ # - Create variant group from File Component
55
+ # - Files added to this group should have their path to be relative from
56
+ # the first non-variatn group
57
+ #
58
+ # Otherwise normal behaviour
59
+ native_group = @context.native_object_for(node.parent)
60
+
61
+ # Make sure this is the correct parent in variant groups
62
+ #
63
+ # TODO: Remove this duplication of the .lproj and node path code.
64
+ # Also remove need for the name hack.
65
+ if node.parent.component.include?(".lproj")
66
+ native_group.name = node.component
67
+ group_path = Pathname.new node.parent.parent.path
68
+ else
69
+ group_path = Pathname.new node.parent.path
70
+ end
71
+
72
+ file_path = Pathname.new node.path
73
+
74
+ node_location = file_path.relative_path_from group_path
75
+ file_reference = native_group.new_reference(node_location)
76
+
77
+ ######
52
78
 
53
79
  node.targets.each do |t|
54
80
  add_file_reference_to_target(file_reference, t)
data/lib/xcake/project.rb CHANGED
@@ -95,7 +95,7 @@ module Xcake
95
95
 
96
96
  def default_settings
97
97
  common_settings = Xcodeproj::Constants::PROJECT_DEFAULT_BUILD_SETTINGS
98
- settings = Xcodeproj::Project::ProjectHelper.deep_dup(common_settings[:all])
98
+ Xcodeproj::Project::ProjectHelper.deep_dup(common_settings[:all])
99
99
  end
100
100
 
101
101
  def default_debug_settings
data/lib/xcake/target.rb CHANGED
@@ -233,6 +233,8 @@ module Xcake
233
233
 
234
234
  # TODO: Move this to a constant, maybe Xcodeproj ones should be brought
235
235
  # into here?
236
+ #
237
+ # Perhaps these could be made into a Gem itself?
236
238
  def default_settings
237
239
  {
238
240
  'INFOPLIST_FILE' => "#{name}/Supporting Files/Info.plist"
@@ -245,7 +247,11 @@ module Xcake
245
247
  platform,
246
248
  deployment_target.to_s,
247
249
  type,
248
- language).merge!(default_settings)
250
+ language)
251
+ .merge!(default_settings)
252
+ .merge({
253
+ 'SWIFT_OPTIMIZATION_LEVEL' => '-Onone'
254
+ })
249
255
  end
250
256
 
251
257
  def default_release_settings
data/lib/xcake/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xcake
2
- VERSION = '0.6.22'.freeze
2
+ VERSION = '0.6.23'.freeze
3
3
  end
@@ -125,12 +125,27 @@ module Xcake
125
125
  # TODO: Simplify this method figure out more reliable rules for group
126
126
  # generation - maybe part of the new file installer in 0.7.
127
127
  #
128
+ # As well as variant groups and other types of groups.
129
+ #
128
130
  def new_group(node)
129
- return main_group unless node.parent
130
131
 
131
- group = main_group unless node.parent
132
- group = main_group.find_subpath(node.parent.path, true) unless group
133
- ensure_parent_path(group, node.parent)
132
+ return main_group unless node
133
+
134
+ if node.component.include?(".lproj")
135
+
136
+ group = main_group.find_subpath(node.parent.path, true) unless group
137
+
138
+ variant_group = group.project.new(PBXVariantGroup)
139
+ variant_group.set_source_tree(:group)
140
+ group.children << variant_group
141
+
142
+ group = variant_group
143
+ else
144
+ group = main_group.find_subpath(node.path, true) unless group
145
+ end
146
+
147
+ #TODO: Does this work with this new system
148
+ ensure_parent_path(group, node)
134
149
 
135
150
  group
136
151
  end
data/xcake.gemspec CHANGED
@@ -32,4 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency 'hooks', '~> 0.4.1'
33
33
  spec.add_dependency 'xcodeproj', '< 2.0.0', '>= 0.20'
34
34
  spec.add_dependency 'cork'
35
+
36
+ # Lock `activesupport` (transitive depedency via `xcodeproj`) to keep supporting system ruby
37
+ spec.add_dependency 'activesupport', '< 5'
35
38
  end
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.22
4
+ version: 0.6.23
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-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -176,6 +176,20 @@ dependencies:
176
176
  - - ">="
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
+ - !ruby/object:Gem::Dependency
180
+ name: activesupport
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "<"
184
+ - !ruby/object:Gem::Version
185
+ version: '5'
186
+ type: :runtime
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - "<"
191
+ - !ruby/object:Gem::Version
192
+ version: '5'
179
193
  description: Create your Xcode projects automatically using a stupid simple DSL.
180
194
  email:
181
195
  - james@supmenow.com