xcjobs 0.0.8 → 0.0.9

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: 76f457f4567b683a3bf3a2b6d1242a065319703e
4
- data.tar.gz: 5667d8fc64b19fcd08a53d8628374fd1cd88e449
3
+ metadata.gz: 854a4e676d81275ecd1a5f140c0e740cad40d901
4
+ data.tar.gz: 43ca2fe387752c504a8fe0a204dcb122ffdcc03c
5
5
  SHA512:
6
- metadata.gz: ad1e183858cf11f23d63c9ea3d4f1a3150935d8b3081cf482d68bf15b593dcd72b76a80faca87d7dfffe8bd1d12f944e8dba96b0c5bd35c7fcb2762bc528a181
7
- data.tar.gz: 069934a3bf57309a10d06d440ba305592246a1d3fe9fa7b384ebcf7df2cd48e05e4d6333095fd70266196c524849c265555b214158669cbdf1ae66776ab3a68e
6
+ metadata.gz: dbf197109b70fadb5a95cfebd27496e91b25dfaaf94c8735a06dbab4fb01036548c88dd24926e2c3987f71776d9cf386ce4fe31afaf539fac996bde15f063286
7
+ data.tar.gz: 93fcddbb1eb2541e436bda39867db30d3c6f7b050d265256ccfcd2ecbf78412361a360673e228d1fc46771431baeda1c7768d36ae6608a3c86a32656cb6f9a57
@@ -185,6 +185,15 @@ module XCJobs
185
185
  attr_accessor :identifier
186
186
  attr_accessor :notes
187
187
  attr_accessor :notes_type
188
+ attr_accessor :notify
189
+ attr_accessor :status
190
+ attr_accessor :tags
191
+ attr_accessor :teams
192
+ attr_accessor :users
193
+ attr_accessor :mandatory
194
+ attr_accessor :commit_sha
195
+ attr_accessor :build_server_url
196
+ attr_accessor :repository_url
188
197
 
189
198
  def initialize()
190
199
  yield self if block_given?
@@ -208,6 +217,15 @@ module XCJobs
208
217
  fields[:dsym] = "@#{dsym}" if dsym
209
218
  fields[:notes] = notes if notes
210
219
  fields[:notes_type] = notes_type if notes_type
220
+ fields[:notify] = notify if notify
221
+ fields[:status] = status if status
222
+ fields[:tags] = tags.join(',') if tags
223
+ fields[:teams] = teams.join(',') if teams
224
+ fields[:users] = users.join(',') if users
225
+ fields[:mandatory] = mandatory if mandatory
226
+ fields[:commit_sha] = commit_sha if commit_sha
227
+ fields[:build_server_url] = build_server_url if build_server_url
228
+ fields[:repository_url] = repository_url if repository_url
211
229
  end
212
230
  end
213
231
 
@@ -1,3 +1,3 @@
1
1
  module XCJobs
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  require 'rake/tasklib'
2
2
  require 'rake/clean'
3
3
  require 'open3'
4
+ require 'shellwords'
4
5
  require_relative 'helper'
5
6
 
6
7
  module XCJobs
@@ -229,8 +230,10 @@ module XCJobs
229
230
  raise 'archive action requires specifying a scheme' unless scheme
230
231
  raise 'cannot specify both a scheme and targets' if scheme && target
231
232
 
232
- CLEAN.include(build_dir) if build_dir
233
- CLOBBER.include(build_dir) if build_dir
233
+ if build_dir
234
+ CLEAN.include(build_dir)
235
+ CLOBBER.include(build_dir)
236
+ end
234
237
 
235
238
  desc 'make xcarchive'
236
239
  namespace :build do
@@ -241,8 +244,12 @@ module XCJobs
241
244
 
242
245
  run(['xcodebuild', 'archive'] + options)
243
246
 
244
- sh %[(cd "#{build_dir}"; zip -ryq "dSYMs.zip" #{File.join("#{scheme}.xcarchive", "dSYMs")})] if build_dir && scheme
245
- sh %[(cd "#{build_dir}"; zip -ryq #{scheme}.xcarchive.zip #{scheme}.xcarchive)] if build_dir && scheme
247
+ if build_dir && scheme
248
+ bd = build_dir.shellescape
249
+ s = scheme.shellescape
250
+ sh %[(cd #{bd}; zip -ryq dSYMs.zip #{File.join("#{s}.xcarchive", "dSYMs")})]
251
+ sh %[(cd #{bd}; zip -ryq #{s}.xcarchive.zip #{s}.xcarchive)]
252
+ end
246
253
  end
247
254
  end
248
255
  end
@@ -262,6 +262,15 @@ describe XCJobs::Distribute do
262
262
  t.identifier = credentials[:identifier]
263
263
  t.notes = notes
264
264
  t.notes_type = 1
265
+ t.notify = 2
266
+ t.status = 1
267
+ t.tags = ['tag1', 'tag2', 'tag3']
268
+ t.teams = ['12', '23', '42']
269
+ t.users = ['1224', '5678']
270
+ t.mandatory = 1
271
+ t.commit_sha = '0eb0a329c523bb110b13523d48f19dd612ad77f6'
272
+ t.build_server_url = 'http://build-server-url.example.com'
273
+ t.repository_url = 'https://github.com/kishikawakatsumi/xcjobs'
265
274
  end
266
275
  end
267
276
 
@@ -289,6 +298,42 @@ describe XCJobs::Distribute do
289
298
  expect(task.notes_type).to eq 1
290
299
  end
291
300
 
301
+ it 'configures the notify' do
302
+ expect(task.notify).to eq 2
303
+ end
304
+
305
+ it 'configures the status' do
306
+ expect(task.status).to eq 1
307
+ end
308
+
309
+ it 'configures the tags' do
310
+ expect(task.tags).to eq ['tag1', 'tag2', 'tag3']
311
+ end
312
+
313
+ it 'configures the teams' do
314
+ expect(task.teams).to eq ['12', '23', '42']
315
+ end
316
+
317
+ it 'configures the users' do
318
+ expect(task.users).to eq ['1224', '5678']
319
+ end
320
+
321
+ it 'configures the mandatory' do
322
+ expect(task.mandatory).to eq 1
323
+ end
324
+
325
+ it 'configures the commit_sha' do
326
+ expect(task.commit_sha).to eq '0eb0a329c523bb110b13523d48f19dd612ad77f6'
327
+ end
328
+
329
+ it 'configures the build_server_url' do
330
+ expect(task.build_server_url).to eq 'http://build-server-url.example.com'
331
+ end
332
+
333
+ it 'configures the repository_url' do
334
+ expect(task.repository_url).to eq 'https://github.com/kishikawakatsumi/xcjobs'
335
+ end
336
+
292
337
  describe 'tasks' do
293
338
  describe 'distribute:hockeyapp' do
294
339
  subject { Rake.application['distribute:hockeyapp'] }
@@ -301,6 +346,15 @@ describe XCJobs::Distribute do
301
346
  dsym: "@#{dsym_file}",
302
347
  notes: notes,
303
348
  notes_type: 1,
349
+ notify: 2,
350
+ status: 1,
351
+ tags: 'tag1,tag2,tag3',
352
+ teams: '12,23,42',
353
+ users: '1224,5678',
354
+ mandatory: 1,
355
+ commit_sha: '0eb0a329c523bb110b13523d48f19dd612ad77f6',
356
+ build_server_url: 'http://build-server-url.example.com',
357
+ repository_url: 'https://github.com/kishikawakatsumi/xcjobs',
304
358
  })
305
359
  expect(@header).to eq({
306
360
  "X-HockeyAppToken" => credentials[:token]
@@ -385,6 +385,10 @@ describe XCJobs::Xcodebuild do
385
385
  expect(task.configuration).to eq 'Release'
386
386
  end
387
387
 
388
+ it 'configures the build directory' do
389
+ expect(task.build_dir).to eq('build')
390
+ end
391
+
388
392
  describe 'tasks' do
389
393
  describe 'build:archive' do
390
394
  subject { Rake.application['build:archive'] }
@@ -392,8 +396,8 @@ describe XCJobs::Xcodebuild do
392
396
  it 'executes the appropriate commands' do
393
397
  subject.invoke
394
398
  expect(@commands).to eq [ 'xcodebuild archive -project Example.xcodeproj -scheme Example -configuration Release -derivedDataPath build CONFIGURATION_TEMP_DIR=build/temp -archivePath build/Example',
395
- '(cd "build"; zip -ryq "dSYMs.zip" Example.xcarchive/dSYMs)',
396
- '(cd "build"; zip -ryq Example.xcarchive.zip Example.xcarchive)',
399
+ '(cd build; zip -ryq dSYMs.zip Example.xcarchive/dSYMs)',
400
+ '(cd build; zip -ryq Example.xcarchive.zip Example.xcarchive)',
397
401
  ]
398
402
  end
399
403
  end
@@ -457,13 +461,13 @@ describe XCJobs::Xcodebuild do
457
461
 
458
462
  if ENV['CI']
459
463
  expect(@commands).to eq [ 'xcodebuild archive -workspace Example.xcworkspace -scheme Example -configuration Release -derivedDataPath build CONFIGURATION_TEMP_DIR=build/temp CODE_SIGN_IDENTITY=iPhone Distribution: kishikawa katsumi -archivePath build/Example',
460
- '(cd "build"; zip -ryq "dSYMs.zip" Example.xcarchive/dSYMs)',
461
- '(cd "build"; zip -ryq Example.xcarchive.zip Example.xcarchive)',
464
+ '(cd build; zip -ryq dSYMs.zip Example.xcarchive/dSYMs)',
465
+ '(cd build; zip -ryq Example.xcarchive.zip Example.xcarchive)',
462
466
  ]
463
467
  else
464
468
  expect(@commands).to eq [ 'xcodebuild archive -workspace Example.xcworkspace -scheme Example -configuration Release -derivedDataPath build CONFIGURATION_TEMP_DIR=build/temp CODE_SIGN_IDENTITY=iPhone Distribution: kishikawa katsumi PROVISIONING_PROFILE=5d09b88d-ff09-43aa-a6fd-3907f98fe467 -archivePath build/Example',
465
- '(cd "build"; zip -ryq "dSYMs.zip" Example.xcarchive/dSYMs)',
466
- '(cd "build"; zip -ryq Example.xcarchive.zip Example.xcarchive)',
469
+ '(cd build; zip -ryq dSYMs.zip Example.xcarchive/dSYMs)',
470
+ '(cd build; zip -ryq Example.xcarchive.zip Example.xcarchive)',
467
471
  ]
468
472
  end
469
473
  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.8
4
+ version: 0.0.9
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-26 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler