simctl 1.6.2 → 1.6.3

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/.rubocop_todo.yml +80 -0
  4. data/.travis.yml +5 -4
  5. data/CHANGELOG.md +4 -0
  6. data/Gemfile.lock +20 -3
  7. data/README.md +3 -3
  8. data/fastlane-plugin-simctl/.gitignore +11 -0
  9. data/fastlane-plugin-simctl/.rspec +3 -0
  10. data/fastlane-plugin-simctl/.rubocop.yml +263 -0
  11. data/fastlane-plugin-simctl/Gemfile +6 -0
  12. data/fastlane-plugin-simctl/README.md +46 -0
  13. data/fastlane-plugin-simctl/Rakefile +9 -0
  14. data/fastlane-plugin-simctl/fastlane-plugin-simctl.gemspec +29 -0
  15. data/fastlane-plugin-simctl/fastlane/Fastfile +9 -0
  16. data/fastlane-plugin-simctl/fastlane/Pluginfile +1 -0
  17. data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl.rb +16 -0
  18. data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/actions/simctl_action.rb +51 -0
  19. data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/helper/simctl_helper.rb +52 -0
  20. data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/version.rb +5 -0
  21. data/fastlane-plugin-simctl/spec/simctl_action_spec.rb +4 -0
  22. data/fastlane-plugin-simctl/spec/spec_helper.rb +15 -0
  23. data/lib/simctl.rb +1 -1
  24. data/lib/simctl/command/create.rb +3 -2
  25. data/lib/simctl/command/delete.rb +1 -1
  26. data/lib/simctl/command/erase.rb +0 -2
  27. data/lib/simctl/command/io.rb +3 -3
  28. data/lib/simctl/command/launch.rb +6 -6
  29. data/lib/simctl/command/list.rb +8 -6
  30. data/lib/simctl/command/reset.rb +2 -2
  31. data/lib/simctl/command/spawn.rb +4 -2
  32. data/lib/simctl/command/terminate.rb +4 -4
  33. data/lib/simctl/command/warmup.rb +3 -3
  34. data/lib/simctl/device.rb +14 -14
  35. data/lib/simctl/device_launchctl.rb +3 -3
  36. data/lib/simctl/device_path.rb +18 -7
  37. data/lib/simctl/device_settings.rb +5 -5
  38. data/lib/simctl/device_type.rb +1 -1
  39. data/lib/simctl/executor.rb +3 -3
  40. data/lib/simctl/list.rb +6 -6
  41. data/lib/simctl/object.rb +1 -1
  42. data/lib/simctl/runtime.rb +2 -2
  43. data/lib/simctl/version.rb +1 -1
  44. data/lib/simctl/xcode/path.rb +10 -4
  45. data/lib/simctl/xcode/version.rb +3 -3
  46. data/simctl.gemspec +3 -1
  47. data/spec/simctl/device_interaction_spec.rb +11 -11
  48. data/spec/simctl/executor_spec.rb +1 -1
  49. data/spec/simctl/list_spec.rb +6 -2
  50. data/spec/simctl/readme_spec.rb +5 -5
  51. data/spec/simctl/warmup_spec.rb +1 -1
  52. data/spec/spec_helper.rb +9 -13
  53. metadata +33 -2
@@ -10,7 +10,7 @@ RSpec.describe SimCtl::Executor do
10
10
  json = SimCtl::Executor.execute(["echo '{\"foo\":\"bar\"}'"]) do |result|
11
11
  result
12
12
  end
13
- expect(json).to eql({'foo' => 'bar'})
13
+ expect(json).to eql('foo' => 'bar')
14
14
  end
15
15
 
16
16
  it 'returns a string' do
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  RSpec.describe SimCtl do
4
4
  describe '#devicetype' do
5
5
  it 'find device type by name' do
6
- expect(SimCtl.devicetype(name: 'iPhone 5')).to be_kind_of SimCtl::DeviceType
6
+ expect(SimCtl.devicetype(name: 'iPhone 6')).to be_kind_of SimCtl::DeviceType
7
7
  end
8
8
 
9
9
  it 'raise exception if device type is not found' do
@@ -77,7 +77,11 @@ RSpec.describe SimCtl do
77
77
  end
78
78
 
79
79
  it 'finds the latest runtime' do
80
- if SimCtl::Xcode::Version.gte?('8.2')
80
+ if SimCtl::Xcode::Version.gte?('9.0')
81
+ expect(SimCtl::Runtime.latest(:ios).version).to be == '11.0'
82
+ elsif SimCtl::Xcode::Version.gte?('8.3')
83
+ expect(SimCtl::Runtime.latest(:ios).version).to be == '10.3.1'
84
+ elsif SimCtl::Xcode::Version.gte?('8.2')
81
85
  expect(SimCtl::Runtime.latest(:ios).version).to be == '10.2'
82
86
  elsif SimCtl::Xcode::Version.gte?('8.1')
83
87
  expect(SimCtl::Runtime.latest(:ios).version).to be == '10.1'
@@ -5,24 +5,24 @@ RSpec.describe SimCtl do
5
5
  # Select the iOS 9.3 runtime
6
6
  runtime = SimCtl.runtime(name: 'iOS 9.3')
7
7
 
8
- # Select the iPhone 5 device type
9
- devicetype = SimCtl.devicetype(name: 'iPhone 5')
8
+ # Select the iPhone 6 device type
9
+ devicetype = SimCtl.devicetype(name: 'iPhone 6')
10
10
 
11
11
  # Create a new device
12
- device = SimCtl.create_device 'Unit Tests @ iPhone 5 9.3', devicetype, runtime
12
+ device = SimCtl.create_device 'Unit Tests @ iPhone 6 9.3', devicetype, runtime
13
13
 
14
14
  # Launch a new Simulator.app instance
15
15
  device.launch
16
16
 
17
17
  # Wait for the device to be booted
18
- device.wait {|d| d.state == :booted}
18
+ device.wait { |d| d.state == :booted }
19
19
 
20
20
  # Kill the Simulator.app instance again
21
21
  device.shutdown
22
22
  device.kill
23
23
 
24
24
  # Wait until it did shutdown
25
- device.wait {|d| d.state == :shutdown}
25
+ device.wait { |d| d.state == :shutdown }
26
26
 
27
27
  # Delete the device
28
28
  device.delete
@@ -8,7 +8,7 @@ RSpec.describe SimCtl do
8
8
  end
9
9
 
10
10
  it 'warms up and returns a device for given objects' do
11
- devicetype = SimCtl.devicetype(name: 'iPhone 5')
11
+ devicetype = SimCtl.devicetype(name: 'iPhone 6')
12
12
  runtime = SimCtl::Runtime.latest(:ios)
13
13
  expect(SimCtl.warmup(devicetype, runtime)).to be_kind_of SimCtl::Device
14
14
  end
@@ -5,18 +5,16 @@ SimpleCov.start do
5
5
  end
6
6
  Coveralls.wear!
7
7
 
8
- $LOAD_PATH.push File.expand_path("../../lib", __FILE__)
8
+ $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
9
9
  require File.dirname(__FILE__) + '/../lib/simctl.rb'
10
10
 
11
- if ENV['TRAVIS']
12
- SimCtl.default_timeout = 300
13
- else
14
- SimCtl.default_timeout = 60
15
- end
11
+ SimCtl.default_timeout = if ENV['TRAVIS']
12
+ 300
13
+ else
14
+ 60
15
+ end
16
16
 
17
- unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
18
- SimCtl.device_set_path = Dir.mktmpdir 'foo bar'
19
- end
17
+ SimCtl.device_set_path = Dir.mktmpdir 'foo bar' if ENV['CUSTOM_DEVICE_SET_PATH']
20
18
 
21
19
  RSpec.configure do |config|
22
20
  config.tty = true
@@ -30,9 +28,7 @@ RSpec.configure do |config|
30
28
  end
31
29
 
32
30
  def with_rescue(&block)
33
- begin
34
- block.class
35
- rescue
36
- end
31
+ block.class
32
+ rescue
37
33
  end
38
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Plunien
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2018-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: CFPropertyList
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +103,8 @@ extra_rdoc_files: []
89
103
  files:
90
104
  - ".coveralls.yml"
91
105
  - ".gitignore"
106
+ - ".rubocop.yml"
107
+ - ".rubocop_todo.yml"
92
108
  - ".travis.yml"
93
109
  - CHANGELOG.md
94
110
  - Gemfile
@@ -96,6 +112,21 @@ files:
96
112
  - LICENSE
97
113
  - README.md
98
114
  - Rakefile
115
+ - fastlane-plugin-simctl/.gitignore
116
+ - fastlane-plugin-simctl/.rspec
117
+ - fastlane-plugin-simctl/.rubocop.yml
118
+ - fastlane-plugin-simctl/Gemfile
119
+ - fastlane-plugin-simctl/README.md
120
+ - fastlane-plugin-simctl/Rakefile
121
+ - fastlane-plugin-simctl/fastlane-plugin-simctl.gemspec
122
+ - fastlane-plugin-simctl/fastlane/Fastfile
123
+ - fastlane-plugin-simctl/fastlane/Pluginfile
124
+ - fastlane-plugin-simctl/lib/fastlane/plugin/simctl.rb
125
+ - fastlane-plugin-simctl/lib/fastlane/plugin/simctl/actions/simctl_action.rb
126
+ - fastlane-plugin-simctl/lib/fastlane/plugin/simctl/helper/simctl_helper.rb
127
+ - fastlane-plugin-simctl/lib/fastlane/plugin/simctl/version.rb
128
+ - fastlane-plugin-simctl/spec/simctl_action_spec.rb
129
+ - fastlane-plugin-simctl/spec/spec_helper.rb
99
130
  - lib/simctl.rb
100
131
  - lib/simctl/command.rb
101
132
  - lib/simctl/command/boot.rb