fusion_tables 0.1.1 → 0.1.2
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/README.textile +1 -1
 - data/TODO +4 -2
 - data/VERSION +1 -1
 - data/fusion_tables.gemspec +3 -2
 - data/lib/fusion_tables/data/data.rb +17 -5
 - data/pkg/fusion_tables-0.1.1.gem +0 -0
 - data/pkg/fusion_tables-0.1.2.gem +0 -0
 - metadata +5 -4
 
    
        data/README.textile
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ bc. config.gem 'fusion_tables' 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            h2. API examples
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
      
 23 
     | 
    
         
            +
            Please explore the "worked twitter example":http://github.com/tokumine/fusion-tables/blob/master/examples/compare_tweets.rb and the "tests":http://github.com/tokumine/fusion-tables/tree/master/test/. Here is a brief rundown:
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
            <pre><code># Connect to service	
         
     | 
| 
       26 
26 
     | 
    
         
             
            @ft = GData::Client::FusionTables.new      
         
     | 
    
        data/TODO
    CHANGED
    
    | 
         @@ -3,7 +3,9 @@ Areas of improvement: 
     | 
|
| 
       3 
3 
     | 
    
         
             
            * response format json/xml
         
     | 
| 
       4 
4 
     | 
    
         
             
            * "create table" should return name
         
     | 
| 
       5 
5 
     | 
    
         
             
            * describe table should include name
         
     | 
| 
       6 
     | 
    
         
            -
            * multiple batch statements for all actions (only insert now)
         
     | 
| 
      
 6 
     | 
    
         
            +
            * multiple batch statements for all actions (only insert now). Need on all other commands. Better SQL.
         
     | 
| 
       7 
7 
     | 
    
         
             
            * docs need updating, esp on response codes
         
     | 
| 
       8 
8 
     | 
    
         
             
            * response codes need to be more standardised
         
     | 
| 
       9 
     | 
    
         
            -
            * irritating can't include ROWID with * in selects
         
     | 
| 
      
 9 
     | 
    
         
            +
            * irritating can't include ROWID with * in selects
         
     | 
| 
      
 10 
     | 
    
         
            +
            * add columns
         
     | 
| 
      
 11 
     | 
    
         
            +
            * better heatmaps - scale is wonky
         
     | 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.1. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.1.2
         
     | 
    
        data/fusion_tables.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{fusion_tables}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0.1. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.1.2"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Simon Tokumine", "Tom Verbeure"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = %q{2010- 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2010-09-01}
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.description = %q{A simple Google Fusion Tables API wrapper. Supports bulk inserts and most API functions}
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email = %q{simon@tinypla.net}
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.extra_rdoc_files = [
         
     | 
| 
         @@ -35,6 +35,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       35 
35 
     | 
    
         
             
                 "lib/fusion_tables/ext/fusion_tables.rb",
         
     | 
| 
       36 
36 
     | 
    
         
             
                 "pkg/fusion_tables-0.1.0.gem",
         
     | 
| 
       37 
37 
     | 
    
         
             
                 "pkg/fusion_tables-0.1.1.gem",
         
     | 
| 
      
 38 
     | 
    
         
            +
                 "pkg/fusion_tables-0.1.2.gem",
         
     | 
| 
       38 
39 
     | 
    
         
             
                 "test/README",
         
     | 
| 
       39 
40 
     | 
    
         
             
                 "test/helper.rb",
         
     | 
| 
       40 
41 
     | 
    
         
             
                 "test/test_client.rb",
         
     | 
| 
         @@ -33,17 +33,29 @@ module GData 
     | 
|
| 
       33 
33 
     | 
    
         
             
                      headers = []
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                      first = true
         
     | 
| 
       36 
     | 
    
         
            -
                      CSV 
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
      
 36 
     | 
    
         
            +
                      require 'CSV'
         
     | 
| 
      
 37 
     | 
    
         
            +
                      if CSV.const_defined? :Reader
         
     | 
| 
      
 38 
     | 
    
         
            +
                        CSV::Reader.parse(response.body) do |row|
         
     | 
| 
      
 39 
     | 
    
         
            +
                          if first
         
     | 
| 
       38 
40 
     | 
    
         
             
                            first = false
         
     | 
| 
       39 
41 
     | 
    
         
             
                            headers = row.map { |x|x.strip.downcase.gsub(" ","_").to_sym }
         
     | 
| 
       40 
42 
     | 
    
         
             
                            next
         
     | 
| 
      
 43 
     | 
    
         
            +
                          end
         
     | 
| 
      
 44 
     | 
    
         
            +
                          body << Hash[*headers.zip(row).flatten]
         
     | 
| 
       41 
45 
     | 
    
         
             
                        end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
      
 46 
     | 
    
         
            +
                      else
         
     | 
| 
      
 47 
     | 
    
         
            +
                        CSV.parse(response.body) do |row|
         
     | 
| 
      
 48 
     | 
    
         
            +
                          if first
         
     | 
| 
      
 49 
     | 
    
         
            +
                            first = false
         
     | 
| 
      
 50 
     | 
    
         
            +
                            headers = row.map { |x|x.strip.downcase.gsub(" ","_").to_sym }
         
     | 
| 
      
 51 
     | 
    
         
            +
                            next
         
     | 
| 
      
 52 
     | 
    
         
            +
                          end
         
     | 
| 
      
 53 
     | 
    
         
            +
                          body << Hash[*headers.zip(row).flatten]
         
     | 
| 
      
 54 
     | 
    
         
            +
                        end              
         
     | 
| 
      
 55 
     | 
    
         
            +
                      end              
         
     | 
| 
       44 
56 
     | 
    
         
             
                      self.new :headers => headers, :body => body
         
     | 
| 
       45 
57 
     | 
    
         
             
                    end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
      
 58 
     | 
    
         
            +
                                        
         
     | 
| 
       47 
59 
     | 
    
         
             
                    # Implement enumerable                
         
     | 
| 
       48 
60 
     | 
    
         
             
                    def each
         
     | 
| 
       49 
61 
     | 
    
         
             
                      @body.each { |i| yield i }
         
     | 
    
        data/pkg/fusion_tables-0.1.1.gem
    CHANGED
    
    | 
         Binary file 
     | 
| 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: fusion_tables
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 31
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 1
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 2
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.1.2
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Simon Tokumine
         
     | 
| 
         @@ -16,7 +16,7 @@ autorequire: 
     | 
|
| 
       16 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
            date: 2010- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2010-09-01 00:00:00 +01:00
         
     | 
| 
       20 
20 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       22 
22 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -77,6 +77,7 @@ files: 
     | 
|
| 
       77 
77 
     | 
    
         
             
            - lib/fusion_tables/ext/fusion_tables.rb
         
     | 
| 
       78 
78 
     | 
    
         
             
            - pkg/fusion_tables-0.1.0.gem
         
     | 
| 
       79 
79 
     | 
    
         
             
            - pkg/fusion_tables-0.1.1.gem
         
     | 
| 
      
 80 
     | 
    
         
            +
            - pkg/fusion_tables-0.1.2.gem
         
     | 
| 
       80 
81 
     | 
    
         
             
            - test/README
         
     | 
| 
       81 
82 
     | 
    
         
             
            - test/helper.rb
         
     | 
| 
       82 
83 
     | 
    
         
             
            - test/test_client.rb
         
     |