big_shift 0.0.1 → 0.0.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.
- checksums.yaml +4 -4
- data/README.md +22 -29
- data/lib/big_shift/models/schema.rb +1 -0
- data/lib/big_shift/models/table_field.rb +3 -0
- metadata +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a10bb846e14565885a114bf9d5bfa6f366285e1
|
|
4
|
+
data.tar.gz: 0d77b0d53f60662df97b676b85f7ac3bba112137
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5218f828a2c52eaec483c198444e2cb3140ad4da03542656979ce90c3c590650e15c0074ded595b6f9ebc327fdf3bfa3134979050bff46637a8a74c3d77d3c3c
|
|
7
|
+
data.tar.gz: 9e8ec72267bfa7a045a165557163d78d5ccd0bb6130ea6787d1508ca6c674f7cc0297c406ca414e3f8fa92c0d137306665a63365b012702dd5feb3464bf3fad0
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
BigShift
|
|
2
|
-
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
[](https://semaphoreci.com/awesomenesstv/big_shift)
|
|
3
5
|
|
|
4
6
|
BigShift uploads your data to BigQuery.
|
|
5
7
|
|
|
@@ -21,18 +23,18 @@ Run Specs
|
|
|
21
23
|
|
|
22
24
|
A BigQuery dataset is necessary to regenerate cassettes.
|
|
23
25
|
The dataset may be named anything,
|
|
24
|
-
but a table named `
|
|
25
|
-
and must have a field named `
|
|
26
|
+
but a table named `insert_table` is required
|
|
27
|
+
and must have a field named `field1` of type `string`.
|
|
26
28
|
|
|
27
29
|
If the cassettes have been regenerated against an existing dataset,
|
|
28
|
-
the table named `
|
|
30
|
+
the table named `create_table` will need to be deleted
|
|
29
31
|
prior to generating vcr cassettes again.
|
|
30
32
|
|
|
31
33
|
|
|
32
34
|
#### Environment Variables
|
|
33
35
|
|
|
34
36
|
In order to regenerate vcr cassettes,
|
|
35
|
-
some
|
|
37
|
+
some environment variables are required
|
|
36
38
|
and should be added to a `.env` file in the root of the project:
|
|
37
39
|
|
|
38
40
|
```
|
|
@@ -43,31 +45,13 @@ BIG_SHIFT_GOOGLE_CLIENT_ID = [google-client-id]
|
|
|
43
45
|
BIG_SHIFT_GOOGLE_CLIENT_SECRET = [google-client-secret]
|
|
44
46
|
```
|
|
45
47
|
|
|
48
|
+
##### Existing Values
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
##### Client ID and Client Secret
|
|
55
|
-
|
|
56
|
-
1. Go to [the Google API Console][google-api-console].
|
|
57
|
-
2. Log in as `awesomenesstv.dev@gmail.com` (see a team member for the password).
|
|
58
|
-
3. Select the `Business Intelligence` project (if not already there).
|
|
59
|
-
4. Click on `Credentials` on the left nav (under `APIs and auth`).
|
|
60
|
-
5. Client ID and Client Secret are listed under `Client ID for web application`.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
##### Refresh Token (requires Client ID & Client Secret)
|
|
64
|
-
|
|
65
|
-
1. Sign in to Google as `awesomenesstv.dev@gmail.com`.
|
|
66
|
-
1. Go to [the OAuth playground][oauth-playground].
|
|
67
|
-
2. Select the BigQuery APIs (`bigquery` and `bigquery.insertdata` scopes).
|
|
68
|
-
3. Use the gear/options dropdown to set the Client ID and Client Secret.
|
|
69
|
-
4. Click on `Authorize APIs`.
|
|
70
|
-
5. Look for the `Refresh token` value that is generated.
|
|
50
|
+
Follow instructions [here][atv-wiki] to retrieve values
|
|
51
|
+
for each of the environment variables.
|
|
52
|
+
You can also find instructions on finding a pre-defined list of variables there
|
|
53
|
+
(sans the `BIG_SHIFT_REFRESH_TOKEN` as that is user-specific
|
|
54
|
+
and you will be required to generate one).
|
|
71
55
|
|
|
72
56
|
|
|
73
57
|
Usage
|
|
@@ -123,5 +107,14 @@ BigShift.insert_rows 'MyTable', rows
|
|
|
123
107
|
```
|
|
124
108
|
|
|
125
109
|
|
|
110
|
+
Deployment
|
|
111
|
+
----------
|
|
112
|
+
|
|
113
|
+
This project makes use of branches to manage deployment.
|
|
114
|
+
Pushing a new commit to the `production` branch
|
|
115
|
+
will also build and push this gem to RubyGems.
|
|
116
|
+
|
|
117
|
+
|
|
126
118
|
[google-api-console]: https://code.google.com/apis/console
|
|
127
119
|
[oauth-playground]: https://developers.google.com/oauthplayground
|
|
120
|
+
[atv-wiki]: https://www.github.com/awesomenesstv/wiki
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: big_shift
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Travis Herrick
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: faraday
|
|
@@ -45,14 +45,28 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '4'
|
|
49
49
|
type: :development
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
55
|
+
version: '4'
|
|
56
|
+
- !ruby/object:Gem::Dependency
|
|
57
|
+
name: gems
|
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0'
|
|
63
|
+
type: :development
|
|
64
|
+
prerelease: false
|
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - "~>"
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '0'
|
|
56
70
|
- !ruby/object:Gem::Dependency
|
|
57
71
|
name: cane
|
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -186,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
186
200
|
version: '0'
|
|
187
201
|
requirements: []
|
|
188
202
|
rubyforge_project:
|
|
189
|
-
rubygems_version: 2.4.
|
|
203
|
+
rubygems_version: 2.4.6
|
|
190
204
|
signing_key:
|
|
191
205
|
specification_version: 4
|
|
192
206
|
summary: BigShift API interface
|