ocean-rails 7.5.1 → 7.6.0

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: ec8e50ad0c178c67ee4500bd94d19459468215a893b3b33d826c3942a9bce10c
4
- data.tar.gz: e8d0e26940271573cb45bf1cbd877be5dfb6335397246ae78630024bf61c464c
3
+ metadata.gz: fd6296af40249a4833a02e546ae3aff19490395201103567c6cba4c44a8e2ca5
4
+ data.tar.gz: 27810f580405fa44dcde7f762dc4d8a60c95b6c2551c50f84a58a788b1b4d750
5
5
  SHA512:
6
- metadata.gz: f218b0bf3f06d52c8bf07d6426dbf5b036bb58b74027eaefe01f6f4821b4254b846c81e0e9d992d980282faf70285d4d54a290105a35defce90809289a8087bc
7
- data.tar.gz: 6ddcb051c7b611da0662eb46aadf35f138d3e1969e3adc3bee1033501ceded0bb44c42eafff782fe14d83811454958e8a8e711e9afea63d77e5e067a37c5c35b
6
+ metadata.gz: 30190a48426d0c77029910ca5a72d90ec3815f5ba250a0f7b479804cf3b6d2dae68081541c0eea1909824855edaad8dfe0397949d716010e794819dba003528d
7
+ data.tar.gz: e9b093c960e0e392987252c5a62001da8d28db624be9a68f901616cbf11a3d8822bac1c2dac6a75feabbf12b2691afe3ff5354c5437e12e33d0d6396d472857c
@@ -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
- To run the specs for the +ocean-rails+ gem, you must first install DynamoDB Local.
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "7.5.1"
2
+ VERSION = "7.6.0"
3
3
  end
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.5.1
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-01 00:00:00.000000000 Z
11
+ date: 2018-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus