xcjobs 0.0.6 → 0.0.7

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: fa2ca15377b59c6a3fe73d1aad2f4ef14511e3e8
4
- data.tar.gz: 9cd9a4f8dd1a8f2ab9888d76fe5753baad89af5c
3
+ metadata.gz: e6b499b7d8707eaf6a61042e33d345dc207c2697
4
+ data.tar.gz: a80560d7918206203c7e66647b3ea66640fac2b7
5
5
  SHA512:
6
- metadata.gz: e207db9d73f1d33d3c88cf3e0731cdb099c2cf4ea0d2f2d74c2e1d7d102e4211949b4c1725b51ed38890b2fe3a6e7be43219f875b5a61005358fe75f72e74e87
7
- data.tar.gz: afe3af894b8d54827ba0f0c863cf76fc59c5d5ba179a3a9d36d6da2523655ddba61e6b92dea00e0283439d6312a71aa64a03cf99e3a5c2c2c14c2169b824882a
6
+ metadata.gz: db219848a537f19c8390a5cc61fed225334137b50d668c44918f40f6f44d312052c6178f497bdb398a54e042e44c72506b4d3cf97c55da84d89de34fb9dd61aa
7
+ data.tar.gz: 09e96ba95bec3886b4d4b5d9b6c0b041a3ee0d23efa97d293e0ab9f23b584a0c72018b181a7f25f5e61cb2b95dedb419d0fbc369ffdc2d9cde57125a50cbaec0
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # XCJobs
2
2
  [![Gem Version](https://badge.fury.io/rb/xcjobs.svg)](http://badge.fury.io/rb/xcjobs) [![Build Status](https://travis-ci.org/kishikawakatsumi/xcjobs.svg?branch=master)](https://travis-ci.org/kishikawakatsumi/xcjobs) [![Coverage Status](https://img.shields.io/coveralls/kishikawakatsumi/xcjobs.svg)](https://coveralls.io/r/kishikawakatsumi/xcjobs?branch=master) [![Code Climate](https://codeclimate.com/github/kishikawakatsumi/xcjobs/badges/gpa.svg)](https://codeclimate.com/github/kishikawakatsumi/xcjobs) [![Dependency Status](https://gemnasium.com/kishikawakatsumi/xcjobs.svg)](https://gemnasium.com/kishikawakatsumi/xcjobs)
3
3
 
4
-
5
4
  Support the automation of release process of iOS/OSX apps with CI
6
5
 
7
6
  ## Installation
@@ -26,12 +25,12 @@ Or install it yourself as:
26
25
 
27
26
  ```ruby
28
27
  XCJobs::Test.new do |t|
29
- t.workspace = "Example"
30
- t.scheme = "Example"
31
- t.configuration = "Release"
32
- t.add_destination("name=iPad 2,OS=7.1")
33
- t.add_destination("name=iPad Air,OS=8.1")
34
- t.formatter = "xcpretty -c"
28
+ t.workspace = 'Example'
29
+ t.scheme = 'Example'
30
+ t.configuration = 'Release'
31
+ t.add_destination('name=iPad 2,OS=7.1')
32
+ t.add_destination('name=iPad Air,OS=8.1')
33
+ t.formatter = 'xcpretty -c'
35
34
  end
36
35
  ```
37
36
 
@@ -51,12 +50,12 @@ xcodebuild test -workspace Example.xcworkspace -scheme Example -sdk iphonesimula
51
50
 
52
51
  ```ruby
53
52
  XCJobs::Build.new do |t|
54
- t.workspace = "Example"
55
- t.scheme = "Example"
56
- t.configuration = "Release"
57
- t.signing_identity = "iPhone Distribution: kishikawa katsumi"
58
- t.build_dir = "build"
59
- t.formatter = "xcpretty -c"
53
+ t.workspace = 'Example'
54
+ t.scheme = 'Example'
55
+ t.configuration = 'Release'
56
+ t.signing_identity = 'iPhone Distribution: Katsumi Kishikawa'
57
+ t.build_dir = 'build'
58
+ t.formatter = 'xcpretty -c'
60
59
  end
61
60
  ```
62
61
 
@@ -76,19 +75,19 @@ xcodebuild build -workspace Example.xcworkspace -scheme Example -configuration R
76
75
 
77
76
  ```ruby
78
77
  XCJobs::Archive.new do |t|
79
- t.workspace = "Example"
80
- t.scheme = "Example"
81
- t.configuration = "Release"
82
- t.signing_identity = "iPhone Distribution: kishikawa katsumi"
83
- t.build_dir = "build"
84
- t.formatter = "xcpretty -c"
78
+ t.workspace = 'Example'
79
+ t.scheme = 'Example'
80
+ t.configuration = 'Release'
81
+ t.signing_identity = 'iPhone Distribution: Katsumi Kishikawa'
82
+ t.build_dir = 'build'
83
+ t.formatter = 'xcpretty -c'
85
84
  end
86
85
 
87
86
  XCJobs::Export.new do |t|
88
- t.archive_path = File.join("build", "Example.xcarchive")
89
- t.export_path = File.join("build", "Example.ipa")
90
- t.export_provisioning_profile = "Ad_Hoc.mobileprovision"
91
- t.formatter = "xcpretty -c"
87
+ t.archive_path = File.join('build', 'Example.xcarchive')
88
+ t.export_path = File.join('build', 'Example.ipa')
89
+ t.export_provisioning_profile = 'Ad_Hoc.mobileprovision'
90
+ t.formatter = 'xcpretty -c'
92
91
  end
93
92
  ```
94
93
 
@@ -115,20 +114,31 @@ xcodebuild -exportArchive -exportFormat IPA -archivePath build/Example.xcarchive
115
114
 
116
115
  ```ruby
117
116
  XCJobs::Distribute::Crittercism.new do |t|
118
- t.app_id = "xxx..."
119
- t.key = "xxx..."
120
- t.dsym = File.join("build", "dSYMs.zip")
117
+ t.app_id = 'xxx...'
118
+ t.key = 'xxx...'
119
+ t.dsym = File.join('build', 'dSYMs.zip')
121
120
  end
122
121
 
123
122
  XCJobs::Distribute::TestFlight.new do |t|
124
- t.file = File.join("build", "#{Example}.ipa")
125
- t.api_token = "xxx..."
126
- t.team_token = "xxx..."
123
+ t.file = File.join('build', "#{Example}.ipa")
124
+ t.api_token = 'xxx...'
125
+ t.team_token = 'xxx...'
127
126
  t.notify = true
128
127
  t.replace = true
129
- t.distribution_lists = "Dev"
128
+ t.distribution_lists = 'Dev'
130
129
  t.notes = "Uploaded: #{DateTime.now.strftime("%Y/%m/%d %H:%M:%S")}"
131
130
  end
131
+
132
+ XCJobs::Distribute::DeployGate.new do |t|
133
+ t.owner_name = 'kishikawakatsumi'
134
+ t.file = File.join('build', "#{Example}.ipa")
135
+ t.token = 'xxx...'
136
+ t.message = "Uploaded: #{DateTime.now.strftime("%Y/%m/%d %H:%M:%S")}" # optional
137
+ t.distribution_key = 'xxx...' # optional
138
+ t.release_note = '...' # optional
139
+ t.disable_notify = false # optional
140
+ t.visibility = 'public' # optional
141
+ end
132
142
  ```
133
143
 
134
144
  ```shell
@@ -136,6 +146,7 @@ $ rake -T
136
146
 
137
147
  rake distribute:crittercism # upload dSYMs to Crittercism
138
148
  rake distribute:testflight # upload IPA to TestFlight
149
+ rake distribute:deploygate # upload IPA to DeployGate
139
150
  ```
140
151
 
141
152
  ### Install/Remove certificates (For Travis CI)
@@ -150,8 +161,8 @@ XCJobs::Certificate.new do |t|
150
161
  t.add_certificate('./certificates/adhoc.cer')
151
162
  t.add_certificate('./certificates/adhoc.p12', passphrase)
152
163
 
153
- t.add_profile("AppStore")
154
- t.add_profile("Ad Hoc")
164
+ t.add_profile('AppStore')
165
+ t.add_profile('Ad Hoc')
155
166
  end
156
167
  ```
157
168
 
@@ -168,7 +179,7 @@ rake certificates:remove # remove certificates
168
179
 
169
180
  ```ruby
170
181
  XCJobs::InfoPlist::Version.new do |t|
171
- t.path = File.join("Example", "Info.plist")
182
+ t.path = File.join('Example', 'Info.plist')
172
183
  end
173
184
  ```
174
185
 
@@ -184,6 +195,28 @@ rake version:set_build_number # Sets build version to number of commits
184
195
  rake version:set_build_version # Sets build version to last git commit hash
185
196
  ```
186
197
 
198
+ ### Measuring code coverage
199
+
200
+ ```ruby
201
+ XCJobs::Test.new('test:ios') do |t|
202
+ t.workspace = 'Example'
203
+ t.scheme = 'Example'
204
+ t.configuration = 'Release'
205
+ t.add_destination('name=iPhone 5s,OS=8.1')
206
+ t.coverage = true # enable code coverage
207
+ t.formatter = 'xcpretty -c'
208
+ end
209
+ ```
210
+
211
+ ### Send coverage report to Coveralls
212
+
213
+ ```ruby
214
+ XCJobs::Coverage::Coveralls.new() do |t|
215
+ t.add_extension('.m')
216
+ t.add_exclude('Example')
217
+ end
218
+ ```
219
+
187
220
  ## Automate with Travis CI
188
221
 
189
222
  ```ruby
@@ -38,7 +38,11 @@ module XCJobs
38
38
  sh %[security create-keychain -p "" "#{keychain_name}"]
39
39
 
40
40
  @certificates.each do |certificate, passphrase|
41
- sh %[security import "#{certificate}" -k "#{keychain_name}" -P "#{passphrase}" -T /usr/bin/codesign]
41
+ puts %[security import "#{certificate}" -k #{keychain_name} -P "********" -T /usr/bin/codesign]
42
+ out, status = Open3.capture2(*(['security', 'import', "#{certificate}", '-k', "#{keychain_name}", '-P', "#{passphrase}", '-T', '/usr/bin/codesign']))
43
+ if !status.success?
44
+ fail'failed to import keychain'
45
+ end
42
46
  end
43
47
 
44
48
  sh %[security default-keychain -s "#{keychain_name}"]
@@ -141,7 +141,7 @@ module XCJobs
141
141
  end
142
142
 
143
143
  def write_report(report)
144
- temp = Tempfile.new('report')
144
+ temp = Tempfile.new('coveralls')
145
145
  temp.puts(report.to_json)
146
146
  temp.path
147
147
  end
@@ -1,3 +1,3 @@
1
1
  module XCJobs
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcjobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kishikawa katsumi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-01 00:00:00.000000000 Z
11
+ date: 2015-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler