ocean-rails 7.5.1 → 7.6.0
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.rdoc +1 -20
- data/lib/ocean-rails.rb +24 -0
- data/lib/ocean/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: fd6296af40249a4833a02e546ae3aff19490395201103567c6cba4c44a8e2ca5
|
|
4
|
+
data.tar.gz: 27810f580405fa44dcde7f762dc4d8a60c95b6c2551c50f84a58a788b1b4d750
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 30190a48426d0c77029910ca5a72d90ec3815f5ba250a0f7b479804cf3b6d2dae68081541c0eea1909824855edaad8dfe0397949d716010e794819dba003528d
|
|
7
|
+
data.tar.gz: e9b093c960e0e392987252c5a62001da8d28db624be9a68f901616cbf11a3d8822bac1c2dac6a75feabbf12b2691afe3ff5354c5437e12e33d0d6396d472857c
|
data/README.rdoc
CHANGED
|
@@ -36,26 +36,7 @@ Cf. the tutorial at http://wiki.oceanframework.net/index.php/Tutorial for inform
|
|
|
36
36
|
|
|
37
37
|
=== Running the specs
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
It's a Java clone of Amazon DynamoDB which runs locally on your computer. We use
|
|
41
|
-
it for development and testing.
|
|
42
|
-
|
|
43
|
-
Download DynamoDB Local from the following location: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html
|
|
44
|
-
|
|
45
|
-
Start DynamoDB Local:
|
|
46
|
-
|
|
47
|
-
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
|
|
48
|
-
|
|
49
|
-
Replace +-sharedDb+ with +-inMemory+ to run the DB in RAM.
|
|
50
|
-
|
|
51
|
-
Edit the contents of +config.yml+ to suit your setup, if necessary.
|
|
52
|
-
|
|
53
|
-
You must now generate the SQLite databases:
|
|
54
|
-
|
|
55
|
-
rake db:migrate
|
|
56
|
-
RAILS_ENV=test rake db:migrate
|
|
57
|
-
|
|
58
|
-
With DynamoDB Local running, you should now be able to do
|
|
39
|
+
There are no runtime dependencies. Simply run:
|
|
59
40
|
|
|
60
41
|
bundle exec rspec
|
|
61
42
|
|
data/lib/ocean-rails.rb
CHANGED
|
@@ -150,3 +150,27 @@ end
|
|
|
150
150
|
def superuser?
|
|
151
151
|
member_of_group?("Superusers")
|
|
152
152
|
end
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def aws_config(endpoint: nil, **keywords)
|
|
156
|
+
if ENV['AWS_ACCESS_KEY_ID'].present? && ENV['AWS_SECRET_ACCESS_KEY'].present?
|
|
157
|
+
raise "AWS_REGION not defined" unless ENV['AWS_REGION'].present?
|
|
158
|
+
{
|
|
159
|
+
region: ENV['AWS_REGION'],
|
|
160
|
+
credentials: Aws::Credentials.new(ENV['AWS_ACCESS_KEY_ID'],
|
|
161
|
+
ENV['AWS_SECRET_ACCESS_KEY'])
|
|
162
|
+
}
|
|
163
|
+
elsif endpoint.present? && ENV[endpoint].present?
|
|
164
|
+
{
|
|
165
|
+
region: "eu-west-1", # Doesn't matter in this context
|
|
166
|
+
credentials: Aws::Credentials.new('not', 'used'),
|
|
167
|
+
endpoint: ENV[endpoint]
|
|
168
|
+
}.merge(keywords)
|
|
169
|
+
else
|
|
170
|
+
raise "AWS_REGION not defined" unless ENV['AWS_REGION'].present?
|
|
171
|
+
{
|
|
172
|
+
region: ENV['AWS_REGION'],
|
|
173
|
+
credentials: Aws::InstanceProfileCredentials.new
|
|
174
|
+
}
|
|
175
|
+
end
|
|
176
|
+
end
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ocean-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Bengtson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|