ocean-rails 7.3.0 → 7.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65fb8fb628f0daa342b47ba75447cada3b97d1b583feac3c2b1ce6c88e48ceb6
4
- data.tar.gz: b7e3d250c457b1b71b1e867a77da6401df1c5be8e41f6ef61b2620024a6a6ca4
3
+ metadata.gz: 7ee546b0b0c2b9c6a04425b1ac672389b82fd08fcf55a667b677864513ed514f
4
+ data.tar.gz: ae8d95eaccc0f63a052b1805e84563677f22bf47614e595a48b3f03b6f68351b
5
5
  SHA512:
6
- metadata.gz: a3cccb9f2f64465228356ee2cb1aa9e683949186581a6a6a83efc755177637a88c9c177948b8e5ec906bc863aaf3994f8f82e393cad51c433b7ebf18e6758b41
7
- data.tar.gz: 3b050247ae9c3c20b8808329ce3a75adb2747e31b5e96b3ec2503fa3758b9c48d662839ccffe4f7451a47fd2aff67e3c6f726385670c1bcf058ccd632e22750f
6
+ metadata.gz: e6a34a0c53ae708c5c383d8c8467fc018f822f2076fea6d2f2740533ed7e9b5c6b5aa60cfb149b6ac829ff1131279e69b3bf1555ad2036c3f28b31db24ca00ca
7
+ data.tar.gz: 37ea558d5140a78c66e9adabda5a52537874ee43289765e606afe76eb7a62fb96190c4090cce35630f7dc4746208352efa2d6ff2b669167823dfd0a99daa0ecd
@@ -9,7 +9,6 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
9
9
  remove_file "#{Rails.root}/config/locales"
10
10
  remove_file "#{Rails.root}/public"
11
11
  remove_file "#{Rails.root}/config/initializers/session_store.rb"
12
- #remove_file "#{Rails.root}/config/initializers/secret_token.rb"
13
12
  remove_file "#{Rails.root}/test"
14
13
  remove_file "#{Rails.root}/vendor/assets"
15
14
  remove_file "#{Rails.root}/vendor/plugins"
@@ -75,6 +74,16 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
75
74
  "
76
75
  end
77
76
 
77
+ def setup_console_logging
78
+ application "# We want to set up a custom logger which logs to STDOUT.
79
+ # Docker expects your application to log to STDOUT/STDERR and to be run
80
+ # in the foreground.
81
+ config.log_level = ENV.fetch('LOG_LEVEL', :debug)
82
+ config.log_tags = [:uuid]
83
+ config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
84
+ "
85
+ end
86
+
78
87
  def install_config_yml_files
79
88
  copy_file "config.yml", "#{Rails.root}/config/config.yml"
80
89
  end
@@ -102,12 +111,12 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
102
111
  end
103
112
 
104
113
  def setup_docker
105
- copy_file "Dockerfile", "#{Rails.root}/Dockerfile"
114
+ template "Dockerfile", "#{Rails.root}/Dockerfile"
106
115
  copy_file "dockerignore", "#{Rails.root}/.dockerignore"
107
116
  end
108
117
 
109
118
  def setup_dotenv_file
110
- copy_file "env", "#{Rails.root}.env"
119
+ template "env", "#{Rails.root}.env"
111
120
  end
112
121
 
113
122
  end
@@ -1,5 +1,7 @@
1
1
  FROM ruby:2.5.1-alpine
2
- MAINTAINER peter@peterbengtson.com
2
+ LABEL net.oceanframework.project="ocean" \
3
+ net.oceanframework.service="<%= class_name.underscore %>" \
4
+ maintainer="yourname@youremail.com"
3
5
 
4
6
  # Set locale
5
7
  ENV LANG=en_US.UTF-8 \
@@ -23,7 +23,3 @@ API_VERSIONS: <%= ENV['API_VERSIONS'] %>
23
23
 
24
24
  # This is the list of IP numbers for the Varnish instances. (For PURGE and BAN.)
25
25
  VARNISH_CACHES: <%= ENV['VARNISH_CACHES'] %>
26
-
27
- # The password regex and error message
28
- PASSWORD_REGEXP: <%= ENV['PASSWORD_REGEXP'] %>
29
- PASSWORD_MSG: <%= ENV['PASSWORD_MSG'] %>
@@ -1,7 +1,7 @@
1
1
  # config.yml
2
2
  OCEAN_ENV=dev
3
- APP_NAME=yourappname
4
- API_USER=yourappname
3
+ APP_NAME=<%= class_name.underscore %>
4
+ API_USER=<%= class_name.underscore %>
5
5
  API_PASSWORD=xxxxxxxxxx
6
6
  BASE_DOMAIN=example.com
7
7
  OCEAN_API_HOST=dev-api.example.com
@@ -9,8 +9,6 @@ OCEAN_API_URL=http://dev-api.example.com
9
9
  INTERNAL_OCEAN_API_URL=http://dev-api.example.com
10
10
  API_VERSIONS={"_default":"v1"}
11
11
  VARNISH_CACHES=[]
12
- PASSWORD_REGEXP="\A[A-zA-z0-9_!\?*%&/-]{6,}\z"
13
- PASSWORD_MSG="should be at least 6 characters long and contain only the characters A-Z, a-z, 0-9, and _!?/*%&-"
14
12
 
15
13
  # DB and AWS services
16
14
  RAILS_MAX_THREADS=5
@@ -19,7 +17,7 @@ SQL_DB_ADAPTER=mysql2
19
17
  SQL_CONNECTION_POOL_SIZE=20
20
18
  SQL_HOST=docker.for.mac.localhost
21
19
  SQL_PORT=3306
22
- SQL_DATABASE=auth
20
+ SQL_DATABASE=<%= class_name.underscore %>
23
21
  SQL_USERNAME=root
24
22
  SQL_PASSWORD=thepassword
25
23
  AWS_REGION=eu-west-1
@@ -1,5 +1,5 @@
1
1
  workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2
- threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
2
+ threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 10)
3
3
  threads threads_count, threads_count
4
4
 
5
5
  preload_app!
@@ -43,10 +43,10 @@ class Api
43
43
  def self.adorn_basename(basename, ocean_env: "dev", rails_env: "development",
44
44
  suffix_only: false)
45
45
  fullname = suffix_only ? "_#{ocean_env}" : "#{basename}_#{ocean_env}"
46
- if rails_env != 'production' || ocean_env == 'dev' || ocean_env == 'ci'
47
- local_ip = UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last}.gsub('.', '-')
48
- fullname += "_#{local_ip}_#{rails_env}"
49
- end
46
+ # if rails_env != 'production' || ocean_env == 'dev' || ocean_env == 'ci'
47
+ # local_ip = UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last}.gsub('.', '-')
48
+ # fullname += "_#{local_ip}_#{rails_env}"
49
+ # end
50
50
  fullname
51
51
  end
52
52
 
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "7.3.0"
2
+ VERSION = "7.4.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.3.0
4
+ version: 7.4.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-06-24 00:00:00.000000000 Z
11
+ date: 2018-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus