run_loop 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f42c744f600c2389b8539ce1ddbe25f79dcc2c93
4
- data.tar.gz: 0729a330c2074d0adc9dd544042fd508360a8f3d
3
+ metadata.gz: f7b07c4d1d79cb15253aa5f8f53d375d4de70c1f
4
+ data.tar.gz: 9276bd08c41d46a93bfae07dca24b7cea562321e
5
5
  SHA512:
6
- metadata.gz: ef86003a5a401e40d4d6d2e64b7bad83108fe86b1b03c2ae6ee2e8fd71f75d7f0b883c5b50a0d060c6349eb732e1dcedbfb11909f69ed832c3a546be7d45a684
7
- data.tar.gz: 166b28850a09380b5adf91cf1ccb72a3a3a25fd9678e62014e20297f43118e4d7dfe82dff9102ab0526644cf5d8ed018e97d8fbb7ced7df2ffee110ce5699d46
6
+ metadata.gz: 7fbe2573ceb448de27988dadc68895cbf48946a0c677722944ab8e720e59ba870ffa7aea6318b3220e7199fc9188cc2107b547a104545717f24f2abb05242bad
7
+ data.tar.gz: e41c3fdc43f09602c91a2bbd765d32fa35778f106179374db9f3cd0025a537ff11e8ad646bdcc2280f94eda439b6ec60d9e9d18eaaf1977bf9131803a11638ea
@@ -1,3 +1,3 @@
1
1
  module RunLoop
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -162,20 +162,20 @@ var Log = (function () {
162
162
  }
163
163
  forceFlush = forceFlush.join('');
164
164
 
165
- function log_json(object)
165
+ function log_json(object, flush)
166
166
  {
167
167
  UIALogger.logMessage("OUTPUT_JSON:\n"+JSON.stringify(object)+"\nEND_OUTPUT");
168
+ if (flush) {
169
+ UIALogger.logMessage(forceFlush);
170
+ }
168
171
  }
169
172
 
170
173
  return {
171
- result: function (status, data,flush) {
172
- log_json({"status": status, "value": data, "index":_actualIndex})
173
- if (flush) {
174
- UIALogger.logMessage(forceFlush);
175
- }
174
+ result: function (status, data, flush) {
175
+ log_json({"status": status, "value": data, "index":_actualIndex}, flush)
176
176
  },
177
- output: function (msg) {
178
- log_json({"output": msg,"last_index":_actualIndex});
177
+ output: function (msg, flush) {
178
+ log_json({"output": msg,"last_index":_actualIndex}, flush);
179
179
  }
180
180
  };
181
181
  })();
@@ -200,12 +200,14 @@ function isLocationPrompt(alert) {
200
200
  var exps = [
201
201
  ["OK", /vil bruge din aktuelle placering/],
202
202
  ["OK", /Would Like to Use Your Current Location/],
203
- ["Ja", /Darf (?:.)+ Ihren aktuellen Ort verwenden/]
203
+ ["Ja", /Darf (?:.)+ Ihren aktuellen Ort verwenden/],
204
+ ["OK", /Would Like to Access Your Photos/]
204
205
  ],
205
206
  ans, exp,
206
207
  txt;
207
208
 
208
209
  txt = findAlertViewText(alert);
210
+ Log.output({"output":"alert: "+txt}, true);
209
211
  for (var i = 0; i < exps.length; i++) {
210
212
  ans = exps[i][0];
211
213
  exp = exps[i][1];
@@ -217,6 +219,7 @@ function isLocationPrompt(alert) {
217
219
  }
218
220
 
219
221
  UIATarget.onAlert = function (alert) {
222
+ Log.output({"output":"on alert"}, true);
220
223
  var target = UIATarget.localTarget();
221
224
  target.pushTimeout(10);
222
225
  function attemptTouchOKOnLocation(retry_count) {
@@ -266,6 +269,7 @@ UIATarget.onAlert = function (alert) {
266
269
  */
267
270
 
268
271
  var target = null,
272
+ failureMessage = null,
269
273
  preferences = null,
270
274
  __calabashRequest = "__calabashRequest",
271
275
  __calabashResponse = "__calabashResponse",
@@ -355,7 +359,8 @@ while (true) {
355
359
  _success(_result, _actualIndex);
356
360
  }
357
361
  catch(err) {
358
- UIALogger.logMessage("Failure: "+ err.toString() + " " + (err.stack ? err.stack.toString() : ""));
362
+ failureMessage = "Failure: "+ err.toString() + " " + (err.stack ? err.stack.toString() : "");
363
+ Log.output({"output":failureMessage}, true);
359
364
  _failure(err, _actualIndex);
360
365
  }
361
366
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_loop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-30 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor