bigbroda 0.0.2 → 0.0.3

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: 6fccea072492e7e4324d86cd6f244edfcb747329
4
- data.tar.gz: b4ace5514f1fa3321e32e64f3c5d415cd753b1c1
3
+ metadata.gz: cb56c32d1fba2dcc19944b70cdcce07d00daf0ac
4
+ data.tar.gz: 6e41a57bbf8b54aeff67938007905c064d58c910
5
5
  SHA512:
6
- metadata.gz: 5b0f96678ecc0b2434127172dcbb72fecb18e55840b8a2c7b682028fc17605c1f8de6b1b7fc514c39e7a702c11b0b3e3e8122e1faaa1bbd4f51101ac1cd73b18
7
- data.tar.gz: bd5511d3292c258dc675d9b8771c2aa794e53ad1ac22651c5bccb60da93d20a497d2c2e7ede2fbd6121215652a0f9d0b99c6a6596329f31f9630d1d631899754
6
+ metadata.gz: 63bc8813d52137ebe8bd3a08db04fa54779cc37a6ff6c59c7899141b580c65148ec79203437201d843ca92bc85e9a3c8f3894dd5d670e0478b5d4719a7ab73d5
7
+ data.tar.gz: d06b621031b8f460ef2f7cc9d29ed1d8adab60b70d67fc490489b3d1cf691d54026de60bec2ab240d5ba2cfb17ca75ea0e9200515dedac002aa82388974845e8
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .DS_Store
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -11,6 +12,7 @@ doc/
11
12
  lib/bundler/man
12
13
  pkg
13
14
  rdoc
15
+ .rvmrc
14
16
  spec/reports
15
17
  test/tmp
16
18
  test/version_tmp
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ bigquery
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
@@ -1,5 +1,6 @@
1
1
  require 'active_record/connection_adapters/abstract_adapter'
2
2
  require 'active_record/connection_adapters/statement_pool'
3
+ require 'active_record/connection_adapters/abstract/schema_statements'
3
4
  require 'arel/visitors/bind_visitor'
4
5
 
5
6
  module ActiveRecord
@@ -373,7 +374,8 @@ module ActiveRecord
373
374
  end
374
375
 
375
376
  class BigqueryAdapter < AbstractAdapter
376
-
377
+
378
+ include SchemaStatements
377
379
 
378
380
  class Version
379
381
  end
@@ -568,7 +570,7 @@ module ActiveRecord
568
570
  #:timestamp => { :name => "datetime" },
569
571
  :timestamp => { name: "TIMESTAMP" },
570
572
  #:time => { :name => "time" },
571
- #:date => { :name => "date" },
573
+ :date => { :name => "TIMESTAMP" },
572
574
  :record => { :name => "RECORD" },
573
575
  :boolean => { :name => "BOOLEAN" }
574
576
  }
@@ -796,8 +798,7 @@ module ActiveRecord
796
798
  drop_table(table_name, options)
797
799
  end
798
800
 
799
-
800
- hsh = td.columns.map { |c| {"name"=> c[:name], "type"=> c[:type] } }
801
+ hsh = td.columns.map { |c| {"name"=> c[:name], "type"=> type_to_sql(c[:type]) } }
801
802
 
802
803
  @table_body = { "tableReference"=> {
803
804
  "projectId"=> @config[:project],
@@ -27,11 +27,10 @@ module GoogleBigquery
27
27
  end
28
28
 
29
29
  #Retrieves the results of a query job.
30
- def self.getQueryResults(project_id , job_id, body={})
30
+ def self.getQueryResults(project_id , job_id, params={})
31
31
  res = GoogleBigquery::Auth.client.execute(
32
32
  :api_method=> GoogleBigquery::Auth.api.jobs.get_query_results,
33
- :body_object=> body,
34
- :parameters=> {"projectId"=> project_id, "jobId"=>job_id}
33
+ :parameters=> {"projectId"=> project_id, "jobId"=>job_id}.merge(params)
35
34
  )
36
35
  parse_response(res)
37
36
  end
@@ -47,11 +46,10 @@ module GoogleBigquery
47
46
  end
48
47
 
49
48
  #Lists all the Jobs in the specified project that were started by the user.
50
- def self.list(project_id, body={})
49
+ def self.list(project_id, params={})
51
50
  res = GoogleBigquery::Auth.client.execute(
52
51
  :api_method=> GoogleBigquery::Auth.api.jobs.list,
53
- :body_object=> body,
54
- :parameters=> {"projectId"=> project_id}
52
+ :parameters=> {"projectId"=> project_id}.merge(params)
55
53
  )
56
54
  parse_response(res)
57
55
  end
@@ -171,4 +169,4 @@ module GoogleBigquery
171
169
  end
172
170
 
173
171
  end
174
- end
172
+ end
@@ -1,3 +1,3 @@
1
1
  module GoogleBigquery
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigbroda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - miguel michelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,18 +118,15 @@ files:
118
118
  - .gitignore
119
119
  - .pryrc
120
120
  - .rspec
121
- - .rvmrc
121
+ - .ruby-gemset
122
+ - .ruby-version
122
123
  - Gemfile
123
124
  - LICENSE.txt
124
125
  - README.md
125
126
  - Rakefile
126
127
  - google_bigquery.gemspec
127
- - lib/.DS_Store
128
- - lib/active_record/.DS_Store
129
128
  - lib/active_record/connection_adapters/bigquery_adapter.rb
130
129
  - lib/active_record/tasks/bigquery_database_tasks.rb
131
- - lib/generators/.DS_Store
132
- - lib/generators/google_bigquery/.DS_Store
133
130
  - lib/generators/google_bigquery/install/install_generator.rb
134
131
  - lib/generators/templates/README
135
132
  - lib/generators/templates/bigquery.rb.erb
@@ -145,8 +142,6 @@ files:
145
142
  - lib/google_bigquery/table.rb
146
143
  - lib/google_bigquery/table_data.rb
147
144
  - lib/google_bigquery/version.rb
148
- - spec/.DS_Store
149
- - spec/dummy/.DS_Store
150
145
  - spec/dummy/.gitignore
151
146
  - spec/dummy/README.rdoc
152
147
  - spec/dummy/Rakefile
@@ -198,11 +193,8 @@ files:
198
193
  - spec/dummy/test/models/log_data_test.rb
199
194
  - spec/dummy/test/models/post_test.rb
200
195
  - spec/dummy/test/models/user_test.rb
201
- - spec/fixtures/.DS_Store
202
196
  - spec/fixtures/configs/account_config.yml-example
203
- - spec/fixtures/keys/.DS_Store
204
197
  - spec/fixtures/keys/example-privatekey-p12
205
- - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/.DS_Store
206
198
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/adapter/simple_quering.yml
207
199
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/after_each.yml
208
200
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/authorize_config.yml
@@ -269,8 +261,6 @@ signing_key:
269
261
  specification_version: 4
270
262
  summary: This library is build on top of google-api-client, ActiveRecord >4 compatible
271
263
  test_files:
272
- - spec/.DS_Store
273
- - spec/dummy/.DS_Store
274
264
  - spec/dummy/.gitignore
275
265
  - spec/dummy/README.rdoc
276
266
  - spec/dummy/Rakefile
@@ -322,11 +312,8 @@ test_files:
322
312
  - spec/dummy/test/models/log_data_test.rb
323
313
  - spec/dummy/test/models/post_test.rb
324
314
  - spec/dummy/test/models/user_test.rb
325
- - spec/fixtures/.DS_Store
326
315
  - spec/fixtures/configs/account_config.yml-example
327
- - spec/fixtures/keys/.DS_Store
328
316
  - spec/fixtures/keys/example-privatekey-p12
329
- - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/.DS_Store
330
317
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/adapter/simple_quering.yml
331
318
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/after_each.yml
332
319
  - spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/authorize_config.yml
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm 2.0.0@bigquery --create
data/lib/.DS_Store DELETED
Binary file
Binary file
Binary file
data/spec/.DS_Store DELETED
Binary file
data/spec/dummy/.DS_Store DELETED
Binary file
Binary file
Binary file