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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +80 -0
- data/.travis.yml +5 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +20 -3
- data/README.md +3 -3
- data/fastlane-plugin-simctl/.gitignore +11 -0
- data/fastlane-plugin-simctl/.rspec +3 -0
- data/fastlane-plugin-simctl/.rubocop.yml +263 -0
- data/fastlane-plugin-simctl/Gemfile +6 -0
- data/fastlane-plugin-simctl/README.md +46 -0
- data/fastlane-plugin-simctl/Rakefile +9 -0
- data/fastlane-plugin-simctl/fastlane-plugin-simctl.gemspec +29 -0
- data/fastlane-plugin-simctl/fastlane/Fastfile +9 -0
- data/fastlane-plugin-simctl/fastlane/Pluginfile +1 -0
- data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl.rb +16 -0
- data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/actions/simctl_action.rb +51 -0
- data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/helper/simctl_helper.rb +52 -0
- data/fastlane-plugin-simctl/lib/fastlane/plugin/simctl/version.rb +5 -0
- data/fastlane-plugin-simctl/spec/simctl_action_spec.rb +4 -0
- data/fastlane-plugin-simctl/spec/spec_helper.rb +15 -0
- data/lib/simctl.rb +1 -1
- data/lib/simctl/command/create.rb +3 -2
- data/lib/simctl/command/delete.rb +1 -1
- data/lib/simctl/command/erase.rb +0 -2
- data/lib/simctl/command/io.rb +3 -3
- data/lib/simctl/command/launch.rb +6 -6
- data/lib/simctl/command/list.rb +8 -6
- data/lib/simctl/command/reset.rb +2 -2
- data/lib/simctl/command/spawn.rb +4 -2
- data/lib/simctl/command/terminate.rb +4 -4
- data/lib/simctl/command/warmup.rb +3 -3
- data/lib/simctl/device.rb +14 -14
- data/lib/simctl/device_launchctl.rb +3 -3
- data/lib/simctl/device_path.rb +18 -7
- data/lib/simctl/device_settings.rb +5 -5
- data/lib/simctl/device_type.rb +1 -1
- data/lib/simctl/executor.rb +3 -3
- data/lib/simctl/list.rb +6 -6
- data/lib/simctl/object.rb +1 -1
- data/lib/simctl/runtime.rb +2 -2
- data/lib/simctl/version.rb +1 -1
- data/lib/simctl/xcode/path.rb +10 -4
- data/lib/simctl/xcode/version.rb +3 -3
- data/simctl.gemspec +3 -1
- data/spec/simctl/device_interaction_spec.rb +11 -11
- data/spec/simctl/executor_spec.rb +1 -1
- data/spec/simctl/list_spec.rb +6 -2
- data/spec/simctl/readme_spec.rb +5 -5
- data/spec/simctl/warmup_spec.rb +1 -1
- data/spec/spec_helper.rb +9 -13
- metadata +33 -2
data/spec/simctl/list_spec.rb
CHANGED
@@ -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
|
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?('
|
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'
|
data/spec/simctl/readme_spec.rb
CHANGED
@@ -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
|
9
|
-
devicetype = SimCtl.devicetype(name: 'iPhone
|
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
|
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
|
data/spec/simctl/warmup_spec.rb
CHANGED
@@ -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
|
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
|
data/spec/spec_helper.rb
CHANGED
@@ -5,18 +5,16 @@ SimpleCov.start do
|
|
5
5
|
end
|
6
6
|
Coveralls.wear!
|
7
7
|
|
8
|
-
$LOAD_PATH.push File.expand_path(
|
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
|
-
|
13
|
-
else
|
14
|
-
|
15
|
-
end
|
11
|
+
SimCtl.default_timeout = if ENV['TRAVIS']
|
12
|
+
300
|
13
|
+
else
|
14
|
+
60
|
15
|
+
end
|
16
16
|
|
17
|
-
|
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
|
-
|
34
|
-
|
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.
|
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:
|
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
|