ocean-dynamo 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{README.rdoc → README.md} +33 -22
- data/lib/ocean-dynamo/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: 75ca78788e4c6fede73f78af4d7c8730e9f868198cd95f8905094f9e0032e45d
|
4
|
+
data.tar.gz: 798dc05815ecb753dcbe7062ecff1906108cde3ea498a25c53c0c4cea6588985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a4b8a30c990f58440f15245c90e3fd66aff7484d197a40dc48af85972bd2066858e8b4720a3273a35ee779300234e79d9ca79d21517c41f855441dc7ca2b71
|
7
|
+
data.tar.gz: 1e8df34da4547b6d00108a844b73c195ba25334866cc2f3f44016de9216ced945e67e59e20097590b19e96a2ec7fa5e439b217dd82ccb591d6c0bd414c387910
|
data/{README.rdoc → README.md}
RENAMED
@@ -318,28 +318,39 @@ To get the highest +:expires_at+ record:
|
|
318
318
|
|
319
319
|
|
320
320
|
== Installation
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
321
|
+
```
|
322
|
+
gem install ocean-dynamo
|
323
|
+
```
|
324
|
+
|
325
|
+
Ocean-dynamo relies on Aws.config to fetch configuration data. In Ocean, we use
|
326
|
+
an init file similar to this one:
|
327
|
+
```
|
328
|
+
cfg = if ENV['AWS_ACCESS_KEY_ID'].present? && ENV['AWS_SECRET_ACCESS_KEY'].present?
|
329
|
+
{
|
330
|
+
region: ENV['AWS_REGION'],
|
331
|
+
credentials: Aws::Credentials.new(ENV['AWS_ACCESS_KEY_ID'],
|
332
|
+
ENV['AWS_SECRET_ACCESS_KEY'])
|
333
|
+
}
|
334
|
+
elsif ENV['AWS_DYNAMODB_ENDPOINT'].present?
|
335
|
+
{
|
336
|
+
region: "eu-west-1", # Doesn't matter in this context
|
337
|
+
credentials: Aws::Credentials.new('not', 'used'),
|
338
|
+
endpoint: ENV['AWS_DYNAMODB_ENDPOINT']
|
339
|
+
}
|
340
|
+
else
|
341
|
+
{
|
342
|
+
region: ENV['AWS_REGION'],
|
343
|
+
credentials: Aws::InstanceProfileCredentials.new
|
344
|
+
}
|
345
|
+
end
|
346
|
+
Aws.config.update(cfg)
|
347
|
+
```
|
348
|
+
As you can see, this relies on ENV variables to choose from three different
|
349
|
+
setups:
|
350
|
+
#. If you're using discrete AWS credentials, set AWS_REGION, AWS_ACCESS_KEY_ID,
|
351
|
+
and AWS_SECRET_ACCESS_KEY.
|
352
|
+
#. If you're using localstack, provide AWS_DYNAMODB_ENDPOINT (http://localhost:4569).
|
353
|
+
#. If you're using EC2 or ECS instance profile credentials, set only AWS_REGION.
|
343
354
|
|
344
355
|
== Running the specs
|
345
356
|
|
data/lib/ocean-dynamo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-dynamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
@@ -172,7 +172,7 @@ extensions: []
|
|
172
172
|
extra_rdoc_files: []
|
173
173
|
files:
|
174
174
|
- LICENSE
|
175
|
-
- README.
|
175
|
+
- README.md
|
176
176
|
- Rakefile
|
177
177
|
- config/routes.rb
|
178
178
|
- lib/ocean-dynamo.rb
|