xcody 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4023268bebc9e06fd29c6e37687bd5294fc41046
4
- data.tar.gz: 00a430254300ec07cc7f2ca4269dad778de5b586
3
+ metadata.gz: 9ac0fa3c20884071677bd9bd9bc580348fa18935
4
+ data.tar.gz: 4a90b5617c948a388c7284e4e0972e969879555a
5
5
  SHA512:
6
- metadata.gz: 1f4928669f0c16c443d529183b39ee816e316803b14fb8d3d8cbe05022bae9decdf37176d357d3ec535579229a6e2878abca5fa433a362637bc180be07b54fc2
7
- data.tar.gz: 9623d87e90de13b080e0aa890286abffd1d6869a38d94e4572fc922eeddfd7a3d882aab26753600d5ff1a5afc7ef876fd7da6e3721db584bbe3e505f5efd70b4
6
+ metadata.gz: 42102563b27e5346cf9ab20a7a3b9fce6290009057fd2077a276df6a20c66dc8b5388eb20d788720b38f295098f56a6462e0cd8cbb3ea49cbeea95dbd3bb234e
7
+ data.tar.gz: c4db84832e6a42f5257b5f30c668e74bc0002f16ea43baadab8ea15e0b170d1f5f057e2a91650d19091a2d54c3daa1e5cf6678977450e1b56d4ef7622ad31091
data/README.md CHANGED
@@ -24,6 +24,12 @@ Or install it yourself as:
24
24
 
25
25
  ```
26
26
  # Build "your_project.xcodeproj"
27
+ log_file = "file/to/path.log"
28
+
29
+ Xcody.new.xcode_build.project("your_project.xcodeproj").build.run(log_file, true)
30
+
31
+ or
32
+
27
33
  Xcody.new.xcode_build.project("your_project.xcodeproj").build.run
28
34
  ```
29
35
 
@@ -164,17 +164,17 @@ class Xcody
164
164
  @xcode_build_cmd = ""
165
165
  end
166
166
 
167
- def run(log_file = "./tmp/build_log.txt")
167
+ def run(log_file = "./tmp/build_log.txt", verb = false)
168
168
  puts "running with #{@xcode_build_cmd.inspect}"
169
169
 
170
- run_command @xcode_build_cmd, log_file
170
+ run_command @xcode_build_cmd, log_file, verb
171
171
  end
172
172
 
173
- def xcpretty(log_file = "./tmp/build_log.txt", option = [])
173
+ def xcpretty(log_file = "./tmp/build_log.txt", option = [], verb = false)
174
174
  command = @xcode_build_cmd.concat(%( | xcpretty )).concat(option.join(" "))
175
175
  puts "running with #{command}"
176
176
 
177
- run_command command, log_file
177
+ run_command command, log_file, verb
178
178
  end
179
179
 
180
180
  private
@@ -183,18 +183,20 @@ class Xcody
183
183
  `xcode-select -p 2> /dev/null`.strip.sub(%r{/Contents/Developer\z}, "")
184
184
  end
185
185
 
186
- def run_command(command, log_file)
186
+ def run_command(command, log_file, verb = false)
187
187
  log_file_dir = Pathname.new(log_file).dirname
188
188
  FileUtils.mkdir_p(log_file_dir)
189
189
 
190
190
  out_with_err, status = Open3.capture2e command
191
+
192
+ puts out_with_err if verb
193
+
191
194
  exit_code = status.exitstatus
192
195
  case exit_code
193
196
  when 0
194
197
  File.write(log_file, out_with_err)
195
198
  puts "Build success. Logfile is in #{log_file}"
196
199
  else
197
- File.write(log_file, out_with_err)
198
200
  File.write(log_file, out_with_err)
199
201
  puts "Exit build with error status: #{exit_code}"
200
202
  end
@@ -1,3 +1,3 @@
1
1
  class Xcody
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-17 00:00:00.000000000 Z
11
+ date: 2016-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcpretty