xcody 0.1.0 → 0.2.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 +8 -3
- data/lib/xcody.rb +22 -0
- data/lib/xcody/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: d0bf4fd8ef5313140981d5b3fc7090f36bc3f4ea
|
4
|
+
data.tar.gz: 5fdbdf31338cadfa49b124c76a521b61cb25b4c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49de766173aaf12008ef0cf7fb80247ab98d5fead5d1865721cbfe2e6ec5bc734790d58bba4c41d00c0ed2e79bbd440b308ce5a7a6f7c4245fc39b8557bca44d
|
7
|
+
data.tar.gz: 0d3ec459fbc1944ceaba5106e411b5af05ac4808d2566c10419e343b61407c53ed4320f32bc541b9c79b0d6d90b486aa608c30d0730ef46bedd489aeff284373
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Xcody
|
2
2
|
|
3
|
-
|
3
|
+
Simple wrapper for Xcode commands with Ruby.
|
4
|
+
Please use other library if you would like to use rich features.
|
5
|
+
e.g. https://github.com/CocoaPods/Xcodeproj
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -20,11 +22,14 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
|
25
|
+
```
|
26
|
+
# Build "your_project.xcodeproj"
|
27
|
+
Xcody.new.xcode_build.project("your_project.xcodeproj").build.run
|
28
|
+
```
|
24
29
|
|
25
30
|
## Contributing
|
26
31
|
|
27
|
-
1. Fork it ( https://github.com/
|
32
|
+
1. Fork it ( https://github.com/KazuCocoa/xcody/fork )
|
28
33
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
34
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
35
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/xcody.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "xcody/version"
|
2
2
|
require "pathname"
|
3
|
+
require "fileutils"
|
4
|
+
require "Open3"
|
3
5
|
|
4
6
|
class Xcody
|
5
7
|
def initialize
|
@@ -155,12 +157,32 @@ class Xcody
|
|
155
157
|
# @return [String] xcode build command
|
156
158
|
def build
|
157
159
|
@xcode_build_cmd.concat(%( build))
|
160
|
+
self
|
158
161
|
end
|
159
162
|
|
160
163
|
def clear_cmd
|
161
164
|
@xcode_build_cmd = ""
|
162
165
|
end
|
163
166
|
|
167
|
+
def run(log_file = "./tmp/build_log.txt")
|
168
|
+
puts "running with #{@xcode_build_cmd.inspect}"
|
169
|
+
|
170
|
+
log_file_dir = Pathname.new(log_file).dirname
|
171
|
+
FileUtils.mkdir_p(log_file_dir)
|
172
|
+
|
173
|
+
out_with_err, status = Open3.capture2e(@xcode_build_cmd)
|
174
|
+
exit_code = status.exitstatus
|
175
|
+
case exit_code
|
176
|
+
when 0
|
177
|
+
File.write(log_file, out_with_err)
|
178
|
+
puts "Build success. Logfile is in #{log_file}"
|
179
|
+
else
|
180
|
+
File.write(log_file, out_with_err)
|
181
|
+
File.write(log_file, out_with_err)
|
182
|
+
puts "Exit build with error status: #{exit_code}"
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
164
186
|
private
|
165
187
|
|
166
188
|
def xcode_path
|
data/lib/xcody/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcody
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Simple Xcode command wrapper
|
14
14
|
email:
|