cocoaseeds 0.5.3 → 0.6.0
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 +12 -0
- data/lib/cocoaseeds/core.rb +22 -3
- data/lib/cocoaseeds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 886c78815e21ba590aa79fc3de8747fa5368571f
|
4
|
+
data.tar.gz: 0dfaa0809236b86c81e3a408c6cdfe5b1743375a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a198e29c1ff5f71c2ef9c76bc52ef90118e2f4902a595689249654ed8a7d39e0d742d92ab24a0c7e96c3150029aac7c3a29ba9c7bfa8993a69abfab1c9b681
|
7
|
+
data.tar.gz: d4102131c54cb2bdb7ba23a476601f89044ac6ee47aae69db8e406cc401bc02672f8622305d0f78d46fb0a0d13c76ef2b7aa4f9298f6bdf472a25d13d036cd35
|
data/README.md
CHANGED
@@ -86,6 +86,18 @@ target :MyAppTest do
|
|
86
86
|
end
|
87
87
|
```
|
88
88
|
|
89
|
+
#### Specifying Xcode project file path
|
90
|
+
|
91
|
+
If the .xcodeproj file is located in other location, you can specify the path in Seedfile.
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
xcodeproj "path/to/Project.xcodeproj"
|
95
|
+
|
96
|
+
target :MyApp do
|
97
|
+
github "devxoul/JLToast", "1.2.5", :files => "JLToast/*.{swift,h}"
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
89
101
|
### 2. Install dependencies
|
90
102
|
|
91
103
|
After you are done with your Seedfile, it's time to load those libraries into your project. This is pretty simple. Just open the terminal, cd to your project directory and execute `seed install` command.
|
data/lib/cocoaseeds/core.rb
CHANGED
@@ -126,10 +126,9 @@ module Seeds
|
|
126
126
|
def prepare_requirements
|
127
127
|
# .xcodeproj
|
128
128
|
project_filename = Dir.glob("#{root_path}/*.xcodeproj")[0]
|
129
|
-
if
|
130
|
-
|
129
|
+
if project_filename
|
130
|
+
self.project = Xcodeproj::Project.open(project_filename)
|
131
131
|
end
|
132
|
-
self.project = Xcodeproj::Project.open(project_filename)
|
133
132
|
|
134
133
|
# Seedfile
|
135
134
|
begin
|
@@ -186,6 +185,17 @@ module Seeds
|
|
186
185
|
@swift_seedname_prefix = true
|
187
186
|
end
|
188
187
|
|
188
|
+
# Set current Xcode project with given path.
|
189
|
+
#
|
190
|
+
# @!scope method
|
191
|
+
# @!visibility private
|
192
|
+
#
|
193
|
+
def xcodeproj(path)
|
194
|
+
proejct_filename = File.join(self.root_path, path)
|
195
|
+
self.project = Xcodeproj::Project.open(proejct_filename)
|
196
|
+
self.validate_project
|
197
|
+
end
|
198
|
+
|
189
199
|
# Sets `@current_target_name` and executes code block.
|
190
200
|
#
|
191
201
|
# @param [String] names The name of target.
|
@@ -194,6 +204,7 @@ module Seeds
|
|
194
204
|
# @!visibility private
|
195
205
|
#
|
196
206
|
def target(*names, &code)
|
207
|
+
self.validate_project
|
197
208
|
names.each do |name|
|
198
209
|
name = name.to_s # use string instead of symbol
|
199
210
|
target = self.project.target_named(name)
|
@@ -216,6 +227,7 @@ module Seeds
|
|
216
227
|
# @!visibility private
|
217
228
|
#
|
218
229
|
def github(repo, tag, options={})
|
230
|
+
self.validate_project
|
219
231
|
if not @current_target_name # apply to all targets
|
220
232
|
target *self.project.targets.map(&:name) do
|
221
233
|
send(__callee__, repo, tag, options)
|
@@ -262,6 +274,7 @@ module Seeds
|
|
262
274
|
# @!visibility private
|
263
275
|
#
|
264
276
|
def bitbucket(repo, tag, options={})
|
277
|
+
self.validate_project
|
265
278
|
if not @current_target_name # apply to all targets
|
266
279
|
target *self.project.targets.map(&:name) do
|
267
280
|
send(__callee__, repo, tag, options)
|
@@ -567,6 +580,12 @@ module Seeds
|
|
567
580
|
File.write(self.lockfile_path, YAML.dump(tree))
|
568
581
|
end
|
569
582
|
|
583
|
+
def validate_project
|
584
|
+
if self.project.nil?
|
585
|
+
raise Seeds::Exception.new "Couldn't find .xcodeproj file."
|
586
|
+
end
|
587
|
+
end
|
588
|
+
|
570
589
|
# Prints a message if {#mute} is `false`.
|
571
590
|
#
|
572
591
|
# @see #mute
|
data/lib/cocoaseeds/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoaseeds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suyeol Jeon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|