big_shift 0.0.1 → 0.0.2

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: 8dc1bd209d69121511dbf0b3efffceb8c38c45e9
4
- data.tar.gz: f05ef9279b88a0e8d630005a7ee541bd53e57d09
3
+ metadata.gz: 3a10bb846e14565885a114bf9d5bfa6f366285e1
4
+ data.tar.gz: 0d77b0d53f60662df97b676b85f7ac3bba112137
5
5
  SHA512:
6
- metadata.gz: b132ceb754777e66bd3a824a230014a3f0eae8047f506d73796549b904adb15f700ab474a2f181bc08cc436c9da2f8d67920c28a67576716d7b69014671f37df
7
- data.tar.gz: 943089b7da61fd19178b5273e7fe71f73eccd6cef09301a880ad5a063a47b3ab890d5094c49af93455b6331ec7c4a9c8e80c7dc1366b3e73c70f8fb3888a8cf3
6
+ metadata.gz: 5218f828a2c52eaec483c198444e2cb3140ad4da03542656979ce90c3c590650e15c0074ded595b6f9ebc327fdf3bfa3134979050bff46637a8a74c3d77d3c3c
7
+ data.tar.gz: 9e8ec72267bfa7a045a165557163d78d5ccd0bb6130ea6787d1508ca6c674f7cc0297c406ca414e3f8fa92c0d137306665a63365b012702dd5feb3464bf3fad0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  BigShift
2
- ======
2
+ ========
3
+
4
+ [![Build Status](https://semaphoreci.com/api/v1/projects/a64ee96b-9362-4c5b-b59a-03cf638eca28/344206/badge.svg)](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 `vcr_insert_table` is required
25
- and must have a field named `field` of type `string`.
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 `vcr_create_table` will need to be deleted
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 envrionment variables are required
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
- #### Find AwesomenessTv Variables
48
-
49
- ##### Project ID, Dataset ID
50
-
51
- Look on the BigQuery dashboard or talk to a team member.
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
@@ -1,6 +1,7 @@
1
1
  module BigShift
2
2
  class Schema < BaseModel
3
3
  attr_reader :table_name
4
+ attr_reader :fields
4
5
 
5
6
  def initialize(table_name)
6
7
  @table_name = table_name
@@ -1,5 +1,8 @@
1
1
  module BigShift
2
2
  class TableField < BaseModel
3
+ attr_reader :field_name
4
+ attr_reader :field_type
5
+
3
6
  def initialize(field_name, field_type)
4
7
  @field_name = field_name
5
8
  @field_type = field_type
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.1
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-02-06 00:00:00.000000000 Z
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: '3'
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: '3'
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.5
203
+ rubygems_version: 2.4.6
190
204
  signing_key:
191
205
  specification_version: 4
192
206
  summary: BigShift API interface