simctl 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -4
- data/Gemfile.lock +1 -1
- data/lib/simctl/command.rb +2 -0
- data/lib/simctl/command/openurl.rb +16 -0
- data/lib/simctl/device.rb +8 -0
- data/lib/simctl/version.rb +1 -1
- data/test/simctl/crud_test.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1152b46c74ba32ea81c6ee9cb6456b60b5bfc77
|
4
|
+
data.tar.gz: 1b8cf3d87911c4b63893df266de1615f3da20c8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c4af61982746fd962d893613d11add9af87a7e8511775ebc3ffcf397d138358ee70c6532eec1d89ad79c06fd8e5dc4926660a1c6c1db262bf856aca4d90440
|
7
|
+
data.tar.gz: 590b41f4834d9ce8596acedc2f28f221538adef24cb33a4cdba542bbec299adea158e4b9f7a4dadfa98091136f6b4b19c535e287c42a0760c6d192c50eb5b2ef
|
data/.travis.yml
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
language: objective-c
|
2
|
-
|
2
|
+
matrix:
|
3
|
+
include:
|
4
|
+
- os: osx
|
5
|
+
osx_image: xcode7.3
|
6
|
+
env: CUSTOM_DEVICE_SET_PATH=true
|
7
|
+
- os: osx
|
8
|
+
osx_image: xcode7.3
|
9
|
+
env: CUSTOM_DEVICE_SET_PATH=false
|
10
|
+
- os: osx
|
11
|
+
osx_image: xcode8
|
12
|
+
env: CUSTOM_DEVICE_SET_PATH=true
|
13
|
+
- os: osx
|
14
|
+
osx_image: xcode8
|
15
|
+
env: CUSTOM_DEVICE_SET_PATH=false
|
3
16
|
before_script:
|
4
17
|
- export LANG=en_US.UTF-8
|
5
18
|
install: bundle
|
6
|
-
env:
|
7
|
-
- CUSTOM_DEVICE_SET_PATH=true
|
8
|
-
- CUSTOM_DEVICE_SET_PATH=false
|
9
19
|
script:
|
10
20
|
- bundle exec rake
|
data/Gemfile.lock
CHANGED
data/lib/simctl/command.rb
CHANGED
@@ -9,6 +9,7 @@ require 'simctl/command/list'
|
|
9
9
|
require 'simctl/command/rename'
|
10
10
|
require 'simctl/command/reset'
|
11
11
|
require 'simctl/command/shutdown'
|
12
|
+
require 'simctl/command/openurl'
|
12
13
|
require 'simctl/executor'
|
13
14
|
|
14
15
|
module SimCtl
|
@@ -26,6 +27,7 @@ module SimCtl
|
|
26
27
|
include SimCtl::Command::Rename
|
27
28
|
include SimCtl::Command::Reset
|
28
29
|
include SimCtl::Command::Shutdown
|
30
|
+
include SimCtl::Command::OpenUrl
|
29
31
|
|
30
32
|
def command_for(*arguments)
|
31
33
|
command = %w[xcrun simctl]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
|
3
|
+
module SimCtl
|
4
|
+
class Command
|
5
|
+
module OpenUrl
|
6
|
+
# Opens a url
|
7
|
+
#
|
8
|
+
# @param device [SimCtl::Device] the device that should open the url
|
9
|
+
# @param url The url to open on the device
|
10
|
+
# @return [void]
|
11
|
+
def open_url(device, url)
|
12
|
+
Executor.execute(command_for('openurl', device.udid, Shellwords.shellescape(url)))
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/simctl/device.rb
CHANGED
@@ -77,6 +77,14 @@ module SimCtl
|
|
77
77
|
SimCtl.launch_app(self, identifier, args, opts)
|
78
78
|
end
|
79
79
|
|
80
|
+
# Opens the url on the device
|
81
|
+
#
|
82
|
+
# @param url [String] The url to be opened on the device
|
83
|
+
# @return [void]
|
84
|
+
def open_url!(url)
|
85
|
+
SimCtl.open_url(self, url)
|
86
|
+
end
|
87
|
+
|
80
88
|
def path
|
81
89
|
@path ||= DevicePath.new(udid)
|
82
90
|
end
|
data/lib/simctl/version.rb
CHANGED
data/test/simctl/crud_test.rb
CHANGED
@@ -77,6 +77,11 @@ class SimCtl::CRUDTest < Minitest::Test
|
|
77
77
|
device.launch_app!('com.github.plu.simctl.SampleApp')
|
78
78
|
end
|
79
79
|
|
80
|
+
should '0840. open some url' do
|
81
|
+
device = SimCtl.device(udid: udid)
|
82
|
+
device.open_url!('https://www.github.com')
|
83
|
+
end
|
84
|
+
|
80
85
|
should '0900. kill the device' do
|
81
86
|
device = SimCtl.device(udid: udid)
|
82
87
|
assert device.kill!
|
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.5.
|
4
|
+
version: 1.5.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: 2016-
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- lib/simctl/command/kill.rb
|
107
107
|
- lib/simctl/command/launch.rb
|
108
108
|
- lib/simctl/command/list.rb
|
109
|
+
- lib/simctl/command/openurl.rb
|
109
110
|
- lib/simctl/command/rename.rb
|
110
111
|
- lib/simctl/command/reset.rb
|
111
112
|
- lib/simctl/command/shutdown.rb
|