bigquery 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bigquery.rb +10 -1
- metadata +78 -85
data/lib/bigquery.rb
CHANGED
@@ -27,10 +27,16 @@ class BigQuery
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def query(q)
|
30
|
-
api({
|
30
|
+
res = api({
|
31
31
|
:api_method => @bq.jobs.query,
|
32
32
|
:body_object => { "query" => q, 'timeoutMs' => 90 * 1000}
|
33
33
|
})
|
34
|
+
|
35
|
+
if res.has_key? "errors"
|
36
|
+
raise BigQueryError, "BigQuery has returned and error #{res['errors']}"
|
37
|
+
else
|
38
|
+
res
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
def load(opts)
|
@@ -119,3 +125,6 @@ class BigQuery
|
|
119
125
|
JSON.parse(resp.body)
|
120
126
|
end
|
121
127
|
end
|
128
|
+
|
129
|
+
class BigQueryError < StandardError
|
130
|
+
end
|
metadata
CHANGED
@@ -1,124 +1,117 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigquery
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.8
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 7
|
10
|
-
version: 0.2.7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Adam Bronte
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: google-api-client
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
22
17
|
none: false
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
hash: 3
|
27
|
-
segments:
|
28
|
-
- 0
|
29
|
-
- 4
|
30
|
-
- 6
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
31
21
|
version: 0.4.6
|
32
|
-
prerelease: false
|
33
22
|
type: :runtime
|
34
|
-
name: google-api-client
|
35
|
-
requirement: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 3
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
46
23
|
prerelease: false
|
47
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.4.6
|
30
|
+
- !ruby/object:Gem::Dependency
|
48
31
|
name: bundler
|
49
|
-
requirement:
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
52
33
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
60
|
-
prerelease: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
61
38
|
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
62
47
|
name: rake
|
63
|
-
requirement:
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
66
49
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
segments:
|
72
|
-
- 0
|
73
|
-
version: "0"
|
74
|
-
prerelease: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
75
54
|
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
76
63
|
name: minitest
|
77
|
-
requirement:
|
78
|
-
|
79
|
-
|
80
|
-
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: ! 'This library is a wrapper around the google-api-client ruby gem.
|
79
|
+
|
80
|
+
It''s meant to make calls to BigQuery easier and streamlined.'
|
81
81
|
email: adam@brontesaurus.com
|
82
82
|
executables: []
|
83
|
-
|
84
83
|
extensions: []
|
85
|
-
|
86
84
|
extra_rdoc_files: []
|
87
|
-
|
88
|
-
files:
|
85
|
+
files:
|
89
86
|
- lib/bigquery.rb
|
90
87
|
homepage: https://github.com/abronte/BigQuery
|
91
88
|
licenses: []
|
92
|
-
|
93
89
|
post_install_message:
|
94
90
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
91
|
+
require_paths:
|
97
92
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
94
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
segments:
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
segments:
|
105
100
|
- 0
|
106
|
-
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
hash: -34495196894626883
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
103
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
segments:
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
segments:
|
114
109
|
- 0
|
115
|
-
|
110
|
+
hash: -34495196894626883
|
116
111
|
requirements: []
|
117
|
-
|
118
112
|
rubyforge_project:
|
119
113
|
rubygems_version: 1.8.24
|
120
114
|
signing_key:
|
121
115
|
specification_version: 3
|
122
116
|
summary: A nice wrapper for Google Big Query
|
123
117
|
test_files: []
|
124
|
-
|