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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa391fbff6c5016740bc28cfb0692fcc79ee2e1361d31541a635691e6cbbc8a7
4
- data.tar.gz: ef1fbb6307221f616576e844ced0ed9398ff9e6db436fde0142e58c89be8c9f5
3
+ metadata.gz: 763fdc0eeba122974a101d60e8b17045d3d55dcf63f7144fe4db181a6808b858
4
+ data.tar.gz: 2afff645fa2b925e9317100043a2c574574c7245a99edbc29c8da5c508cb766a
5
5
  SHA512:
6
- metadata.gz: e37d29e7d93b1aa61d6266b5feccc3789087f697c1751830893adc4c795761f587bafdaa44f34de6b5786712d8983e66511d3d0f10fa1b0922ec6921e4201e66
7
- data.tar.gz: 0ccaf8bbb67bceb9136806a93da4447ace996ab9709e82d8f6861249e6a62246680c3a618a1479481b931127e568e966038569da2d1814540ef64b7ab3dd155e
6
+ metadata.gz: a0e3cf85dfd919a884f90de3bdb1a6896bedc12ed327ae237858ae4182d2565e7d4c19453b2d68f77717ed8763c65ba6565ba654ef34c49aed2273e51d43c5cb
7
+ data.tar.gz: 387787c6e6f2ab20ff30714374591fd7211fbb9b3181e35df0a0e27fe800444af1d7428c00c7648c1ba2e3b7f1a1e6672574f0e3a38cfa1124d1bcaadd83adcd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.4 / 2021-03-02
2
+
3
+ * Added configurable polling period (thanks [jesseproudman](https://github.com/jesseproudman))
4
+
1
5
  ## 0.3.3 / 2021-01-12
2
6
 
3
7
  * Added support for Ruby 3.0 (thanks [blackjiro](https://github.com/blackjiro))
data/Gemfile.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- athens (0.3.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.416.0)
12
- aws-sdk-athena (1.33.0)
13
- aws-sdk-core (~> 3, >= 3.109.0)
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.111.0)
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 = 'access' # Optional
91
- config.aws_secret_key = 'secret' # Optional
92
- config.aws_region = 'us-east-1' # Optional
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
+
@@ -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(0.25)
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
-
@@ -1,3 +1,3 @@
1
1
  module Athens
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
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.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-01-12 00:00:00.000000000 Z
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