modulorails 1.0.2 → 1.2.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +216 -12
  3. data/Appraisals +6 -6
  4. data/CHANGELOG.md +18 -0
  5. data/app/helpers/modulorails/application_helper.rb +4 -2
  6. data/gemfiles/rails_52.gemfile +5 -5
  7. data/gemfiles/rails_60.gemfile +5 -5
  8. data/gemfiles/rails_61.gemfile +5 -5
  9. data/gemfiles/rails_70.gemfile +5 -5
  10. data/lib/generators/modulorails/bundleraudit/bundleraudit_generator.rb +26 -0
  11. data/lib/generators/modulorails/docker/docker_generator.rb +10 -1
  12. data/lib/generators/modulorails/docker/templates/Dockerfile.prod.tt +6 -1
  13. data/lib/generators/modulorails/docker/templates/Dockerfile.tt +3 -0
  14. data/lib/generators/modulorails/docker/templates/config/database.yml.tt +1 -1
  15. data/lib/generators/modulorails/docker/templates/docker-compose.yml.tt +6 -1
  16. data/lib/generators/modulorails/docker/templates/entrypoints/docker-entrypoint.sh.tt +2 -2
  17. data/lib/generators/modulorails/gitlabci/gitlabci_generator.rb +4 -2
  18. data/lib/generators/modulorails/gitlabci/templates/.gitlab-ci.yml.tt +7 -0
  19. data/lib/generators/modulorails/healthcheck/health_check_generator.rb +8 -5
  20. data/lib/generators/modulorails/rubocop/rubocop_generator.rb +8 -6
  21. data/lib/generators/modulorails/rubocop/templates/rubocop.yml.tt +252 -3
  22. data/lib/generators/modulorails/self_update/self_update_generator.rb +6 -3
  23. data/lib/generators/modulorails/service/service_generator.rb +3 -1
  24. data/lib/modulorails/configuration.rb +4 -0
  25. data/lib/modulorails/data.rb +113 -62
  26. data/lib/modulorails/error_data.rb +2 -0
  27. data/lib/modulorails/errors/invalid_format_error.rb +2 -0
  28. data/lib/modulorails/errors/invalid_value_error.rb +2 -0
  29. data/lib/modulorails/railtie.rb +8 -1
  30. data/lib/modulorails/services/base_service.rb +17 -15
  31. data/lib/modulorails/services/logs_for_method_service.rb +1 -0
  32. data/lib/modulorails/success_data.rb +2 -0
  33. data/lib/modulorails/validators/database_configuration.rb +19 -9
  34. data/lib/modulorails/version.rb +3 -1
  35. data/lib/modulorails.rb +48 -33
  36. data/modulorails.gemspec +9 -7
  37. metadata +46 -32
  38. data/lib/generators/modulorails/gitlabci/templates/config/database-ci.yml.tt +0 -8
@@ -2,6 +2,7 @@
2
2
  # The base class for services. Should be implemented by ApplicationService following the model of
3
3
  # ActiveRecord::Base and ApplicationRecord.
4
4
  class Modulorails::BaseService
5
+
5
6
  # Allow to instantiate the service and call the service in one go.
6
7
  if Modulorails::COMPARABLE_RUBY_VERSION < Gem::Version.new('3.0')
7
8
  def self.call(*args, &block)
@@ -28,7 +29,7 @@ class Modulorails::BaseService
28
29
  end
29
30
 
30
31
  # Shamelessly copied from text_helper
31
- def self.pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)
32
+ def self.pluralize(count, singular, plural_arg=nil, plural: plural_arg, locale: I18n.locale)
32
33
  word = if count == 1 || count =~ /^1(\.0+)?$/
33
34
  singular
34
35
  else
@@ -65,7 +66,9 @@ class Modulorails::BaseService
65
66
  rescue StandardError => e
66
67
  # Unknown error, log the error
67
68
  Rails.logger.error("#{self}: #{e.message}")
68
- Rails.logger.error("Local variables: #{local_variables.map! { |v| { v => eval(v.to_s, binding) } }}")
69
+ Rails.logger.error("Local variables: #{local_variables.map! { |v|
70
+ { v => binding.local_variable_get(v) }
71
+ } }")
69
72
  Rails.logger.error(e.backtrace&.join("\n"))
70
73
 
71
74
  # Return the error
@@ -76,7 +79,7 @@ class Modulorails::BaseService
76
79
  # @param from [String,ActiveSupport::TimeWithZone] the minimum date
77
80
  # @param to [String,ActiveSupport::TimeWithZone] the maximum date
78
81
  # @return [[ActiveSupport::TimeWithZone, ActiveSupport::TimeWithZone]] The given dates casted.
79
- def params_to_time(from, to = nil)
82
+ def params_to_time(from, to=nil)
80
83
  from = from.is_a?(String) && from.present? ? from.to_time_with_zone : from
81
84
  to = if to.is_a?(String) && to.present?
82
85
  to = to.to_time_with_zone
@@ -92,7 +95,7 @@ class Modulorails::BaseService
92
95
  end
93
96
 
94
97
  # Shamelessly copied from text_helper
95
- def pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)
98
+ def pluralize(count, singular, plural_arg=nil, plural: plural_arg, locale: I18n.locale)
96
99
  self.class.pluralize(count, singular, plural_arg, plural: plural, locale: locale)
97
100
  end
98
101
 
@@ -141,7 +144,9 @@ class Modulorails::BaseService
141
144
  value = params.dig(*keys)
142
145
 
143
146
  if value.respond_to?(:each)
144
- raise InvalidValueError.new(keys.join('/')) unless value.all? { |v| allowed_values.include?(v) }
147
+ raise InvalidValueError.new(keys.join('/')) unless value.all? { |v|
148
+ allowed_values.include?(v)
149
+ }
145
150
  else
146
151
  return nil if !value && allow_nil
147
152
 
@@ -162,11 +167,9 @@ class Modulorails::BaseService
162
167
  value = params.dig(*keys)
163
168
 
164
169
  unless value
165
- if allow_nil
166
- return nil
167
- else
168
- raise InvalidValueError.new(keys.join('/'))
169
- end
170
+ return nil if allow_nil
171
+
172
+ raise InvalidValueError.new(keys.join('/'))
170
173
  end
171
174
 
172
175
  result = model.find_by(field => value)
@@ -187,11 +190,9 @@ class Modulorails::BaseService
187
190
  values = params.dig(*keys)
188
191
 
189
192
  if values.blank?
190
- if allow_nil
191
- return nil
192
- else
193
- raise InvalidValueError.new(keys.join('/'))
194
- end
193
+ return nil if allow_nil
194
+
195
+ raise InvalidValueError.new(keys.join('/'))
195
196
  end
196
197
 
197
198
  results = model.where(field => values)
@@ -200,4 +201,5 @@ class Modulorails::BaseService
200
201
 
201
202
  results
202
203
  end
204
+
203
205
  end
@@ -39,4 +39,5 @@ class Modulorails::LogsForMethodService < Modulorails::BaseService
39
39
  def jsonify
40
40
  @message.to_json
41
41
  end
42
+
42
43
  end
@@ -1,6 +1,7 @@
1
1
  # @author Matthieu Ciappara <ciappa_m@modulotech>
2
2
  # A success resulting from an operation with optional additional data.
3
3
  class Modulorails::SuccessData
4
+
4
5
  # @!attribute r data
5
6
  # An object to transport some data (for instance the result of the operation). Defaults to nil.
6
7
  attr_reader :data
@@ -14,4 +15,5 @@ class Modulorails::SuccessData
14
15
  def success?
15
16
  true
16
17
  end
18
+
17
19
  end
@@ -1,8 +1,11 @@
1
1
  module Modulorails
2
+
2
3
  module Validators
4
+
3
5
  # Author: Matthieu 'ciappa_m' Ciappara
4
6
  # This holds the rules to configure the database by respecting Modulotech's norms.
5
7
  class DatabaseConfiguration
8
+
6
9
  def initialize
7
10
  # All rules are invalid by default
8
11
  @rules = {
@@ -37,19 +40,23 @@ module Modulorails
37
40
  check_rules_for_environment(database_configuration, :development)
38
41
  check_rules_for_environment(database_configuration, :test)
39
42
 
40
- get_invalid_rules
43
+ fetch_invalid_rules
41
44
  end
42
45
 
43
46
  private
44
47
 
45
- def get_invalid_rules
46
- dev = @rules[:development].select { |_k, v| v == false }.keys.map { |k| "development.#{k}" }
47
- test = @rules[:test].select { |_k, v| v == false }.keys.map { |k| "test.#{k}" }
48
- general = @rules.select { |_k, v| v == false }.keys
48
+ def fetch_invalid_rules
49
+ dev = select_invalid_keys(@rules[:development]).map { |k| "development.#{k}" }
50
+ test = select_invalid_keys(@rules[:test]).map { |k| "test.#{k}" }
51
+ general = select_invalid_keys(@rules)
49
52
 
50
53
  general + dev + test
51
54
  end
52
55
 
56
+ def select_invalid_keys(hash)
57
+ hash.select { |_k, v| v == false }.keys
58
+ end
59
+
53
60
  def check_standard_config_file_location
54
61
  # Load the configuration
55
62
  config = if Modulorails::COMPARABLE_RUBY_VERSION >= Gem::Version.new('3.1')
@@ -64,7 +71,7 @@ module Modulorails
64
71
  @rules[:standard_config_file_location] = true
65
72
 
66
73
  config
67
- rescue StandardError => e
74
+ rescue StandardError
68
75
  # An exception was raised, either the file is not a the standard location, either it just
69
76
  # cannot be read. Either way, we consider the config as invalid
70
77
  @rules[:standard_config_file_location] = false
@@ -74,13 +81,13 @@ module Modulorails
74
81
  # The database for tests MUST NOT be the same as the development database since the test
75
82
  # database is rewritten each time the tests are launched
76
83
  def check_test_database_not_equals_dev_database(config)
77
- test_eq_database = config['test']['database'] != config['development']['database']
78
- @rules[:test_database_not_equals_dev_database] = test_eq_database
84
+ @rules[:test_database_not_equals_dev_database] =
85
+ config['test']['database'] != config['development']['database']
79
86
  end
80
87
 
81
88
  # Check all rules for an environment
82
89
  def check_rules_for_environment(config, env)
83
- @rules[env].keys.each do |rule|
90
+ @rules[env].each_key do |rule|
84
91
  key = rule.to_s.gsub(/configurable_/, '')
85
92
  check_configurable_key_for_environment(config, env, key)
86
93
  end
@@ -94,6 +101,9 @@ module Modulorails
94
101
  # Use of `!!` to convert `nil` to `false` and `0` to `true`
95
102
  @rules[env][:"configurable_#{key}"] = !!valid_rule
96
103
  end
104
+
97
105
  end
106
+
98
107
  end
108
+
99
109
  end
@@ -1,6 +1,8 @@
1
1
  module Modulorails
2
- VERSION = '1.0.2'
2
+
3
+ VERSION = '1.2.0'.freeze
3
4
 
4
5
  # Useful to compare the current Ruby version
5
6
  COMPARABLE_RUBY_VERSION = Gem::Version.new(RUBY_VERSION)
7
+
6
8
  end
data/lib/modulorails.rb CHANGED
@@ -7,6 +7,7 @@ require 'generators/modulorails/gitlabci/gitlabci_generator'
7
7
  require 'generators/modulorails/healthcheck/health_check_generator'
8
8
  require 'generators/modulorails/self_update/self_update_generator'
9
9
  require 'generators/modulorails/rubocop/rubocop_generator'
10
+ require 'generators/modulorails/bundleraudit/bundleraudit_generator'
10
11
  require 'httparty'
11
12
  require 'modulorails/error_data'
12
13
  require 'modulorails/success_data'
@@ -17,11 +18,13 @@ require 'modulorails/services/services'
17
18
  # The entry point of the gem. It exposes the configurator, the gathered data and the method to
18
19
  # send those data to the intranet.
19
20
  module Modulorails
21
+
20
22
  # Author: Matthieu 'ciappa_m' Ciappara
21
23
  # The error class of the gem. Allow to identify all functional errors raised by the gem.
22
24
  class Error < StandardError; end
23
25
 
24
26
  class << self
27
+
25
28
  # Useful to update the configuration
26
29
  attr_writer :configuration
27
30
 
@@ -73,38 +76,38 @@ module Modulorails
73
76
  # If no endpoint and/or no API key is configured, it is impossible to send the data to the
74
77
  # intranet and thus we raise an error: it is the only error we want to raise since it goes
75
78
  # against one of the main goals of the gem and the gem's user is responsible.
76
- if configuration.endpoint && configuration.api_key
77
- # Define the headers of the request ; sending JSON and API key to authenticate the gem on
78
- # the intranet
79
- headers = {
80
- 'Content-Type' => 'application/json', 'X-MODULORAILS-TOKEN' => configuration.api_key
81
- }
82
-
83
- # Define the JSON body of the request
84
- body = data.to_params.to_json
85
-
86
- # Prevent HTTParty to raise error and crash the server in dev
87
- begin
88
- # Post to the configured endpoint on the Intranet
89
- response = HTTParty.post(configuration.endpoint, headers: headers, body: body)
90
-
91
- # According to the API specification, on a "Bad request" response, the server explicits what
92
- # went wrong with an `errors` field. We do not want to raise since the gem's user is not
93
- # (necessarily) responsible for the error but we still need to display it somewhere to warn
94
- # the user something went wrong.
95
- puts("[Modulorails] Error: #{response['errors'].join(', ')}") if response.code == 400
96
-
97
- # Return the response to allow users to do some more
98
- response
99
- rescue StandardError => e
100
- # Still need to notify the user
101
- puts("[Modulorails] Error: Could not post to #{configuration.endpoint}")
102
- puts e.message
103
- nil
104
- end
105
- else
79
+ unless configuration.endpoint && configuration.api_key
106
80
  raise Error.new('No endpoint or api key')
107
81
  end
82
+
83
+ # Define the headers of the request ; sending JSON and API key to authenticate the gem on
84
+ # the intranet
85
+ headers = {
86
+ 'Content-Type' => 'application/json', 'X-MODULORAILS-TOKEN' => configuration.api_key
87
+ }
88
+
89
+ # Define the JSON body of the request
90
+ body = data.to_params.to_json
91
+
92
+ # Prevent HTTParty to raise error and crash the server in dev
93
+ begin
94
+ # Post to the configured endpoint on the Intranet
95
+ response = HTTParty.post(configuration.endpoint, headers: headers, body: body)
96
+
97
+ # According to the API specification, on a "Bad request" response, the server explicits what
98
+ # went wrong with an `errors` field. We do not want to raise since the gem's user is not
99
+ # (necessarily) responsible for the error but we still need to display it somewhere to warn
100
+ # the user something went wrong.
101
+ puts("[Modulorails] Error: #{response['errors'].join(', ')}") if response.code == 400
102
+
103
+ # Return the response to allow users to do some more
104
+ response
105
+ rescue StandardError => e
106
+ # Still need to notify the user
107
+ puts("[Modulorails] Error: Could not post to #{configuration.endpoint}")
108
+ puts e.message
109
+ nil
110
+ end
108
111
  end
109
112
 
110
113
  # @author Matthieu 'ciappa_m' Ciappara
@@ -112,7 +115,7 @@ module Modulorails
112
115
  # Generate a CI/CD template unless it was already done.
113
116
  # The check is done using a 'keepfile'.
114
117
  def generate_ci_template
115
- return if File.exists?(Rails.root.join('.modulorails-gitlab-ci'))
118
+ return if File.exist?(Rails.root.join('.modulorails-gitlab-ci'))
116
119
 
117
120
  Modulorails::GitlabciGenerator.new([], {}, {}).invoke_all
118
121
  end
@@ -138,7 +141,10 @@ module Modulorails
138
141
  # Check the last version of Modulorails available on rubygems and update if there was a
139
142
  # publication
140
143
  def self_update
141
- Modulorails::SelfUpdateGenerator.new([], {}, {}).invoke_all unless configuration.no_auto_update
144
+ unless configuration.no_auto_update
145
+ Modulorails::SelfUpdateGenerator.new([], {},
146
+ {}).invoke_all
147
+ end
142
148
  rescue StandardError => e
143
149
  puts("[Modulorails] An error occured: #{e.class} - #{e.message}")
144
150
  end
@@ -148,7 +154,7 @@ module Modulorails
148
154
  # Generate a health_check configuration unless it was already done.
149
155
  # The check is done using a 'keepfile'.
150
156
  def generate_healthcheck_template
151
- return if File.exists?(Rails.root.join('.modulorails-health_check'))
157
+ return if File.exist?(Rails.root.join('.modulorails-health_check'))
152
158
 
153
159
  Modulorails::HealthCheckGenerator.new([], {}, {}).invoke_all
154
160
  end
@@ -159,5 +165,14 @@ module Modulorails
159
165
  def generate_rubocop_template
160
166
  Modulorails::RubocopGenerator.new([], {}, {}).invoke_all
161
167
  end
168
+
169
+ # @author Matthieu 'ciappa_m' Ciappara
170
+ #
171
+ # Generate a bundler-audit configuration.
172
+ def generate_bundleraudit_template
173
+ Modulorails::BundlerauditGenerator.new([], {}, {}).invoke_all
174
+ end
175
+
162
176
  end
177
+
163
178
  end
data/modulorails.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.email = ['ciappa_m@modulotech.fr']
8
8
 
9
9
  spec.summary = 'Common base for Ruby on Rails projects at Modulotech'
10
- spec.description =<<~END_OF_TEXT
10
+ spec.description = <<~END_OF_TEXT
11
11
  Modulorails is the common base for the Ruby on Rails project at Modulotech
12
12
  (https://www.modulotech.fr/).
13
13
 
@@ -24,19 +24,21 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  # Specify which files should be added to the gem when it is released.
26
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
27
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
28
28
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
29
  end
30
30
  spec.require_paths = ['lib']
31
31
 
32
- spec.add_runtime_dependency 'railties', '>= 4.2.0'
33
32
  spec.add_runtime_dependency 'git', '~> 1.7', '>= 1.7.0'
34
- spec.add_runtime_dependency 'httparty'
35
- spec.add_runtime_dependency 'i18n'
36
33
  spec.add_runtime_dependency 'health_check', '~> 3.1'
37
- spec.add_runtime_dependency 'rubocop', '= 1.25.1'
38
- spec.add_runtime_dependency 'rubocop-rails', '= 2.13.2'
34
+ spec.add_runtime_dependency 'httparty', '>= 0.13.3'
35
+ spec.add_runtime_dependency 'i18n', '>= 0.9.5'
36
+ spec.add_runtime_dependency 'railties', '>= 4.2.0'
37
+ spec.add_runtime_dependency 'rubocop', '>= 1.28.2'
38
+ spec.add_runtime_dependency 'rubocop-rails', '>= 2.14.2'
39
+ spec.add_runtime_dependency 'bundler-audit', '~> 0.9.1'
39
40
 
40
41
  spec.add_development_dependency 'activerecord', '>= 4.2.0'
41
42
  spec.add_development_dependency 'appraisal'
43
+ # spec.metadata['rubygems_mfa_required'] = 'true'
42
44
  end
metadata CHANGED
@@ -1,119 +1,133 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulorails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Ciappara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2022-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: railties
14
+ name: git
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0
19
+ version: 1.7.0
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 4.2.0
29
+ version: 1.7.0
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.7'
27
33
  - !ruby/object:Gem::Dependency
28
- name: git
34
+ name: health_check
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.7.0
34
37
  - - "~>"
35
38
  - !ruby/object:Gem::Version
36
- version: '1.7'
39
+ version: '3.1'
37
40
  type: :runtime
38
41
  prerelease: false
39
42
  version_requirements: !ruby/object:Gem::Requirement
40
43
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.7.0
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.7'
46
+ version: '3.1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: httparty
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: 0.13.3
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: 0.13.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: i18n
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '0'
67
+ version: 0.9.5
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: 0.9.5
75
75
  - !ruby/object:Gem::Dependency
76
- name: health_check
76
+ name: railties
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '3.1'
81
+ version: 4.2.0
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '3.1'
88
+ version: 4.2.0
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rubocop
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: 1.25.1
95
+ version: 1.28.2
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 1.25.1
102
+ version: 1.28.2
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rubocop-rails
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: 2.13.2
109
+ version: 2.14.2
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '='
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 2.14.2
117
+ - !ruby/object:Gem::Dependency
118
+ name: bundler-audit
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: 0.9.1
124
+ type: :runtime
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
115
129
  - !ruby/object:Gem::Version
116
- version: 2.13.2
130
+ version: 0.9.1
117
131
  - !ruby/object:Gem::Dependency
118
132
  name: activerecord
119
133
  requirement: !ruby/object:Gem::Requirement
@@ -184,6 +198,7 @@ files:
184
198
  - gemfiles/rails_60.gemfile
185
199
  - gemfiles/rails_61.gemfile
186
200
  - gemfiles/rails_70.gemfile
201
+ - lib/generators/modulorails/bundleraudit/bundleraudit_generator.rb
187
202
  - lib/generators/modulorails/docker/docker_generator.rb
188
203
  - lib/generators/modulorails/docker/templates/Dockerfile.prod.tt
189
204
  - lib/generators/modulorails/docker/templates/Dockerfile.tt
@@ -195,7 +210,6 @@ files:
195
210
  - lib/generators/modulorails/gitlabci/gitlabci_generator.rb
196
211
  - lib/generators/modulorails/gitlabci/templates/.gitlab-ci.yml.tt
197
212
  - lib/generators/modulorails/gitlabci/templates/.modulorails-gitlab-ci
198
- - lib/generators/modulorails/gitlabci/templates/config/database-ci.yml.tt
199
213
  - lib/generators/modulorails/healthcheck/health_check_generator.rb
200
214
  - lib/generators/modulorails/healthcheck/templates/.modulorails-health_check
201
215
  - lib/generators/modulorails/healthcheck/templates/config/initializers/health_check.rb.tt
@@ -1,8 +0,0 @@
1
- <%- adapter = Modulorails.data.adapter -%>
2
- test:
3
- host: <%= adapter =~ /mysql/ ? 'mysql' : 'postgres' %>
4
- adapter: <%= adapter %>
5
- database: test
6
- username: root
7
- password: password
8
- encoding: utf8