modulorails 0.2.2 → 1.0.1
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/.dockerignore +14 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +62 -0
- data/.travis.yml +23 -4
- data/Appraisals +18 -0
- data/CHANGELOG.md +42 -1
- data/Dockerfile.ruby25 +34 -0
- data/Dockerfile.ruby26 +28 -0
- data/Dockerfile.ruby27 +25 -0
- data/Dockerfile.ruby30 +25 -0
- data/Dockerfile.ruby31 +25 -0
- data/Gemfile.lock +59 -54
- data/README.md +16 -4
- data/Rakefile +1 -1
- data/app/assets/stylesheets/modulorails.css +21 -0
- data/app/helpers/modulorails/application_helper.rb +8 -0
- data/config/locales/en.yml +3 -0
- data/docker-compose.debug.yml +47 -0
- data/docker-compose.yml +37 -0
- data/entrypoints/appraisal_test.sh +7 -0
- data/gemfiles/rails_52.gemfile +9 -0
- data/gemfiles/rails_60.gemfile +9 -0
- data/gemfiles/rails_61.gemfile +9 -0
- data/gemfiles/rails_70.gemfile +9 -0
- data/lib/generators/modulorails/docker/docker_generator.rb +19 -0
- data/lib/generators/modulorails/docker/templates/Dockerfile.prod.tt +57 -0
- data/lib/generators/modulorails/docker/templates/Dockerfile.tt +26 -0
- data/lib/generators/modulorails/docker/templates/config/database.yml.tt +32 -0
- data/lib/generators/modulorails/docker/templates/docker-compose.prod.yml.tt +50 -0
- data/lib/generators/modulorails/docker/templates/docker-compose.yml.tt +71 -0
- data/lib/generators/modulorails/docker/templates/entrypoints/docker-entrypoint.sh.tt +20 -0
- data/lib/generators/modulorails/docker/templates/entrypoints/webpack-entrypoint.sh.tt +7 -0
- data/lib/generators/modulorails/gitlabci/gitlabci_generator.rb +34 -0
- data/lib/generators/modulorails/gitlabci/templates/.gitlab-ci.yml.tt +118 -0
- data/lib/generators/modulorails/gitlabci/templates/.modulorails-gitlab-ci +6 -0
- data/lib/generators/modulorails/gitlabci/templates/config/database-ci.yml.tt +8 -0
- data/lib/generators/modulorails/healthcheck/health_check_generator.rb +41 -0
- data/lib/generators/modulorails/healthcheck/templates/.modulorails-health_check +6 -0
- data/lib/generators/modulorails/healthcheck/templates/config/initializers/health_check.rb.tt +100 -0
- data/lib/generators/modulorails/rubocop/rubocop_generator.rb +24 -0
- data/lib/generators/modulorails/rubocop/templates/rubocop.yml.tt +18 -0
- data/lib/generators/modulorails/self_update/self_update_generator.rb +32 -0
- data/lib/generators/modulorails/service/service_generator.rb +13 -0
- data/lib/generators/modulorails/service/templates/service.rb.tt +28 -0
- data/lib/modulorails/configuration.rb +8 -2
- data/lib/modulorails/data.rb +21 -2
- data/lib/modulorails/error_data.rb +21 -0
- data/lib/modulorails/errors/base_error.rb +4 -0
- data/lib/modulorails/errors/errors.rb +3 -0
- data/lib/modulorails/errors/invalid_format_error.rb +14 -0
- data/lib/modulorails/errors/invalid_value_error.rb +14 -0
- data/lib/modulorails/railtie.rb +35 -3
- data/lib/modulorails/services/base_service.rb +203 -0
- data/lib/modulorails/services/logs_for_method_service.rb +42 -0
- data/lib/modulorails/services/services.rb +2 -0
- data/lib/modulorails/success_data.rb +17 -0
- data/lib/modulorails/validators/database_configuration.rb +9 -3
- data/lib/modulorails/version.rb +4 -1
- data/lib/modulorails.rb +46 -21
- data/modulorails.gemspec +4 -0
- metadata +114 -17
- data/lib/generators/gitlabci_generator.rb +0 -134
- data/lib/generators/templates/.gitlab-ci.yml +0 -72
- data/lib/generators/templates/.modulorails-gitlab-ci +0 -3
- data/lib/generators/templates/config/database-ci.yml +0 -7
- data/lib/modulorails/updater.rb +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9c1a33ace09742eb134cb8f41cf1aaac6f6687c8e9df97c91190aec0ca23034
|
4
|
+
data.tar.gz: 22e48b8dd51a0f187abc8a76f95af35224b6666b41b55851ef77a5a8a98d2450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08b2eb1496c1c61f30674449f5f0c56c773203851559b83b38c2c0cbf2dc55b88e89fcdece0f9d0b4a8264cc6baeef50d9b42f5bd2b67ad953bfb6d884e15881'
|
7
|
+
data.tar.gz: e21f3ac1ba44ebfc00776ca0f04541bf97e505f0773f5f47a8c2e5299909f0339f2769c1478ebce043935751a282373a0940bef910fb96bd271e857a7155e6c5
|
data/.dockerignore
ADDED
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
11
|
+
|
12
|
+
# Enabling Rails-specific cops.
|
13
|
+
require: rubocop-rails
|
14
|
+
|
15
|
+
AllCops:
|
16
|
+
# Disable all cops by default to ease the migration. This will probably be removed one day.
|
17
|
+
DisabledByDefault: true
|
18
|
+
# No suggestions since the gem is the sole truth for rubocop configuration.
|
19
|
+
SuggestExtensions: false
|
20
|
+
|
21
|
+
# Excluding most directories with generated files and directories with configuration files.
|
22
|
+
Exclude:
|
23
|
+
- 'vendor/**/*'
|
24
|
+
- 'db/**/*'
|
25
|
+
- 'tmp/**/*'
|
26
|
+
- 'bin/**/*'
|
27
|
+
- 'builds/**/*'
|
28
|
+
- 'Gemfile'
|
29
|
+
- 'config/environments/*'
|
30
|
+
- 'config/puma.rb'
|
31
|
+
- 'config/spring.rb'
|
32
|
+
- 'test/application_system_test_case.rb'
|
33
|
+
- 'test/test_helper.rb'
|
34
|
+
- 'config/initializers/*.rb'
|
35
|
+
- 'spec/spec_helper.rb'
|
36
|
+
- 'node_modules/**/*'
|
37
|
+
- 'spec/**/*'
|
38
|
+
|
39
|
+
# Instructing rubocop about all standard Modulotech environments.
|
40
|
+
Rails/UnknownEnv:
|
41
|
+
Environments:
|
42
|
+
- production
|
43
|
+
- development
|
44
|
+
- test
|
45
|
+
- staging
|
46
|
+
- preprod
|
47
|
+
|
48
|
+
# Checks if String literals are using single quotes when no interpolation is required
|
49
|
+
Style/StringLiterals:
|
50
|
+
Enabled: true
|
51
|
+
EnforcedStyle: single_quotes
|
52
|
+
ConsistentQuotesInMultiline: false
|
53
|
+
|
54
|
+
# Checks if the quotes used for quoted symbols are single quotes when no interpolation is required
|
55
|
+
Style/QuotedSymbols:
|
56
|
+
Enabled: true
|
57
|
+
EnforcedStyle: same_as_string_literals
|
58
|
+
|
59
|
+
# This cop checks for uses of literal strings converted to a symbol where a literal symbol could be used instead.
|
60
|
+
Lint/SymbolConversion:
|
61
|
+
Enabled: true
|
62
|
+
EnforcedStyle: strict
|
data/.travis.yml
CHANGED
@@ -1,9 +1,28 @@
|
|
1
1
|
---
|
2
2
|
language: ruby
|
3
3
|
cache: bundler
|
4
|
-
|
5
|
-
|
6
|
-
- 2.
|
7
|
-
- 2.
|
4
|
+
|
5
|
+
ruby:
|
6
|
+
- '2.5'
|
7
|
+
- '2.6'
|
8
|
+
- '2.7'
|
9
|
+
- '3.0'
|
10
|
+
- '3.1'
|
11
|
+
|
8
12
|
before_install:
|
9
13
|
- gem install bundler -v 2.1.4
|
14
|
+
|
15
|
+
gemfile:
|
16
|
+
- gemfiles/rails_52.gemfile
|
17
|
+
- gemfiles/rails_60.gemfile
|
18
|
+
- gemfiles/rails_61.gemfile
|
19
|
+
- gemfiles/rails_70.gemfile
|
20
|
+
|
21
|
+
matrix:
|
22
|
+
exclude:
|
23
|
+
- gemfile: gemfiles/rails_70.gemfile
|
24
|
+
ruby: 2.5
|
25
|
+
- gemfile: gemfiles/rails_70.gemfile
|
26
|
+
ruby: 2.6
|
27
|
+
|
28
|
+
script: bundle exec rake spec
|
data/Appraisals
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
appraise "rails-52" do
|
2
|
+
gem 'rails', '~> 5.2', '>= 5.2.6'
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise "rails-60" do
|
6
|
+
gem 'rails', '~> 6.0', '>= 6.0.4.4'
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "rails-61" do
|
10
|
+
gem 'rails', '~> 6.1', '>= 6.1.4.4'
|
11
|
+
end
|
12
|
+
|
13
|
+
# Rails 7 requires at least Ruby 2.7
|
14
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7')
|
15
|
+
appraise "rails-70" do
|
16
|
+
gem 'rails', '~> 7.0'
|
17
|
+
end
|
18
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,48 @@
|
|
2
2
|
|
3
3
|
This file is used to list changes made in each version of the gem.
|
4
4
|
|
5
|
-
# 0.
|
5
|
+
# 1.0.1
|
6
|
+
|
7
|
+
First Rubocop rules.
|
8
|
+
|
9
|
+
- Add Style/StringLiterals, Style/QuotedSymbols and Lint/SymbolConversion.
|
10
|
+
|
11
|
+
# 1.0.0
|
12
|
+
|
13
|
+
The Rubocop release.
|
14
|
+
|
15
|
+
- Add Modulorails helper `powered_by`.
|
16
|
+
- Add `Modulorails::BaseService`, `Modulorails::LogsForMethodService`,
|
17
|
+
`Modulorails::SuccessData` and `Modulorails::ErrorData`.
|
18
|
+
- Add Rubocop dependency with empty configuration.
|
19
|
+
- Ensure the compatibility of the gem with Ruby 3.0 and Ruby 3.1.
|
20
|
+
|
21
|
+
# 0.4.0
|
22
|
+
|
23
|
+
Fixes, updates and health_check release.
|
24
|
+
|
25
|
+
- Update generators for Docker and Gitlab CI.
|
26
|
+
- Move all generators under the `modulorails` namespace.
|
27
|
+
- Add dependency to `health_check` gem.
|
28
|
+
- Fix error on database configuration validator when no database.yml exists.
|
29
|
+
- Rescue if httparty can't post to configuration.endpoint.
|
30
|
+
- Add dockerfiles to test on many Ruby versions.
|
31
|
+
- Add appraisal to test on many Rails versions.
|
32
|
+
|
33
|
+
# 0.3.0
|
34
|
+
|
35
|
+
Docker release.
|
36
|
+
|
37
|
+
- Add generator for Docker.
|
38
|
+
- Use templates for Gitlabci generator.
|
39
|
+
|
40
|
+
# 0.2.3
|
41
|
+
|
42
|
+
Gitlab-ci generator.
|
43
|
+
|
44
|
+
- Fixes the Ruby version put in the generated `.gitlab-ci.yml`.
|
45
|
+
|
46
|
+
# 0.2.2
|
6
47
|
|
7
48
|
Auto-update fixes.
|
8
49
|
|
data/Dockerfile.ruby25
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# BUILD IMAGE
|
3
|
+
#
|
4
|
+
FROM ruby:2.5-alpine
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
|
8
|
+
RUN apk add --update --no-cache \
|
9
|
+
alpine-sdk \
|
10
|
+
tzdata
|
11
|
+
|
12
|
+
RUN gem install bundler
|
13
|
+
|
14
|
+
# Your RubyGems version (3.0.3)) has a bug that prevents `required_ruby_version` from working for
|
15
|
+
# Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support
|
16
|
+
# for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning
|
17
|
+
# by running `gem update --system 3.2.3`
|
18
|
+
RUN gem update --system 3.2.3
|
19
|
+
|
20
|
+
COPY . .
|
21
|
+
|
22
|
+
RUN bundle config set specific_platform true
|
23
|
+
|
24
|
+
# Ensure the use of a Gemfile working with Ruby 2.5
|
25
|
+
RUN sed -e 's/"..\/"/".\/"/' gemfiles/rails_52.gemfile > Gemfile
|
26
|
+
|
27
|
+
# Install the basic dependencies
|
28
|
+
RUN bundle install
|
29
|
+
|
30
|
+
# Install dependencies for all supported Rails versions
|
31
|
+
RUN bundle exec appraisal install
|
32
|
+
|
33
|
+
# Run the tests
|
34
|
+
CMD ['./entrypoints/appraisal_test.sh']
|
data/Dockerfile.ruby26
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# BUILD IMAGE
|
3
|
+
#
|
4
|
+
FROM ruby:2.6-alpine
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
|
8
|
+
RUN apk add --update --no-cache \
|
9
|
+
alpine-sdk \
|
10
|
+
tzdata
|
11
|
+
|
12
|
+
RUN gem install bundler
|
13
|
+
|
14
|
+
COPY . .
|
15
|
+
|
16
|
+
RUN bundle config set specific_platform true
|
17
|
+
|
18
|
+
# Ensure the use of a Gemfile working with Ruby 2.6
|
19
|
+
RUN sed -e 's/"..\/"/".\/"/' gemfiles/rails_52.gemfile > Gemfile
|
20
|
+
|
21
|
+
# Install the basic dependencies
|
22
|
+
RUN bundle install
|
23
|
+
|
24
|
+
# Install dependencies for all supported Rails versions
|
25
|
+
RUN bundle exec appraisal install
|
26
|
+
|
27
|
+
# Run the tests
|
28
|
+
CMD ['./entrypoints/appraisal_test.sh']
|
data/Dockerfile.ruby27
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# BUILD IMAGE
|
3
|
+
#
|
4
|
+
FROM ruby:2.7-alpine
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
|
8
|
+
RUN apk add --update --no-cache \
|
9
|
+
alpine-sdk \
|
10
|
+
tzdata
|
11
|
+
|
12
|
+
RUN gem install bundler
|
13
|
+
|
14
|
+
COPY . .
|
15
|
+
|
16
|
+
RUN bundle config set specific_platform true
|
17
|
+
|
18
|
+
# Install the basic dependencies
|
19
|
+
RUN bundle install
|
20
|
+
|
21
|
+
# Install dependencies for all supported Rails versions
|
22
|
+
RUN bundle exec appraisal install
|
23
|
+
|
24
|
+
# Run the tests
|
25
|
+
CMD ['./entrypoints/appraisal_test.sh']
|
data/Dockerfile.ruby30
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# BUILD IMAGE
|
3
|
+
#
|
4
|
+
FROM ruby:3.0-alpine
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
|
8
|
+
RUN apk add --update --no-cache \
|
9
|
+
alpine-sdk \
|
10
|
+
tzdata
|
11
|
+
|
12
|
+
RUN gem install bundler
|
13
|
+
|
14
|
+
COPY . .
|
15
|
+
|
16
|
+
RUN bundle config set specific_platform true
|
17
|
+
|
18
|
+
# Install the basic dependencies
|
19
|
+
RUN bundle install
|
20
|
+
|
21
|
+
# Install dependencies for all supported Rails versions
|
22
|
+
RUN bundle exec appraisal install
|
23
|
+
|
24
|
+
# Run the tests
|
25
|
+
CMD ['./entrypoints/appraisal_test.sh']
|
data/Dockerfile.ruby31
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# BUILD IMAGE
|
3
|
+
#
|
4
|
+
FROM ruby:3.1-alpine
|
5
|
+
|
6
|
+
WORKDIR /app
|
7
|
+
|
8
|
+
RUN apk add --update --no-cache \
|
9
|
+
alpine-sdk \
|
10
|
+
tzdata
|
11
|
+
|
12
|
+
RUN gem install bundler
|
13
|
+
|
14
|
+
COPY . .
|
15
|
+
|
16
|
+
RUN bundle config set specific_platform true
|
17
|
+
|
18
|
+
# Install the basic dependencies
|
19
|
+
RUN bundle install
|
20
|
+
|
21
|
+
# Install dependencies for all supported Rails versions
|
22
|
+
RUN bundle exec appraisal install
|
23
|
+
|
24
|
+
# Run the tests
|
25
|
+
CMD ['./entrypoints/appraisal_test.sh']
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
modulorails (0.
|
4
|
+
modulorails (0.4.0)
|
5
5
|
git (~> 1.7, >= 1.7.0)
|
6
|
+
health_check (~> 3.1)
|
6
7
|
httparty
|
7
8
|
i18n
|
8
9
|
railties (>= 4.2.0)
|
@@ -10,99 +11,103 @@ PATH
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
actionpack (
|
14
|
-
actionview (=
|
15
|
-
activesupport (=
|
16
|
-
rack (~> 2.0, >= 2.0
|
14
|
+
actionpack (7.0.0)
|
15
|
+
actionview (= 7.0.0)
|
16
|
+
activesupport (= 7.0.0)
|
17
|
+
rack (~> 2.0, >= 2.2.0)
|
17
18
|
rack-test (>= 0.6.3)
|
18
19
|
rails-dom-testing (~> 2.0)
|
19
20
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
20
|
-
actionview (
|
21
|
-
activesupport (=
|
21
|
+
actionview (7.0.0)
|
22
|
+
activesupport (= 7.0.0)
|
22
23
|
builder (~> 3.1)
|
23
24
|
erubi (~> 1.4)
|
24
25
|
rails-dom-testing (~> 2.0)
|
25
26
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
26
|
-
activemodel (
|
27
|
-
activesupport (=
|
28
|
-
activerecord (
|
29
|
-
activemodel (=
|
30
|
-
activesupport (=
|
31
|
-
activesupport (
|
27
|
+
activemodel (7.0.0)
|
28
|
+
activesupport (= 7.0.0)
|
29
|
+
activerecord (7.0.0)
|
30
|
+
activemodel (= 7.0.0)
|
31
|
+
activesupport (= 7.0.0)
|
32
|
+
activesupport (7.0.0)
|
32
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
33
|
-
i18n (>=
|
34
|
-
minitest (
|
35
|
-
tzinfo (~>
|
36
|
-
|
34
|
+
i18n (>= 1.6, < 2)
|
35
|
+
minitest (>= 5.1)
|
36
|
+
tzinfo (~> 2.0)
|
37
|
+
appraisal (2.4.1)
|
38
|
+
bundler
|
39
|
+
rake
|
40
|
+
thor (>= 0.14.0)
|
37
41
|
builder (3.2.4)
|
38
|
-
concurrent-ruby (1.1.
|
42
|
+
concurrent-ruby (1.1.9)
|
39
43
|
crass (1.0.6)
|
40
|
-
diff-lcs (1.
|
44
|
+
diff-lcs (1.5.0)
|
41
45
|
erubi (1.10.0)
|
42
|
-
git (1.
|
46
|
+
git (1.10.2)
|
43
47
|
rchardet (~> 1.8)
|
44
|
-
|
48
|
+
health_check (3.1.0)
|
49
|
+
railties (>= 5.0)
|
50
|
+
httparty (0.20.0)
|
45
51
|
mime-types (~> 3.0)
|
46
52
|
multi_xml (>= 0.5.2)
|
47
|
-
i18n (1.8.
|
53
|
+
i18n (1.8.11)
|
48
54
|
concurrent-ruby (~> 1.0)
|
49
|
-
loofah (2.
|
55
|
+
loofah (2.13.0)
|
50
56
|
crass (~> 1.0.2)
|
51
57
|
nokogiri (>= 1.5.9)
|
52
58
|
method_source (1.0.0)
|
53
|
-
mime-types (3.
|
59
|
+
mime-types (3.4.1)
|
54
60
|
mime-types-data (~> 3.2015)
|
55
|
-
mime-types-data (3.
|
56
|
-
|
57
|
-
minitest (5.14.1)
|
61
|
+
mime-types-data (3.2022.0105)
|
62
|
+
minitest (5.15.0)
|
58
63
|
multi_xml (0.6.0)
|
59
|
-
nokogiri (1.
|
60
|
-
mini_portile2 (~> 2.5.0)
|
64
|
+
nokogiri (1.13.1-aarch64-linux)
|
61
65
|
racc (~> 1.4)
|
62
|
-
racc (1.
|
66
|
+
racc (1.6.0)
|
63
67
|
rack (2.2.3)
|
64
68
|
rack-test (1.1.0)
|
65
69
|
rack (>= 1.0, < 3)
|
66
70
|
rails-dom-testing (2.0.3)
|
67
71
|
activesupport (>= 4.2.0)
|
68
72
|
nokogiri (>= 1.6)
|
69
|
-
rails-html-sanitizer (1.
|
73
|
+
rails-html-sanitizer (1.4.2)
|
70
74
|
loofah (~> 2.3)
|
71
|
-
railties (
|
72
|
-
actionpack (=
|
73
|
-
activesupport (=
|
75
|
+
railties (7.0.0)
|
76
|
+
actionpack (= 7.0.0)
|
77
|
+
activesupport (= 7.0.0)
|
74
78
|
method_source
|
75
|
-
rake (>=
|
76
|
-
thor (
|
79
|
+
rake (>= 12.2)
|
80
|
+
thor (~> 1.0)
|
81
|
+
zeitwerk (~> 2.5)
|
77
82
|
rake (12.3.3)
|
78
83
|
rchardet (1.8.0)
|
79
|
-
rspec (3.
|
80
|
-
rspec-core (~> 3.
|
81
|
-
rspec-expectations (~> 3.
|
82
|
-
rspec-mocks (~> 3.
|
83
|
-
rspec-core (3.
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-expectations (3.
|
84
|
+
rspec (3.10.0)
|
85
|
+
rspec-core (~> 3.10.0)
|
86
|
+
rspec-expectations (~> 3.10.0)
|
87
|
+
rspec-mocks (~> 3.10.0)
|
88
|
+
rspec-core (3.10.1)
|
89
|
+
rspec-support (~> 3.10.0)
|
90
|
+
rspec-expectations (3.10.1)
|
86
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-mocks (3.
|
92
|
+
rspec-support (~> 3.10.0)
|
93
|
+
rspec-mocks (3.10.2)
|
89
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
|
-
rspec-support (~> 3.
|
91
|
-
rspec-support (3.
|
92
|
-
thor (1.1
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
zeitwerk (2.4.0)
|
95
|
+
rspec-support (~> 3.10.0)
|
96
|
+
rspec-support (3.10.3)
|
97
|
+
thor (1.2.1)
|
98
|
+
tzinfo (2.0.4)
|
99
|
+
concurrent-ruby (~> 1.0)
|
100
|
+
zeitwerk (2.5.3)
|
97
101
|
|
98
102
|
PLATFORMS
|
99
|
-
|
103
|
+
aarch64-linux
|
100
104
|
|
101
105
|
DEPENDENCIES
|
102
106
|
activerecord (>= 4.2.0)
|
107
|
+
appraisal
|
103
108
|
modulorails!
|
104
109
|
rake (~> 12.0)
|
105
110
|
rspec (~> 3.0)
|
106
111
|
|
107
112
|
BUNDLED WITH
|
108
|
-
2.
|
113
|
+
2.3.3
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ provides templates for the common configurations and defines common dependencies
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
gem 'modulorails'
|
13
|
+
gem 'modulorails'
|
14
14
|
```
|
15
15
|
|
16
16
|
And then execute:
|
@@ -33,9 +33,21 @@ end
|
|
33
33
|
|
34
34
|
## Development
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
There are tests in `spec`. To run tests:
|
37
|
+
- Build Docker images using `docker compose build`.
|
38
|
+
- You can run tests on all supported Ruby versions using `docker compose up`.
|
39
|
+
- Or you can run test on a specific Ruby version using one of the following commands:
|
40
|
+
- Ruby 2.5: `docker compose run ruby25`
|
41
|
+
- Ruby 2.6: `docker compose run ruby26`
|
42
|
+
- Ruby 2.7: `docker compose run ruby27`
|
43
|
+
- Ruby 3.0: `docker compose run ruby30`
|
44
|
+
- Ruby 3.1: `docker compose run ruby31`
|
45
|
+
|
46
|
+
[Appraisal](https://github.com/thoughtbot/appraisal) is used to test the gem against many supported Rails versions:
|
47
|
+
- Rails 5.2, 6.0 and 6.1 on Ruby 2.5 and 2.6.
|
48
|
+
- Rails 5.2, 6.0, 6.1 and 7.0 on Ruby 2.7, 3.0 and 3.1.
|
49
|
+
|
50
|
+
Travis CI is configured to automatically run tests in all supported Ruby versions and dependency sets after each push.
|
39
51
|
|
40
52
|
## Contributing
|
41
53
|
|
data/Rakefile
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
/**
|
2
|
+
** Modulorails style
|
3
|
+
**/
|
4
|
+
.modulolink {
|
5
|
+
text-decoration: none;
|
6
|
+
font-weight: 500;
|
7
|
+
color: #202D4C;
|
8
|
+
}
|
9
|
+
|
10
|
+
.modulolink span {
|
11
|
+
color: #FFCE19;
|
12
|
+
}
|
13
|
+
|
14
|
+
.modulolink:hover {
|
15
|
+
color: #374D82;
|
16
|
+
text-decoration: none;
|
17
|
+
}
|
18
|
+
|
19
|
+
.modulolink:hover span {
|
20
|
+
color: #FFCB0C;
|
21
|
+
}
|
data/config/locales/en.yml
CHANGED
@@ -14,3 +14,6 @@ en:
|
|
14
14
|
configurable_password: Password is not configurable for test environment
|
15
15
|
configurable_database: Database name is not configurable for test environment
|
16
16
|
configurable_port: Port is not configurable for test environment
|
17
|
+
errors:
|
18
|
+
invalid_format: Invalid format for field %{field}
|
19
|
+
invalid_value: Invalid value for field %{field}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
version: '3.7'
|
2
|
+
|
3
|
+
services:
|
4
|
+
ruby25:
|
5
|
+
image: modulotechgroup/modulorails:testruby25
|
6
|
+
volumes:
|
7
|
+
- .:/app
|
8
|
+
build:
|
9
|
+
context: .
|
10
|
+
dockerfile: Dockerfile.ruby25
|
11
|
+
command: ./entrypoints/appraisal_test.sh
|
12
|
+
|
13
|
+
ruby26:
|
14
|
+
image: modulotechgroup/modulorails:testruby26
|
15
|
+
volumes:
|
16
|
+
- .:/app
|
17
|
+
build:
|
18
|
+
context: .
|
19
|
+
dockerfile: Dockerfile.ruby26
|
20
|
+
command: ./entrypoints/appraisal_test.sh
|
21
|
+
|
22
|
+
ruby27:
|
23
|
+
image: modulotechgroup/modulorails:testruby27
|
24
|
+
volumes:
|
25
|
+
- .:/app
|
26
|
+
build:
|
27
|
+
context: .
|
28
|
+
dockerfile: Dockerfile.ruby27
|
29
|
+
command: ./entrypoints/appraisal_test.sh
|
30
|
+
|
31
|
+
ruby30:
|
32
|
+
image: modulotechgroup/modulorails:testruby30
|
33
|
+
volumes:
|
34
|
+
- .:/app
|
35
|
+
build:
|
36
|
+
context: .
|
37
|
+
dockerfile: Dockerfile.ruby30
|
38
|
+
command: ./entrypoints/appraisal_test.sh
|
39
|
+
|
40
|
+
ruby31:
|
41
|
+
image: modulotechgroup/modulorails:testruby31
|
42
|
+
volumes:
|
43
|
+
- .:/app
|
44
|
+
build:
|
45
|
+
context: .
|
46
|
+
dockerfile: Dockerfile.ruby31
|
47
|
+
command: ./entrypoints/appraisal_test.sh
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
version: '3.7'
|
2
|
+
|
3
|
+
services:
|
4
|
+
ruby25:
|
5
|
+
image: modulotechgroup/modulorails:testruby25
|
6
|
+
build:
|
7
|
+
context: .
|
8
|
+
dockerfile: Dockerfile.ruby25
|
9
|
+
command: ./entrypoints/appraisal_test.sh
|
10
|
+
|
11
|
+
ruby26:
|
12
|
+
image: modulotechgroup/modulorails:testruby26
|
13
|
+
build:
|
14
|
+
context: .
|
15
|
+
dockerfile: Dockerfile.ruby26
|
16
|
+
command: ./entrypoints/appraisal_test.sh
|
17
|
+
|
18
|
+
ruby27:
|
19
|
+
image: modulotechgroup/modulorails:testruby27
|
20
|
+
build:
|
21
|
+
context: .
|
22
|
+
dockerfile: Dockerfile.ruby27
|
23
|
+
command: ./entrypoints/appraisal_test.sh
|
24
|
+
|
25
|
+
ruby30:
|
26
|
+
image: modulotechgroup/modulorails:testruby30
|
27
|
+
build:
|
28
|
+
context: .
|
29
|
+
dockerfile: Dockerfile.ruby30
|
30
|
+
command: ./entrypoints/appraisal_test.sh
|
31
|
+
|
32
|
+
ruby31:
|
33
|
+
image: modulotechgroup/modulorails:testruby31
|
34
|
+
build:
|
35
|
+
context: .
|
36
|
+
dockerfile: Dockerfile.ruby31
|
37
|
+
command: ./entrypoints/appraisal_test.sh
|