run_loop 1.2.4 → 1.2.5
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 +4 -4
- data/lib/run_loop.rb +1 -0
- data/lib/run_loop/monkey_patch.rb +17 -0
- data/lib/run_loop/version.rb +1 -1
- metadata +5 -5
- data/scripts/calabash-uia-min.js +0 -7
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c714f4f95eb7ac99126bad381d6bd952fdbbd94a
         | 
| 4 | 
            +
              data.tar.gz: 379970369093f638a796f8056abd563427254b66
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d902249f5b9a9e8989586d2f72aa498b7fa2416dd25a40d7b7f3f48c155d279750181a047788d6cc4da8e24be7e9cf85e5cba8777289b7f4a4120781aca56cf1
         | 
| 7 | 
            +
              data.tar.gz: 4a7b116bd67c63cb1c51c7964abc7de96177505df498cf4dc89dd6ed32b7eeceb5ddc6ba6ff5483b30aff601ae448f4d75d072787da783ac2b2164bb0eb7a927
         | 
    
        data/lib/run_loop.rb
    CHANGED
    
    
| @@ -0,0 +1,17 @@ | |
| 1 | 
            +
            require 'awesome_print'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Monkey patch for AwesomePrint + objects that implement '=='.
         | 
| 4 | 
            +
            # Available in awesome-print 1.6, but requires a cross-platform update.
         | 
| 5 | 
            +
            module AwesomePrint
         | 
| 6 | 
            +
              class Formatter
         | 
| 7 | 
            +
                def awesome_self(object, type)
         | 
| 8 | 
            +
                  if @options[:raw] && object.instance_variables.any?
         | 
| 9 | 
            +
                    awesome_object(object)
         | 
| 10 | 
            +
                  elsif object.respond_to?(:to_hash)
         | 
| 11 | 
            +
                    awesome_hash(object.to_hash)
         | 
| 12 | 
            +
                  else
         | 
| 13 | 
            +
                    colorize(object.inspect.to_s, type)
         | 
| 14 | 
            +
                  end
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
            end
         | 
    
        data/lib/run_loop/version.rb
    CHANGED
    
    
    
        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: 1.2. | 
| 4 | 
            +
              version: 1.2.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Karl Krukow
         | 
| @@ -58,14 +58,14 @@ dependencies: | |
| 58 58 | 
             
                requirements:
         | 
| 59 59 | 
             
                - - "~>"
         | 
| 60 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: '1. | 
| 61 | 
            +
                    version: '1.2'
         | 
| 62 62 | 
             
              type: :runtime
         | 
| 63 63 | 
             
              prerelease: false
         | 
| 64 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 65 | 
             
                requirements:
         | 
| 66 66 | 
             
                - - "~>"
         | 
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: '1. | 
| 68 | 
            +
                    version: '1.2'
         | 
| 69 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 70 | 
             
              name: CFPropertyList
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -224,11 +224,11 @@ files: | |
| 224 224 | 
             
            - lib/run_loop/host_cache.rb
         | 
| 225 225 | 
             
            - lib/run_loop/instruments.rb
         | 
| 226 226 | 
             
            - lib/run_loop/lipo.rb
         | 
| 227 | 
            +
            - lib/run_loop/monkey_patch.rb
         | 
| 227 228 | 
             
            - lib/run_loop/plist_buddy.rb
         | 
| 228 229 | 
             
            - lib/run_loop/sim_control.rb
         | 
| 229 230 | 
             
            - lib/run_loop/version.rb
         | 
| 230 231 | 
             
            - lib/run_loop/xctools.rb
         | 
| 231 | 
            -
            - scripts/calabash-uia-min.js
         | 
| 232 232 | 
             
            - scripts/calabash.lldb.erb
         | 
| 233 233 | 
             
            - scripts/calabash_script_uia.js
         | 
| 234 234 | 
             
            - scripts/json2-min.js
         | 
| @@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 261 261 | 
             
                  version: '0'
         | 
| 262 262 | 
             
            requirements: []
         | 
| 263 263 | 
             
            rubyforge_project: 
         | 
| 264 | 
            -
            rubygems_version: 2. | 
| 264 | 
            +
            rubygems_version: 2.4.5
         | 
| 265 265 | 
             
            signing_key: 
         | 
| 266 266 | 
             
            specification_version: 4
         | 
| 267 267 | 
             
            summary: Tools related to running Calabash iOS tests
         | 
    
        data/scripts/calabash-uia-min.js
    DELETED
    
    | @@ -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()}})();
         |