athens 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +5 -5
- data/README.md +8 -6
- data/lib/athens/configuration.rb +5 -3
- data/lib/athens/query.rb +2 -3
- data/lib/athens/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 763fdc0eeba122974a101d60e8b17045d3d55dcf63f7144fe4db181a6808b858
|
4
|
+
data.tar.gz: 2afff645fa2b925e9317100043a2c574574c7245a99edbc29c8da5c508cb766a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e3cf85dfd919a884f90de3bdb1a6896bedc12ed327ae237858ae4182d2565e7d4c19453b2d68f77717ed8763c65ba6565ba654ef34c49aed2273e51d43c5cb
|
7
|
+
data.tar.gz: 387787c6e6f2ab20ff30714374591fd7211fbb9b3181e35df0a0e27fe800444af1d7428c00c7648c1ba2e3b7f1a1e6672574f0e3a38cfa1124d1bcaadd83adcd
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
athens (0.3.
|
4
|
+
athens (0.3.4)
|
5
5
|
aws-sdk-athena (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
aws-eventstream (1.1.0)
|
11
|
-
aws-partitions (1.
|
12
|
-
aws-sdk-athena (1.
|
13
|
-
aws-sdk-core (~> 3, >= 3.
|
11
|
+
aws-partitions (1.430.0)
|
12
|
+
aws-sdk-athena (1.35.0)
|
13
|
+
aws-sdk-core (~> 3, >= 3.112.0)
|
14
14
|
aws-sigv4 (~> 1.1)
|
15
|
-
aws-sdk-core (3.
|
15
|
+
aws-sdk-core (3.112.0)
|
16
16
|
aws-eventstream (~> 1, >= 1.0.2)
|
17
17
|
aws-partitions (~> 1, >= 1.239.0)
|
18
18
|
aws-sigv4 (~> 1.1)
|
data/README.md
CHANGED
@@ -44,8 +44,8 @@ When your query is done, grab the results as an array:
|
|
44
44
|
```ruby
|
45
45
|
results = query.to_a
|
46
46
|
# [
|
47
|
-
# ['column_1', 'column_2', 'column_3'],
|
48
|
-
# [15, 'data', true],
|
47
|
+
# ['column_1', 'column_2', 'column_3'],
|
48
|
+
# [15, 'data', true],
|
49
49
|
# [20, 'foo', false],
|
50
50
|
# ...
|
51
51
|
# ]
|
@@ -55,7 +55,7 @@ Or as a hash (which is really an array where each row is a hash):
|
|
55
55
|
```ruby
|
56
56
|
results = query.to_h
|
57
57
|
# [
|
58
|
-
# {'column_1': 15, 'column_2': 'data', 'column_3': true},
|
58
|
+
# {'column_1': 15, 'column_2': 'data', 'column_3': true},
|
59
59
|
# {'column_1': 20, 'column_2': 'foo', 'column_3': false},
|
60
60
|
# ...
|
61
61
|
# ]
|
@@ -87,9 +87,10 @@ Configure your AWS settings in an `Athens.configure` block (in rails put this in
|
|
87
87
|
```ruby
|
88
88
|
Athens.configure do |config|
|
89
89
|
config.output_location = "s3://my-bucket/my-folder/athena/results/" # Required
|
90
|
-
config.aws_access_key
|
91
|
-
config.aws_secret_key
|
92
|
-
config.aws_region
|
90
|
+
config.aws_access_key = 'access' # Optional
|
91
|
+
config.aws_secret_key = 'secret' # Optional
|
92
|
+
config.aws_region = 'us-east-1' # Optional
|
93
|
+
config.wait_polling_period = 0.25 # Optional - What period should we poll for the complete query?
|
93
94
|
end
|
94
95
|
```
|
95
96
|
|
@@ -172,3 +173,4 @@ The gem is available as open source under the terms of the [WTFPL License](http:
|
|
172
173
|
## Code of Conduct
|
173
174
|
|
174
175
|
Everyone interacting in the Athens project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/getletterpress/athens/blob/master/CODE_OF_CONDUCT.md).
|
176
|
+
|
data/lib/athens/configuration.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
module Athens
|
2
2
|
class Configuration
|
3
|
-
attr_accessor :aws_access_key,
|
3
|
+
attr_accessor :aws_access_key,
|
4
4
|
:aws_secret_key,
|
5
5
|
:aws_region,
|
6
|
-
:output_location
|
6
|
+
:output_location,
|
7
|
+
:wait_polling_period
|
7
8
|
|
8
9
|
def initialize
|
9
10
|
@aws_access_key = nil
|
10
11
|
@aws_secret_key = nil
|
11
12
|
@aws_region = nil
|
12
13
|
@output_location = nil
|
14
|
+
@wait_polling_period = 0.25
|
13
15
|
end
|
14
16
|
end
|
15
|
-
end
|
17
|
+
end
|
data/lib/athens/query.rb
CHANGED
@@ -49,7 +49,7 @@ module Athens
|
|
49
49
|
end
|
50
50
|
|
51
51
|
# Wait a bit and check again
|
52
|
-
sleep(
|
52
|
+
sleep(Athens.configuration.wait_polling_period.to_f)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -173,9 +173,8 @@ module Athens
|
|
173
173
|
end
|
174
174
|
|
175
175
|
return mapped
|
176
|
-
end
|
176
|
+
end
|
177
177
|
|
178
178
|
|
179
179
|
end
|
180
180
|
end
|
181
|
-
|
data/lib/athens/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: athens
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schulte
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-athena
|