crafter 0.1.5 → 0.1.5.1
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/README.md +39 -19
- data/craft.gemspec +2 -2
- data/lib/crafter.rb +13 -2
- data/lib/project_helper.rb +13 -0
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc49cf08eba8abec79094e89442dae6e7a5de177
|
4
|
+
data.tar.gz: 8a9b67270b46bb881b357ee34c0a1b7bf5735d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b5051ff0b84787f08df1855961820b457a1102fa5cce0d280807eedb925eb85b03a1d577c9a9e2908e4aa334e98fea4eb17e28352965cba60d6f19993321f6
|
7
|
+
data.tar.gz: 329d35cfa7ac3eb5b4900305e2d8a8d8de360142590b78462ce1fd37100df6fc4e82dd2d355c4b1944d83d7d6efd9f9d872c2c5b297891f2c71b1b17562dfa24
|
data/README.md
CHANGED
@@ -33,24 +33,44 @@ Crafter.configure do
|
|
33
33
|
|
34
34
|
# set of options, warnings, static analyser and anything else normal xcode treats as build options
|
35
35
|
set_options %w(
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
36
|
+
RUN_CLANG_STATIC_ANALYZER
|
37
|
+
GCC_TREAT_WARNINGS_AS_ERRORS
|
38
|
+
)
|
39
|
+
|
40
|
+
# set shared build settings
|
41
|
+
set_build_settings({
|
42
|
+
:'WARNING_CFLAGS' => %w(
|
43
|
+
-Weverything
|
44
|
+
-Wno-objc-missing-property-synthesis
|
45
|
+
-Wno-unused-macros
|
46
|
+
-Wno-disabled-macro-expansion
|
47
|
+
-Wno-gnu-statement-expression
|
48
|
+
-Wno-language-extension-token
|
49
|
+
-Wno-overriding-method-mismatch
|
50
|
+
).join(" ")
|
51
|
+
})
|
52
|
+
|
53
|
+
# and configuration specific ones
|
54
|
+
set_build_settings({
|
55
|
+
:'BUNDLE_ID_SUFFIX' => '.dev',
|
56
|
+
:'BUNDLE_DISPLAY_NAME_SUFFIX' => 'dev'
|
57
|
+
}, configuration: :debug)
|
58
|
+
|
59
|
+
set_build_settings({
|
60
|
+
:'BUNDLE_ID_SUFFIX' => '.adhoc',
|
61
|
+
:'BUNDLE_DISPLAY_NAME_SUFFIX' => 'adhoc'
|
62
|
+
}, configuration: :adhoc)
|
63
|
+
|
64
|
+
set_build_settings({
|
65
|
+
:'BUNDLE_ID_SUFFIX' => '',
|
66
|
+
:'BUNDLE_DISPLAY_NAME_SUFFIX' => ''
|
67
|
+
}, configuration: :release)
|
68
|
+
|
69
|
+
|
70
|
+
# set non boolean options
|
71
|
+
set_build_settings ({
|
72
|
+
:'OTHER_CFLAGS' => '-Wall'
|
73
|
+
})
|
54
74
|
|
55
75
|
# target specific options, :default is just a name for you, feel free to call it whatever you like
|
56
76
|
with :default do
|
@@ -132,7 +152,7 @@ Send me your thoughts, I'm [merowing_ on twitter][7]
|
|
132
152
|
|
133
153
|
#### Acknowledgements:
|
134
154
|
|
135
|
-
[The App Business][1] (the company I
|
155
|
+
[The App Business][1] (the company I worked for) for supporting my idea.
|
136
156
|
|
137
157
|
to [@alloy][2], [@orta][3], [@romainbriche][4] - for taking some of their valuable time and sharing their thoughts about beta version.
|
138
158
|
|
data/craft.gemspec
CHANGED
@@ -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 = 'crafter'
|
6
|
-
gem.version = '0.1.5'
|
6
|
+
gem.version = '0.1.5.1'
|
7
7
|
gem.authors = ['Krzysztof Zabłocki']
|
8
8
|
gem.email = ['merowing2@gmail.com']
|
9
9
|
gem.description = %q{CLI for setting up new Xcode projects. Inspired by thoughtbot liftoff.}
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.homepage = 'https://github.com/krzysztofzablocki/crafter'
|
12
12
|
gem.license = 'MIT'
|
13
13
|
|
14
|
-
gem.add_dependency 'xcodeproj', '~> 0.
|
14
|
+
gem.add_dependency 'xcodeproj', '~> 0.5.5'
|
15
15
|
gem.add_dependency 'highline', '~> 1.6'
|
16
16
|
|
17
17
|
gem.files = `git ls-files`.split($/)
|
data/lib/crafter.rb
CHANGED
@@ -17,6 +17,7 @@ module Crafter
|
|
17
17
|
@targets = {}
|
18
18
|
@add_git_ignore = false
|
19
19
|
@platforms = []
|
20
|
+
@build_settings = {}
|
20
21
|
|
21
22
|
def configure(&block)
|
22
23
|
instance_eval &block
|
@@ -54,10 +55,15 @@ module Crafter
|
|
54
55
|
@options = options
|
55
56
|
end
|
56
57
|
|
58
|
+
def set_build_settings(build_settings, configuration: 'crafter_common')
|
59
|
+
@build_settings[configuration] = build_settings
|
60
|
+
end
|
61
|
+
|
57
62
|
def setup_project
|
58
63
|
process_optional()
|
59
|
-
process_configurations()
|
60
|
-
process_options()
|
64
|
+
process_configurations() if @configuration && !@configuration.empty?
|
65
|
+
process_options() if @options && !@options.empty?
|
66
|
+
process_build_settings() if @build_settings && !@build_settings.empty?
|
61
67
|
process_git() if @add_git_ignore
|
62
68
|
process_pods()
|
63
69
|
process_scripts()
|
@@ -77,6 +83,11 @@ module Crafter
|
|
77
83
|
self.project.enable_options(@options)
|
78
84
|
end
|
79
85
|
|
86
|
+
def process_build_settings
|
87
|
+
puts 'set specified values for build settings'
|
88
|
+
self.project.set_build_settings(@build_settings)
|
89
|
+
end
|
90
|
+
|
80
91
|
def process_git
|
81
92
|
puts 'preparing git ignore'
|
82
93
|
GitHelper.new.generate_files
|
data/lib/project_helper.rb
CHANGED
@@ -17,6 +17,19 @@ class ProjectHelper
|
|
17
17
|
save_changes
|
18
18
|
end
|
19
19
|
|
20
|
+
def set_build_settings(build_settings)
|
21
|
+
@project.build_configurations.each do |configuration|
|
22
|
+
build_settings.each do |configuration_name, settings|
|
23
|
+
if configuration_name.to_s.downcase == "crafter_common" || configuration.name.downcase == configuration_name.to_s.downcase
|
24
|
+
settings.each do |key, value|
|
25
|
+
configuration.build_settings[key] = value
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
save_changes
|
31
|
+
end
|
32
|
+
|
20
33
|
def add_shell_script(target, name, script)
|
21
34
|
if target.shell_script_build_phases.to_a.index { |phase| phase.name == name }
|
22
35
|
puts "Skipping adding \"#{name}\" script for target #{target} as it already exist"
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crafter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5
|
4
|
+
version: 0.1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Zabłocki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: highline
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.6'
|
41
41
|
description: CLI for setting up new Xcode projects. Inspired by thoughtbot liftoff.
|
@@ -65,12 +65,12 @@ require_paths:
|
|
65
65
|
- lib
|
66
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
@@ -80,3 +80,4 @@ signing_key:
|
|
80
80
|
specification_version: 4
|
81
81
|
summary: Define your craft rules once, then apply it to all your Xcode projects.
|
82
82
|
test_files: []
|
83
|
+
has_rdoc:
|