run_loop 2.2.4 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,8 +94,7 @@ but binary does not exist at that path.
94
94
  if device.simulator?
95
95
  cbxapp = RunLoop::App.new(runner.runner)
96
96
 
97
- # Quits the simulator if CoreSimulator is not already in control of it.
98
- sim = CoreSimulator.new(device, cbxapp, {:quit_sim_on_init => false})
97
+ sim = CoreSimulator.new(device, cbxapp)
99
98
  sim.install
100
99
  sim.launch_simulator
101
100
  else
@@ -111,19 +110,15 @@ Expected :device_agent_install_timeout key in options:
111
110
  end
112
111
 
113
112
  options = {:log_cmd => true, :timeout => install_timeout}
113
+ args = [
114
+ cmd, "install",
115
+ "--device-id", device.udid,
116
+ # -a <== --app-bundle (1.0.4) and --app-path (> 1.0.4)
117
+ "-a", runner.runner
118
+ ]
119
+
114
120
  if code_sign_identity
115
- args = [
116
- cmd, "install",
117
- "--device-id", device.udid,
118
- "--app-bundle", runner.runner,
119
- "--codesign-identity", code_sign_identity
120
- ]
121
- else
122
- args = [
123
- cmd, "install",
124
- "--device-id", device.udid,
125
- "--app-bundle", runner.runner
126
- ]
121
+ args = args + ["--codesign-identity", code_sign_identity]
127
122
  end
128
123
 
129
124
  start = Time.now
@@ -43,7 +43,7 @@ module RunLoop
43
43
  # cyan
44
44
  def self.log_unix_cmd(msg)
45
45
  if RunLoop::Environment.debug?
46
- puts Color.cyan("EXEC: #{msg}") if msg
46
+ puts Color.cyan("SHELL: #{msg}") if msg
47
47
  end
48
48
  end
49
49
 
@@ -3,8 +3,28 @@ module RunLoop
3
3
  # A class for waiting on processes.
4
4
  class ProcessWaiter
5
5
 
6
+ require "run_loop/shell"
7
+
8
+ include RunLoop::Shell
9
+
6
10
  attr_reader :process_name
7
11
 
12
+ # Return a list of pids by matching `match_string` against the command
13
+ # and full argument list of the command. As the name suggests, this
14
+ # method uses `pgrep -f`.
15
+ #
16
+ # @param match_string the string to match against
17
+ # @return Array[Integer] an array of pids
18
+ def self.pgrep_f(match_string)
19
+ cmd = ["pgrep", "-f", match_string]
20
+ hash = RunLoop::Shell.run_shell_command(cmd)
21
+
22
+ out = hash[:out]
23
+ return [] if out.nil? || out == ""
24
+
25
+ out.split($-0).map { |pid| pid.to_i }
26
+ end
27
+
8
28
  def initialize(process_name, options={})
9
29
  @options = DEFAULT_OPTIONS.merge(options)
10
30
  @process_name = process_name
@@ -13,9 +33,21 @@ module RunLoop
13
33
  # Collect a list of Integer pids.
14
34
  # @return [Array<Integer>] An array of integer pids for the `process_name`
15
35
  def pids
16
- process_info = `ps x -o pid,comm | grep -v grep | grep '#{process_name}'`
17
- process_array = process_info.split("\n")
18
- process_array.map { |process| process.split(' ').first.strip.to_i }
36
+ cmd = ["pgrep", "-x", process_name]
37
+ hash = run_shell_command(cmd)
38
+ out = hash[:out]
39
+
40
+ if out.nil? || out == ""
41
+ []
42
+ else
43
+ out.split($-0).map do |pid|
44
+ if pid.nil? || pid == ""
45
+ nil
46
+ else
47
+ pid.to_i
48
+ end
49
+ end.compact
50
+ end
19
51
  end
20
52
 
21
53
  # Is the `process_name` a running?
@@ -58,7 +90,6 @@ module RunLoop
58
90
  there_are_n
59
91
  end
60
92
 
61
-
62
93
  # Wait for `process_name` to start.
63
94
  def wait_for_any
64
95
  return true if running_process?
@@ -288,12 +288,12 @@ $ bundle exec run-loop simctl manage-processes
288
288
 
289
289
  # @!visibility private
290
290
  #
291
- # Launches the app on on the device.
291
+ # Removes the application from the device.
292
292
  #
293
293
  # Caller is responsible for the following:
294
294
  #
295
295
  # 1. Launching the simulator.
296
- # 2. That the application is installed; simctl uninstall will fail if app
296
+ # 2. Verifying that the application is installed; simctl uninstall will fail if app
297
297
  # is installed.
298
298
  #
299
299
  # No checks are made.
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = "2.2.4"
2
+ VERSION = "2.3.0"
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -131,6 +131,35 @@ function dutchLocalizations() {
131
131
  ];
132
132
  }
133
133
 
134
+ function dutch_BE_Localizations() {
135
+ return [
136
+ ["Sta toe", /toegang tot je locatie toestaan terwijl je de app gebruikt/],
137
+ ["Sta toe", /toegang tot je locatie toestaan, zelfs als je de app niet gebruikt/],
138
+ ["OK", /wil toegang tot je contacten/],
139
+ ["OK", /wil toegang tot je agenda/],
140
+ ["OK", /wil toegang tot je herinneringen/],
141
+ ["OK", /wil toegang tot je foto's/],
142
+ ["OK", /wil toegang tot je bewegings- en fitnessactiviteit/]
143
+ ];
144
+ }
145
+
146
+ function swedishLocalizations() {
147
+ return [
148
+ ["Tillåt", /att se din platsinfo när du använder appen/],
149
+ ["Tillåt", /att se din platsinfo även när du inte använder appen/],
150
+ ["Tillåt", /även ser din platsinfo när du inte använder appen/],
151
+ ["OK", /begär åtkomst till dina kontakter/],
152
+ ["OK", /begär åtkomst till din kalender/],
153
+ ["OK", /begär åtkomst till dina påminnelser/],
154
+ ["OK", /begär åtkomst till dina bilder/],
155
+ ["OK", /vill komma åt dina Twitter-konton/],
156
+ ["OK", /begär åtkomst till mikrofonen/],
157
+ ["OK", /begär åtkomst till din rörelse- och träningsaktivitet/],
158
+ ["OK", /begär åtkomst till kameran/],
159
+ ["OK", /vill skicka notiser till dig/]
160
+ ];
161
+ }
162
+
134
163
  function russianLocalizations() {
135
164
  return [
136
165
  // Location
@@ -168,7 +197,7 @@ function portugueseBrazilLocalizations() {
168
197
  ["OK", /Deseja Ter Acesso às Suas Atividades de Movimento e Preparo Físico/],
169
198
  ["OK", /Deseja Ter Acesso às Contas do Twitter/],
170
199
  ["OK", /data available to nearby bluetooth devices/],
171
- ["OK", /[Dd]eseja [Ee]nviar-lhe [Nn]otificações/]
200
+ ["OK", /[Dd]eseja [Ee]nviar-lhe [Nn]otificações/]
172
201
  ];
173
202
  }
174
203
 
@@ -176,12 +205,14 @@ function localizations() {
176
205
  return [].concat(
177
206
  danishLocalizations(),
178
207
  dutchLocalizations(),
208
+ dutch_BE_Localizations(),
209
+ swedishLocalizations(),
179
210
  englishLocalizations(),
180
211
  germanLocalizations(),
181
212
  russianLocalizations(),
182
213
  spanishLocalizations(),
183
214
  frenchLocalizations(),
184
- portugueseBrazilLocalizations()
215
+ portugueseBrazilLocalizations()
185
216
  );
186
217
  }
187
218
 
@@ -0,0 +1,4 @@
1
+ The CocoaAsyncSocket project is under Public Domain license.
2
+ http://code.google.com/p/cocoaasyncsocket/
3
+
4
+ The AsyncSocket project has been around since 2001 and is used in many applications and frameworks.
@@ -0,0 +1,18 @@
1
+ Software License Agreement (BSD License)
2
+
3
+ Copyright (c) 2011, Deusty, LLC
4
+ All rights reserved.
5
+
6
+ Redistribution and use of this software in source and binary forms,
7
+ with or without modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above
10
+ copyright notice, this list of conditions and the
11
+ following disclaimer.
12
+
13
+ * Neither the name of Deusty nor the names of its
14
+ contributors may be used to endorse or promote products
15
+ derived from this software without specific prior
16
+ written permission of Deusty, LLC.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,33 @@
1
+ CocoaLumberjack is under the New BSD License.
2
+ https://github.com/robbiehanson/CocoaLumberjack
3
+
4
+ Extensive documentation, tutorials, etc are available:
5
+ https://github.com/robbiehanson/CocoaLumberjack/wiki
6
+
7
+ Overview of the project (copied from google code homepage):
8
+
9
+
10
+
11
+ The lumberjack framework is fast & simple, yet powerful & flexible.
12
+ It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for objective-c, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the objective-c runtime.
13
+
14
+ Lumberjack is fast:
15
+ In most cases it is an order of magnitude faster than NSLog.
16
+
17
+ Lumberjack is simple:
18
+ It takes as little as a single line of code to configure lumberjack when your application launches. Then simply replace your NSLog statements with DDLog statements and that's about it. (And the DDLog macros have the exact same format and syntax as NSLog, so it's super easy.)
19
+
20
+ Lumberjack is powerful:
21
+ One log statement can be sent to multiple loggers, meaning you can log to a file and the console simultaneously. Want more? Create your own loggers (it's easy) and send your log statements over the network. Or to a database or distributed file system. The sky is the limit.
22
+
23
+ Lumberjack is flexible:
24
+ Configure your logging however you want. Change log levels per file (perfect for debugging). Change log levels per logger (verbose console, but concise log file). Change log levels per xcode configuration (verbose debug, but concise release). Have your log statements compiled out of the release build. Customize the number of log levels for your application. Add your own fine-grained logging. Dynamically change log levels during runtime. Choose how & when you want your log files to be rolled. Upload your log files to a central server. Compress archived log files to save disk space...
25
+
26
+
27
+
28
+ This framework is for you if:
29
+
30
+ You're looking for a way to track down that impossible-to-reproduce bug that keeps popping up in the field.
31
+ You're frustrated with the super short console log on the iPhone.
32
+ You're looking to take your application to the next level in terms of support and stability.
33
+ You're looking for an enterprise level logging solution for your application (Mac or iPhone).
@@ -0,0 +1,30 @@
1
+ BSD License
2
+
3
+ For WebDriverAgent software
4
+
5
+ Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without modification,
8
+ are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name Facebook nor the names of its contributors may be used to
18
+ endorse or promote products derived from this software without specific
19
+ prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2011 Matt Stevens
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_loop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-15 00:00:00.000000000 Z
12
+ date: 2017-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -310,8 +310,12 @@ executables:
310
310
  extensions: []
311
311
  extra_rdoc_files: []
312
312
  files:
313
+ - "./vendor-licenses/CocoaAsyncSocket.LICENSE"
314
+ - "./vendor-licenses/CocoaHTTPServer.LICENSE"
315
+ - "./vendor-licenses/CocoaLumberjack.LICENSE"
313
316
  - "./vendor-licenses/FBSimulatorControl.LICENSE"
314
- - "./vendor-licenses/xctestctl.LICENSE"
317
+ - "./vendor-licenses/Facebook-WebDriverAgent.LICENSE"
318
+ - "./vendor-licenses/RoutingHTTPServer.LICENSE"
315
319
  - LICENSE
316
320
  - bin/run-loop
317
321
  - lib/run_loop.rb
@@ -411,7 +415,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
411
415
  version: '0'
412
416
  requirements: []
413
417
  rubyforge_project:
414
- rubygems_version: 2.5.1
418
+ rubygems_version: 2.6.8
415
419
  signing_key:
416
420
  specification_version: 4
417
421
  summary: The bridge between Calabash iOS and Xcode command-line tools like instruments
@@ -1,32 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- xctestctl
4
-
5
- Copyright (c) 2016-present, Xamarin
6
-
7
- All rights reserved.
8
-
9
- Redistribution and use in source and binary forms, with or without
10
- modification, are permitted provided that the following conditions are met:
11
-
12
- 1. Redistributions of source code must retain the above copyright notice, this
13
- list of conditions and the following disclaimer.
14
-
15
- 2. Redistributions in binary form must reproduce the above copyright notice,
16
- this list of conditions and the following disclaimer in the documentation
17
- and/or other materials provided with the distribution.
18
-
19
- 3. Neither the name of the copyright holder nor the names of its contributors
20
- may be used to endorse or promote products derived from this software without
21
- specific prior written permission.
22
-
23
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.