run_loop 1.2.0.pre5 → 1.2.0

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: 5a3633ddab20b51b5a561c27be379d94a8a0f874
4
- data.tar.gz: 22b8a486868ce0549e0a65c5c2d39a651ed39819
3
+ metadata.gz: 52b188ae1026c807aaa013b4d881f2e41ca70e45
4
+ data.tar.gz: c70ee8e40ae5ecb4b16579c693b0d368455e3936
5
5
  SHA512:
6
- metadata.gz: f880f15e0ca597864d897428a8589d24ae30714a59b20babb9704868d0d37f824c02217b90c384c48058bd690d1c706d64a02a2e7f271b1ae08fa35ebf8f54b3
7
- data.tar.gz: 04b2163e4f03645cca6d54be1829029121757261bf9d8800e14d1135358b55c2a154fe235ce137288ce1e5328b174ce3b8d2b25ce40a4c5c525ee7f42b4c67dd
6
+ metadata.gz: 23d0ca67311f9d60ce82cfe362722e1a53fd246ebce8660354cef7bebce07f6f6384ade2f11cd80de279b7deca59ac23b79477f3be72585e8a2820738edb9f99
7
+ data.tar.gz: 0c869923f435123ddad8766f199813c8c84fa1806060c75bc06e48924eebde8aa912afba3b989aadf962d0395546334701db99173e0f5caa441d0e369744b4e5
data/lib/run_loop/lipo.rb CHANGED
@@ -79,10 +79,21 @@ module RunLoop
79
79
 
80
80
  # Returns a list of architecture in the binary.
81
81
  # @return [Array<String>] A list of architecture.
82
+ # @raise [RuntimeError] If the output of lipo cannot be parsed.
82
83
  def info
83
- execute_lipo("-info #{binary_path}") do |stdout, _, _|
84
+ execute_lipo("-info #{binary_path}") do |stdout, stderr, wait_thr|
84
85
  output = stdout.read.strip
85
- output.split(':')[-1].strip.split
86
+ begin
87
+ output.split(':')[-1].strip.split
88
+ rescue Exception => e
89
+ msg = ['Expected to be able to parse the output of lipo.',
90
+ "cmd: 'lipo -info #{binary_path}'",
91
+ "stdout: '#{output}'",
92
+ "stderr: '#{stderr.read.strip}'",
93
+ "exit code: '#{wait_thr.value}'",
94
+ e.message]
95
+ raise msg.join("\n")
96
+ end
86
97
  end
87
98
  end
88
99
 
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = '1.2.0.pre5'
2
+ VERSION = '1.2.0'
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
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: 1.2.0.pre5
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-01 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -227,7 +227,6 @@ files:
227
227
  - lib/run_loop/sim_control.rb
228
228
  - lib/run_loop/version.rb
229
229
  - lib/run_loop/xctools.rb
230
- - scripts/calabash-uia-min.js
231
230
  - scripts/calabash.lldb.erb
232
231
  - scripts/calabash_script_uia.js
233
232
  - scripts/json2-min.js
@@ -255,12 +254,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
254
  version: '1.9'
256
255
  required_rubygems_version: !ruby/object:Gem::Requirement
257
256
  requirements:
258
- - - ">"
257
+ - - ">="
259
258
  - !ruby/object:Gem::Version
260
- version: 1.3.1
259
+ version: '0'
261
260
  requirements: []
262
261
  rubyforge_project:
263
- rubygems_version: 2.2.2
262
+ rubygems_version: 2.4.5
264
263
  signing_key:
265
264
  specification_version: 4
266
265
  summary: Tools related to running Calabash iOS tests
@@ -1,7 +0,0 @@
1
- (function(){function m(){return h.frontMostApp()}function r(){return m().mainWindow()}function s(){return m().windows().toArray()}function n(){return m().keyboard()}function l(a,c){this.reason=a;this.a=c||"";this.message=this.toString()}function k(a){return!a||a instanceof UIAElementNil}function t(a,c){var b=c||[],e,d;if(k(a))return b;e=a.elements();for(var f=0,g=e.length;f<g;f+=1)d=e[f],b.push(d),t(d,b);return b}function q(a,c){for(var b=0,e=c.length;b<e;b+=1)a.push(c[b])}function u(a,c){var b=[];
2
- if(k(c))return b;c instanceof this[a]&&b.push(c);for(var e=c.elements(),d=0,f=e.length;d<f;d+=1)q(b,u(a,e[d]));return b}function x(a,c){var b=null;if(a instanceof Array){if(3===a.length){var e=a[0],b=a[1],d=a[2];if("string"==typeof d)if(-1==d.indexOf("'"))d="'"+d+"'";else if(-1==d.indexOf('"'))d='"'+d+'"';else throw new l("Escaping for filters not supported yet.");b=c.withPredicate(e+" "+b+" "+d);return!k(b)}return!1}for(e in a)if(a.hasOwnProperty(e))if(b=a[e],"marked"==e){if(c.name()!=b&&c.label()!=
3
- b&&(!c.value||c.value!=b))return!1}else if(b=c.withValueForKey(b,e),k(b))return!1;return!0}function v(a,c){if(c(a))return a;var b,e;if(k(a))return null;b=a.elements();for(var d=0,f=b.length;d<f;d+=1)if(e=b[d],v(e,c))return e;return null}function w(a){h.delay(a);return h}var g={},h=UIATarget.localTarget();h.setTimeout(0);l.prototype=error();l.prototype.toString=function(){var a="UIAutomationError[reason="+this.reason;0<this.a.length&&(a+=", details="+this.a);return a+"]"};g.sleep=w;g.query=function(a,
4
- c){if(!c)return g.query(a,s());c instanceof UIAElement&&(c=[c]);var b=c,e=null,d=null,f=[],p,h,k,l;p=0;for(k=a.length;p<k;p+=1){e=a[p];h=0;for(l=b.length;h<l;h+=1)d=b[h],"string"===typeof e?"*"===e||"view"==e||"UIAElement"===e?q(f,t(d,[d])):q(f,u(e,d)):x(e,d)&&f.push(d);b=f;f=[]}return b};g.keyboard_visible=function(){return!k(n())};g.keyboard_enter_text=function(a,c){if(!g.keyboard_visible())throw new l("Keyboard not visible");c=c||{};if(c.unsafe)return n().typeString(a),!0;var b=v(r(),function(a){return 1==
5
- a.hasKeyboardFocus()});if(k(b))return n().typeString(a),!0;var e=c.initial_text||"",d=new Date,f=c.timeout||60,h=n();do try{return h.typeString(a),!0}catch(m){UIALogger.logMessage("keyboard_enter_text failed: "+m),UIALogger.logMessage("keyboard_enter_text retrying with restore to: "+e),b.setValue(e)}while(!(new Date-d>=1E3*f));throw new l("Unable to enter text","text: "+a+" failed after retrying for "+f);};g.deactivate=function(a){h.deactivateAppForDuration(a)};g.tap_offset=function(a,c,b){b=b||{};
6
- return b.unsafe?function(){return c.apply(this,arguments)}:function(){var e=new Date,d=b.timeout||60,f=b.frequency||.1;do try{return c.apply(this,arguments)}catch(g){UIALogger.logMessage(a+"Error: "+g+". Arguments: "+arguments[0]+", "+arguments[1]),w(f)}while(!(new Date-e>=1E3*d));throw new l(a,"Arguments: "+arguments[0]+", "+arguments[1]);}}("tap_offset failed",function(a,c){h.tapWithOptions(a,c||{})},{timeout:60,frequency:.5});this.target=h;this.uia=g;g.app=m;g.window=r;g.windows=s;g.keyboard=n;
7
- g.alert=function(){return m().alert()}})();