acouchi 0.0.10 → 0.0.11
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.
- data/jars/.gitkeep +0 -0
 - data/lib/acouchi/project_builder.rb +31 -0
 - data/lib/acouchi/version.rb +1 -1
 - metadata +3 -4
 - data/jars/gson-2.2.2.jar +0 -0
 - data/jars/robotium-solo-3.4.1.jar +0 -0
 
    
        data/jars/.gitkeep
    ADDED
    
    | 
         
            File without changes
         
     | 
| 
         @@ -15,6 +15,7 @@ module Acouchi 
     | 
|
| 
       15 
15 
     | 
    
         
             
                end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                def build
         
     | 
| 
      
 18 
     | 
    
         
            +
                  download_jars
         
     | 
| 
       18 
19 
     | 
    
         
             
                  temporarily_copy_over_source_files do
         
     | 
| 
       19 
20 
     | 
    
         
             
                    build_apk
         
     | 
| 
       20 
21 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -23,6 +24,36 @@ module Acouchi 
     | 
|
| 
       23 
24 
     | 
    
         
             
                  modify_manifest(apk_path)
         
     | 
| 
       24 
25 
     | 
    
         
             
                end
         
     | 
| 
       25 
26 
     | 
    
         | 
| 
      
 27 
     | 
    
         
            +
                def download_jars
         
     | 
| 
      
 28 
     | 
    
         
            +
                  download_gson
         
     | 
| 
      
 29 
     | 
    
         
            +
                  download_robotium
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def download_gson
         
     | 
| 
      
 33 
     | 
    
         
            +
                  gson_path = File.expand_path(File.join(File.dirname(__FILE__), "../../jars/gson-2.2.2.jar"))
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  require "httparty"
         
     | 
| 
      
 36 
     | 
    
         
            +
                  require "tempfile"
         
     | 
| 
      
 37 
     | 
    
         
            +
                  response = HTTParty.get("http://google-gson.googlecode.com/files/google-gson-2.2.2-release.zip")
         
     | 
| 
      
 38 
     | 
    
         
            +
                  temp_file = Tempfile.new("gson.zip")
         
     | 
| 
      
 39 
     | 
    
         
            +
                  temp_file << response.body
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  require "zip/zip"
         
     | 
| 
      
 42 
     | 
    
         
            +
                  zip = Zip::ZipFile.open(temp_file.path)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  File.open(gson_path, "w") do |gson_file|
         
     | 
| 
      
 44 
     | 
    
         
            +
                    gson_file.write(zip.read("google-gson-2.2.2/gson-2.2.2.jar"))
         
     | 
| 
      
 45 
     | 
    
         
            +
                  end
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                def download_robotium
         
     | 
| 
      
 49 
     | 
    
         
            +
                  require "httparty"
         
     | 
| 
      
 50 
     | 
    
         
            +
                  response = HTTParty.get("http://robotium.googlecode.com/files/robotium-solo-3.6.jar")
         
     | 
| 
      
 51 
     | 
    
         
            +
                  robotium_path = File.expand_path(File.join(File.dirname(__FILE__), "../../jars/robotium-solo-3.6.jar"))
         
     | 
| 
      
 52 
     | 
    
         
            +
                  File.open(robotium_path, "w") do |file|
         
     | 
| 
      
 53 
     | 
    
         
            +
                    file << response
         
     | 
| 
      
 54 
     | 
    
         
            +
                  end
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
       26 
57 
     | 
    
         
             
                def temporarily_copy_over_source_files
         
     | 
| 
       27 
58 
     | 
    
         
             
                  destination_libs_path = "#{configuration.project_path}/libs"
         
     | 
| 
       28 
59 
     | 
    
         
             
                  destination_source_path = "#{configuration.project_path}/src/com/acouchi"
         
     | 
    
        data/lib/acouchi/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: acouchi
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.11
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2013-01- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2013-01-10 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: httparty
         
     | 
| 
         @@ -106,8 +106,7 @@ files: 
     | 
|
| 
       106 
106 
     | 
    
         
             
            - examples/AcouchiSample/res/layout/main.xml
         
     | 
| 
       107 
107 
     | 
    
         
             
            - examples/AcouchiSample/res/values/strings.xml
         
     | 
| 
       108 
108 
     | 
    
         
             
            - examples/AcouchiSample/src/com/acouchi/sample/StartupActivity.java
         
     | 
| 
       109 
     | 
    
         
            -
            - jars 
     | 
| 
       110 
     | 
    
         
            -
            - jars/robotium-solo-3.4.1.jar
         
     | 
| 
      
 109 
     | 
    
         
            +
            - jars/.gitkeep
         
     | 
| 
       111 
110 
     | 
    
         
             
            - lib/acouchi.rb
         
     | 
| 
       112 
111 
     | 
    
         
             
            - lib/acouchi/apk_installer.rb
         
     | 
| 
       113 
112 
     | 
    
         
             
            - lib/acouchi/apk_modifier.rb
         
     | 
    
        data/jars/gson-2.2.2.jar
    DELETED
    
    | 
         Binary file 
     | 
| 
         Binary file 
     |