run_loop 0.2.0 → 0.2.1.pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb37a422c7461ffb6910fd4538530fde53388d47
4
- data.tar.gz: 795c40b759a26c48faa6cd4c241867b13f890278
3
+ metadata.gz: 105997ba570c5517944a4b52f9c25479cdaffba1
4
+ data.tar.gz: e31b90f5ddb2cbe4afeec83a2f89d1e44b2b90b0
5
5
  SHA512:
6
- metadata.gz: 5a7d4024e4e3bae9d2d947ba75193d0d691b6d20507f58f5dcb3971f7b5152a492d38b473392462cfbdf12c8c8d1877cbb582e9d8e9ae2b180bf4dec0881e769
7
- data.tar.gz: 982441d43dae33182477f7421f70ee064702bf99b254d6bbf2327c490ab1557140c731170bce138c7d41fdca74fc75acfcf1f35dee73d057a773ef5890c6752c
6
+ metadata.gz: ef08a98817a84b61b1038d2e95f5cf6b8709aef784f38bb14e4746b0e7ee6708fe1b14708615b65ed7a3bb7bd369d6bc25296d8759d7404b34b5588623f0e138
7
+ data.tar.gz: 143180aa1883f232f0658007024a58aff974119833850f9b414972fb7aa70b95ad996f02a5dd1b065298e04f2e66024b20b1f2144275757e3d4e08f8f0112249
@@ -1,3 +1,3 @@
1
1
  module RunLoop
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1.pre1'
3
3
  end
@@ -304,14 +304,20 @@ var target = null,
304
304
  _response = function(response) {
305
305
  var sanitized = _sanitize(response),
306
306
  i = 0,
307
- MAX_TRIES=30,
307
+ MAX_TRIES=120,
308
308
  res;
309
- target.frontMostApp().setPreferencesValueForKey(sanitized, __calabashResponse);
310
309
 
311
310
  for (i=0; i<MAX_TRIES; i+=1) {
311
+ UIALogger.logMessage("Write result...");
312
+ target.frontMostApp().setPreferencesValueForKey(sanitized, __calabashResponse);
313
+ UIALogger.logMessage("Check successful storage...")
312
314
  res = target.frontMostApp().preferencesValueForKey(__calabashResponse);
313
315
  if (res && res['index'] == sanitized['index']) {
316
+ UIALogger.logMessage("Storage succeeded: "+ res['index']);
314
317
  return;
318
+ } else {
319
+ UIALogger.logMessage("Storage failed: "+ res);
320
+ target.delay(0.5);
315
321
  }
316
322
  }
317
323
  throw new Error("Unable to write to preferences");
@@ -354,6 +360,10 @@ while (true) {
354
360
  UIALogger.logMessage("index " + _actualIndex + " is command: "+ _exp);
355
361
  target.frontMostApp().setPreferencesValueForKey(null, __calabashRequest);
356
362
  try {
363
+ if (_exp == 'break;') {
364
+ _success("OK", _actualIndex);
365
+ break;
366
+ }
357
367
  _result = eval(_exp);
358
368
  UIALogger.logMessage("Success: "+ _result);
359
369
  _success(_result, _actualIndex);
@@ -367,7 +377,7 @@ while (true) {
367
377
  else {//likely old command is lingering...
368
378
  continue;
369
379
  }
370
- _expectedIndex++;
380
+ _expectedIndex = Math.max(_actualIndex+1, _expectedIndex+1);
371
381
 
372
382
 
373
383
  target.delay(0.2);
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.2.0
4
+ version: 0.2.1.pre1
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-03-19 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -85,9 +85,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - '>'
89
89
  - !ruby/object:Gem::Version
90
- version: '0'
90
+ version: 1.3.1
91
91
  requirements: []
92
92
  rubyforge_project:
93
93
  rubygems_version: 2.0.3