ocean-rails 7.2.1 → 7.2.2

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: acf56cf8bce9166dcc5a120e197bbdcd615f5c79baec5c99fe9b672fc07f1852
4
- data.tar.gz: 27f9e22eab32031c503ac330fbe664c2e2fefd6bf9f3c235889a47a5442d1b10
3
+ metadata.gz: 7d703c1b9eeb742809031eb05de80b67d9d1095605741b5846f1dfe3ec35ccdf
4
+ data.tar.gz: 38ec1bbd1abe2ca487ac2beae2de3e28e65560d9489b8a892fd212bddeec59f6
5
5
  SHA512:
6
- metadata.gz: 95889ce4e8ebb8aaf40c42f868e0c219a29617e17ccd2433f440cb137ee0df6b5a2fef9e84058322028479fe306388be394638a6f10ac4d1caa9573d10adffa0
7
- data.tar.gz: a3a08fc01c54b7a59391329f02cc641f0bb2454aa70310bddba99a59bef7a27931ae1d5e37c2143a777b726b1cf1037b83f3bcd3f4c9260d02b5cd1d9d0a59f2
6
+ metadata.gz: d2dbfc032c6b1774136e3a86e8bd073a6a5c820f8808dd3ee3eee561e68d0b7f0e8db439e16906d0a5f02a6da7645911afb20ff6c7eff259503d1502dbd5bb70
7
+ data.tar.gz: 9fbd5f15038821e33c3c2545a9738281cccaeb28b666616661212f75799ca54874722128adcb1c42c4657805f1e5ef2343e63a9f12efe2ed8508fa4eba6ef278
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2016 Peter Bengtson
1
+ Copyright 2018 Peter Bengtson
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  == The Ocean gem
2
2
 
3
3
  This repository contains the Ocean ruby gem, containing common framework functionality
4
- for the Ruby on Rails part of the architecture.
4
+ for the Ruby on Rails part of the architecture.
5
5
 
6
6
  Ocean requires Ruby 2.2 and Ruby on Rails 4.2.0 or later.
7
7
 
@@ -31,36 +31,24 @@ Thus, the +ocean-rails+ gem provides all the abstractions you need for creating
31
31
 
32
32
  === Creating an Ocean Rails app
33
33
 
34
- Cf. the tutorial at http://wiki.oceanframework.net/index.php/Tutorial for information on about how to set up an Ocean Rails app and create Ocean Resources for it.
34
+ Cf. the tutorial at http://wiki.oceanframework.net/index.php/Tutorial for information on about how to set up an Ocean Rails app and create Ocean Resources for it.
35
35
 
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
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
41
  it for development and testing.
42
42
 
43
43
  Download DynamoDB Local from the following location: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html
44
44
 
45
- Next, copy the AWS configuration file from the template:
46
-
47
- cp spec/dummy/config/aws.yml.example spec/dummy/config/aws.yml
48
-
49
- NB: +aws.yml+ should be excluded from source control. This allows you to enter your AWS
50
- credentials safely. On the other hand, +aws.yml.example+ SHOULD be under source control.
51
- Don't put sensitive information in it.
52
-
53
- You're now ready to start DynamoDB Local:
45
+ Start DynamoDB Local:
54
46
 
55
47
  java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
56
48
 
57
49
  Replace +-sharedDb+ with +-inMemory+ to run the DB in RAM.
58
50
 
59
- Next, copy the +config.yml+ file from its template:
60
-
61
- cp spec/dummy/config/config.yml.example spec/dummy/config/config.yml
62
-
63
- Edit the contents of +config.yml+ to suit your setup.
51
+ Edit the contents of +config.yml+ to suit your setup, if necessary.
64
52
 
65
53
  You must now generate the SQLite databases:
66
54
 
@@ -69,7 +57,7 @@ You must now generate the SQLite databases:
69
57
 
70
58
  With DynamoDB Local running, you should now be able to do
71
59
 
72
- rspec
60
+ bundle exec rspec
73
61
 
74
62
  All tests should pass.
75
63
 
@@ -94,4 +82,3 @@ prevent traffic only to specific hosts (e.g. +localhost+).
94
82
 
95
83
  When you leave the console, you must navigate back to the Rails directory (<tt>cd ../..</tt>)
96
84
  in order to be able to run RSpec again.
97
-
@@ -35,13 +35,13 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
35
35
 
36
36
  def turn_off_locales
37
37
  application "# No locales
38
- config.i18n.enforce_available_locales = false
38
+ config.i18n.enforce_available_locales = false
39
39
  "
40
40
  end
41
41
 
42
42
  def turn_off_asset_pipeline
43
43
  application "# Disable the asset pipeline
44
- config.assets.enabled = false
44
+ config.assets.enabled = false
45
45
  "
46
46
  end
47
47
 
@@ -70,7 +70,7 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
70
70
  g.stylesheets false
71
71
  g.helper false
72
72
  g.test_framework :rspec, :fixture => true
73
- g.fixture_replacement :factory_bot
73
+ g.fixture_replacement :factory_bot
74
74
  end
75
75
  "
76
76
  end
@@ -81,7 +81,6 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
81
81
  end
82
82
 
83
83
  def install_aws_yml_files
84
- template "aws.yml.example", "#{Rails.root}/config/aws.yml.example"
85
84
  template "aws.yml.example", "#{Rails.root}/config/aws.yml"
86
85
  end
87
86
 
@@ -1,22 +1,33 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "ocean-rails"
3
+ gem 'dotenv-rails', groups: [:development, :test]
4
4
 
5
- gem "rails"
6
- gem "pg"
7
- gem "foreigner"
8
- gem "jbuilder"
5
+ gem 'ocean-rails', '>= 7.0.0'
6
+ gem 'rails'
7
+
8
+ gem "puma"
9
+
10
+ gem 'mysql2', '~> 0.4.0'
11
+
12
+ gem 'jbuilder'
13
+ gem 'oj'
9
14
 
10
15
  gem "spring", group: :development
11
16
 
12
- group :test, :development do
13
- gem "sqlite3"
14
- gem "memory_test_fix"
15
- gem "rspec-rails"
16
- gem "simplecov", require: false
17
- gem "factory_bot_rails", "~> 4.0"
18
- gem "immigrant"
19
- gem "annotate", ">=2.5.0"
17
+ gem 'protected_attributes' # Rails 3 compatibility
18
+
19
+ group :development do
20
+ gem 'annotate', '>=2.5.0'
20
21
  end
21
22
 
22
- gem "protected_attributes"
23
+ group :test do
24
+ gem 'factory_bot_rails', '~> 4.0'
25
+ gem 'rspec-rails'
26
+ gem 'simplecov', require: false
27
+ end
28
+
29
+ group :test , :development do
30
+ gem 'guard'#, require:false
31
+ gem 'guard-rspec'#, require: false
32
+ gem 'foreman'
33
+ end
@@ -1,26 +1,13 @@
1
- ##########################################################################################
2
- # In order for the application to work, a file named config/aws.yml must exist.
3
- # You can use this file as a template: simply copy it, rename it and tailor its
4
- # contents. Please note that both aws.yml and aws.yml.example must exist - don't
5
- # delete this example file, as its values will be used by TeamCity for tests.
6
- #
7
- # If your application doesn't use any AWS functionality, you should delete both
8
- # aws.yml.example and aws.yml. In that case, none of them may exist in your application.
9
- #
10
- # NB: On AWS, the contents of this file will be replaced by an auto-generated file.
11
- ##########################################################################################
12
-
13
-
14
1
  fake_dynamo: &local
15
- region: eu-west-1
16
- endpoint: http://localhost:8000
2
+ region: <%= ENV['AWS_REGION'] %>
3
+ endpoint: <%= ENV['AWS_DYNAMODB_ENDPOINT'] %>
17
4
  access_key_id: xxx
18
5
  secret_access_key: xxx
19
6
 
20
7
  amazon: &amazon
21
- region: eu-west-1
22
- access_key_id: YOURACCESSKEYHERE
23
- secret_access_key: YOURSECRETKEYHERE
8
+ region: <%= ENV['AWS_REGION'] %>
9
+ access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
10
+ secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
24
11
 
25
12
 
26
13
  #
@@ -21,21 +21,12 @@
21
21
  # Ignore backup files
22
22
  *~
23
23
 
24
- # Ignore RubyMine local workspace settings
25
- /.idea/workspace.xml
26
-
27
- # Ignore any SQLite files
28
- /db/*.sqlite3
29
-
30
24
  # Ignore coverage artefacts
31
25
  /coverage
32
26
 
33
27
  # Ignore the tailored config.yml file
34
28
  config/config.yml
35
29
 
36
- # Ignore any tailored aws.yml file
37
- config/aws.yml
38
-
39
30
  # Ignore any tailored smtp.yml file
40
31
  config/smtp.yml
41
32
 
@@ -13,20 +13,20 @@ require 'rspec/rails'
13
13
  # in spec/support/ and its subdirectories.
14
14
  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
15
15
 
16
- # DynamoDB table cleaner
17
- OCEAN_ENV = "dev" unless defined?(OCEAN_ENV)
18
- regexp = Regexp.new("^.+_#{OCEAN_ENV}_[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}_(test|dev)$")
19
- cleaner = lambda {
20
- c = Aws::DynamoDB::Client.new
21
- c.list_tables.table_names.each do |t|
22
- begin
23
- c.delete_table({table_name: t}) if t =~ regexp
24
- rescue Aws::DynamoDB::Errors::LimitExceededException
25
- sleep 1
26
- retry
27
- end
28
- end
29
- }
16
+ # # DynamoDB table cleaner
17
+ # OCEAN_ENV = "dev" unless defined?(OCEAN_ENV)
18
+ # regexp = Regexp.new("^.+_#{OCEAN_ENV}_[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}_(test|dev)$")
19
+ # cleaner = lambda {
20
+ # c = Aws::DynamoDB::Client.new
21
+ # c.list_tables.table_names.each do |t|
22
+ # begin
23
+ # c.delete_table({table_name: t}) if t =~ regexp
24
+ # rescue Aws::DynamoDB::Errors::LimitExceededException
25
+ # sleep 1
26
+ # retry
27
+ # end
28
+ # end
29
+ # }
30
30
 
31
31
  RSpec.configure do |config|
32
32
  # ## Mock Framework
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "7.2.1"
2
+ VERSION = "7.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.1
4
+ version: 7.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson