briar 1.1.7 → 1.1.8

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: 6c900760300e6b8089db885afd3b1cc602100edb
4
- data.tar.gz: 7a80b3e0528c91657b0f27c9edfff0cefdb3b716
3
+ metadata.gz: 4f4d348c554ed014075e44cc0c77614a138e3279
4
+ data.tar.gz: 0b7c50194d16e9f05ad1a053620d02b4115a65f7
5
5
  SHA512:
6
- metadata.gz: 88144454f2568ae8d330736478b93df221ed554b07c8e6d465caf0fede7fc44a10bde851ed63024558026bea76b405c978fc021e3db3e9ea8a9830afd0391311
7
- data.tar.gz: 9a921cb5ce6a723773ecb54ccefbe4262095edf8cc79e712e143ae252284d6d16ed2fba202c14dbb0d14ed84e4d6bdcdd368d5b7c912d46d971eed603ea71db0
6
+ metadata.gz: bd41d59f1aebd1c043c8c32c840ee520597d6b177626eae6c5c00200a6cce8f22d1263b59d6b7dd377c532c46310561e4deb3a63bc1448a65bc7a80b16b16591
7
+ data.tar.gz: bf800aab4b0f7203dc9d28306f95775aa290a04aab54da4f25f98141df53ab3b4fdd4a1ce0b5429b643ba2d30b1a1211c92525a6b2b611597316409d902a2181
data/.guardrc CHANGED
@@ -1 +1,2 @@
1
- Guard.options[:clear] = true
1
+ # Configure the Pry interactor here.
2
+ # https://github.com/guard/guard/wiki/Configuration-files
data/.rspec CHANGED
@@ -1,5 +1,5 @@
1
1
  --color
2
- --warnings
2
+ #--warnings
3
3
  #--backtrace
4
4
  --format documentation
5
5
  --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ ### 1.1.6
2
+
3
+ * Tracking issues on pivotal: https://www.pivotaltracker.com/n/projects/1255750
4
+ * #36 briar resign can resign .ipas with swift dylibs
5
+
6
+ ### 1.1.5
7
+
8
+ * Improves iOS 8 alert and sheet handling.
9
+
10
+ ### 1.1.2
11
+
12
+ * Bump calabash version to ~> 0.10
13
+ * Adds support for targeting XTC series.
14
+ * Can now wait run xtc as async or sync.
15
+ * Adjusts how and when bundler is called when submitted an XTC job.
16
+
17
+ ### 1.1.1
18
+
19
+ Bad release; see 1.1.2.
20
+
21
+ ### 1.1.0
22
+
23
+ * Improves `briar install [device]` and `briar xtc` commands.
24
+ * Drop support for ruby 1.8.7. The minimum version is 1.9.3.
25
+ * #8 added language keys for Danish and Thai @crishoj
26
+ * #12 briar now retries ideviceinstaller commands on failures
27
+ * #13 briar xtc command now executes all commands in the context of `bundle exec`
28
+ * #14 briar is dropping support for ruby 1.8.7
29
+
data/Guardfile ADDED
@@ -0,0 +1,18 @@
1
+ notification :growl, sticky: false, priority: 0
2
+ logger level: :info
3
+ clearing :on
4
+
5
+ guard 'bundler' do
6
+ watch('Gemfile')
7
+ watch(/^.+\.gemspec/)
8
+ end
9
+
10
+ # NOTE: This Guardfile only watches unit specs.
11
+ # Automatically running the integration specs would repeatedly launch the
12
+ # simulator, stealing screen focus and making everyone cranky.
13
+ guard :rspec, cmd: 'bundle exec rspec', spec_paths: ['spec/lib'] do
14
+ watch(%r{^spec/.+_spec\.rb$})
15
+ watch(%r{^lib/run_loop/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
16
+ watch('spec/spec_helper.rb') { 'spec/lib' }
17
+ #watch('spec/resources.rb') { 'spec/lib' }
18
+ end
data/bin/briar_resign.rb CHANGED
@@ -5,6 +5,9 @@ require 'CFPropertyList'
5
5
  require 'rexml/document'
6
6
  require 'tmpdir'
7
7
  require 'find'
8
+ require 'open3'
9
+ require 'briar/environment'
10
+ require 'dotenv'
8
11
 
9
12
  def msg(title, &block)
10
13
  puts "\n" + '-'*10 + title + '-'*10
@@ -13,9 +16,11 @@ def msg(title, &block)
13
16
  end
14
17
 
15
18
  def briar_resign(args)
16
- if args.length < 4
19
+ Dotenv.load
20
+
21
+ if args.length < 1
17
22
  msg('Usage') do
18
- puts 'briar resign </path/to/your.ipa> </path/to/your.mobileprovision> <wildcard-prefix> <signing-identity> [new-bundle-identifier]'
23
+ puts 'briar resign /path/to/your.ipa {/path/to/your.mobileprovision | BRIAR_MOBILE_PROFILE} {team-identifier | BRIAR_TEAM_IDENTIFIER} {signing-identity | BRIAR_SIGNING_IDENTITY} [new-bundle-identifier]'
19
24
  end
20
25
  exit 1
21
26
  end
@@ -35,7 +40,7 @@ def briar_resign(args)
35
40
  exit 1
36
41
  end
37
42
 
38
- mobile_prov = args[1]
43
+ mobile_prov = args[1] || Briar::Environment.variable('BRIAR_MOBILE_PROFILE')
39
44
  unless mobile_prov.end_with?('.mobileprovision')
40
45
  msg('Error') do
41
46
  puts 'second arg must be a path to a mobileprovision'
@@ -50,7 +55,7 @@ def briar_resign(args)
50
55
  exit 1
51
56
  end
52
57
 
53
- wildcard = args[2]
58
+ wildcard = args[2] || Briar::Environment.variable('BRIAR_TEAM_IDENTIFIER')
54
59
  unless wildcard.length == 10
55
60
  msg 'error' do
56
61
  puts "'#{wildcard}' must have 10 characters eg 'RWTD8QPG2C'"
@@ -65,7 +70,7 @@ def briar_resign(args)
65
70
  exit 1
66
71
  end
67
72
 
68
- signing_id = args[3]
73
+ signing_id = args[3] || Briar::Environment.variable('BRIAR_SIGNING_IDENTITY')
69
74
  msg ('Info') do
70
75
  puts "will resign with identity '#{signing_id}'"
71
76
  end
@@ -236,27 +241,28 @@ def resign_ipa(options)
236
241
  file.puts '</plist>'
237
242
  end
238
243
 
239
- # did _not_ work
240
- #entitlements = CFPropertyList::List.new(:file => ios_entitlements_path)
241
- #data = CFPropertyList.native_types(entitlements.value)
242
- #data['application-identifier']= "#{wildcard}.#{app_id}"
243
- #data['keychain-access-groups']=["#{wildcard}.#{app_id}"]
244
- #data['get-task-allow'] = true
245
- #
246
- #
247
- #plist = CFPropertyList::List.new
248
- #plist.value = CFPropertyList.guess(data)
249
- #plist.save(ios_entitlements_path, CFPropertyList::List::FORMAT_XML)
250
- #puts "INFO: saved new entitlements to '#{ios_entitlements_path}'"
251
-
252
- sign_cmd = "codesign -f -s \"#{options[:id]}\" -vv \"#{abs_app_path}\" --entitlements \"#{ios_entitlements_path}\""
253
- puts "INFO: signing with '#{sign_cmd}'"
254
-
255
- unless system(sign_cmd)
256
- msg 'error' do
257
- puts 'could not sign application'
244
+ Dir.glob("#{abs_app_path}/**/*").each do |file|
245
+ unless File.directory?(file)
246
+ cmd = "xcrun otool -h \"#{file}\""
247
+ Open3.popen3(cmd) do |_, stderr, _, _|
248
+ err = stderr.read.strip
249
+ unless err[/is not an object file/,0]
250
+ sign_cmd = "xcrun codesign --verbose=4 --deep -f -s \"#{options[:id]}\" \"#{file}\" --entitlements \"#{ios_entitlements_path}\""
251
+ puts "INFO: signing with '#{sign_cmd}'"
252
+ Open3.popen3(sign_cmd) do |_, stdout, stderr, wait_thr|
253
+ out = stdout.read.strip
254
+ err = stderr.read.strip
255
+ puts out
256
+ exit_status = wait_thr.value
257
+ if exit_status == 0
258
+ else
259
+ puts err
260
+ exit 1
261
+ end
262
+ end
263
+ end
264
+ end
258
265
  end
259
- exit 1
260
266
  end
261
267
 
262
268
  unless system("rm -rf '#{ipa}'")
@@ -270,9 +276,15 @@ def resign_ipa(options)
270
276
 
271
277
  FileUtils.cd(work_dir) do
272
278
 
273
- unless system("zip -qr #{File.basename(options[:ipa])} Payload")
279
+ if Dir.exist?(File.join(work_dir, 'SwiftSupport'))
280
+ zip_input = 'Payload SwiftSupport'
281
+ else
282
+ zip_input = 'Payload'
283
+ end
284
+
285
+ unless system("zip -qr #{File.basename(options[:ipa])} #{zip_input}")
274
286
  msg 'error' do
275
- puts "could not zip '#{File.basename(options[:ipa])}' from 'Payload'"
287
+ puts "could not zip '#{File.basename(options[:ipa])}' from '#{zip_input}'"
276
288
  end
277
289
  exit 1
278
290
  end
data/lib/briar.rb CHANGED
@@ -39,6 +39,7 @@ AL = :accessibilityLabel
39
39
 
40
40
  require 'calabash-cucumber'
41
41
 
42
+ require 'briar/environment'
42
43
  require 'briar/version'
43
44
  require 'briar/briar_core'
44
45
  require 'briar/uia/briar_uia'
@@ -0,0 +1,12 @@
1
+ module Briar
2
+ class Environment
3
+
4
+ def self.variable(variable_name)
5
+ ENV[variable_name]
6
+ end
7
+
8
+ def self.set_variable(variable_name, value)
9
+ ENV[variable_name] = value
10
+ end
11
+ end
12
+ end
data/lib/briar/irbrc.rb CHANGED
@@ -47,6 +47,7 @@ end
47
47
 
48
48
  puts 'loaded calabash'
49
49
 
50
+ include Briar::Environment
50
51
  include Briar::Bars
51
52
  include Briar::Alerts_and_Sheets
52
53
  include Briar::Control::Button
data/lib/briar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Briar
2
- VERSION = '1.1.7'
2
+ VERSION = '1.1.8'
3
3
  end
@@ -0,0 +1,23 @@
1
+ describe Briar::Environment do
2
+
3
+ let(:variable_name) {'BRIAR_RSPEC_TEST_VARIABLE'}
4
+
5
+ before(:each) {
6
+ ENV.delete(variable_name)
7
+ }
8
+
9
+ describe '.variable' do
10
+ it 'returns value of environment variable' do
11
+ ENV[variable_name] = 'foo'
12
+ expect(Briar::Environment.variable(variable_name)).to be == 'foo'
13
+ end
14
+ end
15
+
16
+ describe '.set_variable' do
17
+ it 'can set value of environment variable' do
18
+ expect(ENV[variable_name]).to be == nil
19
+ Briar::Environment.set_variable(variable_name, 'foo')
20
+ expect(ENV[variable_name]).to be == 'foo'
21
+ end
22
+ end
23
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,11 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
  $LOAD_PATH.unshift File.expand_path('bin', __FILE__)
3
3
  require 'awesome_print'
4
+ require 'briar'
4
5
 
5
6
  # monkey patch for AwesomePrint + objects that implement '=='
7
+ # Can remove once we are using awesome-print 1.6, which means updating
8
+ # calabash-ios to > 0.12.0.
6
9
  module AwesomePrint
7
10
  class Formatter
8
11
  def awesome_self(object, type)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbx-require-relative
@@ -319,8 +319,10 @@ files:
319
319
  - ".guardrc"
320
320
  - ".rspec"
321
321
  - ".travis.yml"
322
+ - CHANGELOG.md
322
323
  - CONTRIBUTING.md
323
324
  - Gemfile
325
+ - Guardfile
324
326
  - LICENSE.txt
325
327
  - README.md
326
328
  - Rakefile
@@ -338,11 +340,6 @@ files:
338
340
  - bin/briar_tags.rb
339
341
  - bin/briar_xtc.rb
340
342
  - briar.gemspec
341
- - changelog/1.1.0.md
342
- - changelog/1.1.1.md
343
- - changelog/1.1.2.md
344
- - changelog/1.1.5.md
345
- - changelog/1.2.0.md
346
343
  - features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
347
344
  - features/step_definitions/alerts_and_sheets/alert_view_steps.rb
348
345
  - features/step_definitions/bars/navbar_steps.rb
@@ -377,6 +374,7 @@ files:
377
374
  - lib/briar/control/slider.rb
378
375
  - lib/briar/cucumber.rb
379
376
  - lib/briar/email.rb
377
+ - lib/briar/environment.rb
380
378
  - lib/briar/image_view.rb
381
379
  - lib/briar/irbrc.rb
382
380
  - lib/briar/keyboard/keyboard.rb
@@ -400,6 +398,7 @@ files:
400
398
  - script/ci/travis/com.apple.dt.instruments.process.analysis.plist
401
399
  - script/ci/travis/com.apple.dt.instruments.process.kill.plist
402
400
  - script/ci/travis/instruments-auth.sh
401
+ - spec/lib/environment_spec.rb
403
402
  - spec/spec_helper.rb
404
403
  homepage: https://github.com/jmoody/briar
405
404
  licenses:
@@ -425,6 +424,6 @@ rubyforge_project:
425
424
  rubygems_version: 2.4.5
426
425
  signing_key:
427
426
  specification_version: 4
428
- summary: briar-1.1.7
427
+ summary: briar-1.1.8
429
428
  test_files: []
430
429
  has_rdoc:
data/changelog/1.1.0.md DELETED
@@ -1,23 +0,0 @@
1
- ## 1.1.0 changelog
2
-
3
- This release improves the `$ briar install < device >` and `$ briar xtc` commands.
4
-
5
- Briar now depends on bundler. Calls to 3rd party gem binaries will be executed in the context of `bundle exec`.
6
-
7
- Briar now requires ruby 1.9.3 or higher. Ruby 1.8.7 is no longer supported.
8
-
9
- ## features
10
-
11
- * [pull 8](https://github.com/jmoody/briar/pull/8) added language keys for Danish and Thai
12
- - thanks @crishoj
13
-
14
- * [pull 12](https://github.com/jmoody/briar/pull/12) briar now retries ideviceinstaller commands on failures
15
-
16
- * [pull 13](https://github.com/jmoody/briar/pull/13) briar xtc command now executes all commands in the context of `bundle exec`
17
-
18
- * [pull 14](https://github.com/jmoody/briar/pull/14) briar is dropping support for ruby 1.8.7
19
-
20
- ## deprecated
21
-
22
- - 1.1.0 `:reinstall` is no longer a valid `ideviceinstaller` command - `:install` will always delete the existing .ipa from the device and reinstall.
23
- - 1.1.0 drops ruby 1.8.7 support
data/changelog/1.1.1.md DELETED
@@ -1,13 +0,0 @@
1
- ## 1.1.1 changelog
2
-
3
- The recommend calabash iOS version is ~> 0.10.
4
-
5
- ## Features
6
-
7
- ### Improvements to `briar xtc`
8
-
9
- * Adds support for targeting XTC series.
10
- * Can now wait run xtc as async or sync.
11
- * Adjusts how and when bundler is called when submitted an XTC job.
12
-
13
- See `$ briar help xtc`.
data/changelog/1.1.2.md DELETED
@@ -1,13 +0,0 @@
1
- ## 1.1.2 changelog
2
-
3
- I goofed. 1.1.1 has a bad gemspec and some critical bugs.
4
-
5
- ## Features
6
-
7
- ### Improvements to `briar xtc`
8
-
9
- * Adds support for targeting XTC series.
10
- * Can now wait run xtc as async or sync.
11
- * Adjusts how and when bundler is called when submitted an XTC job.
12
-
13
- See `$ briar help xtc`.
data/changelog/1.1.5.md DELETED
@@ -1,5 +0,0 @@
1
- ## 1.1.5 changelog
2
-
3
- ## Fixes
4
-
5
- Improves iOS 8 alert and sheet handling.
data/changelog/1.2.0.md DELETED
@@ -1,14 +0,0 @@
1
- ## 1.2.0 changelog
2
-
3
- The recommend calabash iOS version is ~> 0.10.
4
-
5
-
6
- *** @required ***
7
- - [ ] need support for profiles
8
- - [ ] need support for opening consoles against different simulators
9
- - [ ] drop automatic import of features/step_definitions
10
- - [ ] change how rebuilding works in xtc client
11
- - [ ] adopt another logging tool
12
-
13
- *** @optional ***
14
-