rails-env 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/gemfiles/rails_7_0.gemfile +1 -1
- data/lib/rails-env/version.rb +1 -1
- data/lib/rails-env.rb +11 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e00ec34d2254078e3667c53a347d45fad7dcec20bdbcfd0f059cfaaff238c845
|
4
|
+
data.tar.gz: 899f3078f18680bd4f854edff0026ff47a31696022a387fd590d366e2eac460e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1c11390634eb183f2fa38e87c9b5f395484691bf7bd4cbbea6b0715eda5f531ba0c4c963e9934c3a7b4d376a8259e3ff927595323ebf3c78553f9965c3157be
|
7
|
+
data.tar.gz: 4a4f99bdab25e0a9b02cc588350d81ab6ea877da83531438f369ca0e2a94d10a55a0e10eec9892ede28a785a819190850f0153a0dd9c024ec44b0c98235dc061
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,11 @@ Prefix your message with one of the following:
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
12
12
|
-->
|
13
13
|
|
14
|
+
## v2.0.1 - 2021-12-11
|
15
|
+
|
16
|
+
- [Fixed] Rails 7 was raising an exception because
|
17
|
+
`ActionView::Base.raise_on_missing_translations` is not a thing anymore.
|
18
|
+
|
14
19
|
## v2.0.0 - 2021-12-06
|
15
20
|
|
16
21
|
- [Fixed] Fix Rails 7 issues.
|
data/gemfiles/rails_7_0.gemfile
CHANGED
data/lib/rails-env/version.rb
CHANGED
data/lib/rails-env.rb
CHANGED
@@ -56,9 +56,11 @@ module RailsEnv
|
|
56
56
|
I18n.default_locale = config.i18n.default_locale
|
57
57
|
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
with_rails_constraint("< 7.0.0") do
|
60
|
+
if config.i18n.respond_to?(:raise_on_missing_translations)
|
61
|
+
ActionView::Base.raise_on_missing_translations =
|
62
|
+
config.i18n.raise_on_missing_translations
|
63
|
+
end
|
62
64
|
end
|
63
65
|
|
64
66
|
I18n.locale = config.i18n.locale if config.i18n.locale
|
@@ -98,6 +100,12 @@ module RailsEnv
|
|
98
100
|
end
|
99
101
|
end
|
100
102
|
|
103
|
+
def self.with_rails_constraint(constraint)
|
104
|
+
Gem::Requirement
|
105
|
+
.create(constraint)
|
106
|
+
.satisfied_by?(Gem::Version.create(Rails::VERSION::STRING))
|
107
|
+
end
|
108
|
+
|
101
109
|
module Extension
|
102
110
|
def on(*envs, &block)
|
103
111
|
env_matched = envs.include?(:any) || envs.include?(Rails.env.to_sym)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -159,10 +159,10 @@ metadata:
|
|
159
159
|
rubygems_mfa_required: 'true'
|
160
160
|
homepage_uri: https://github.com/fnando/rails_env
|
161
161
|
bug_tracker_uri: https://github.com/fnando/rails_env/issues
|
162
|
-
source_code_uri: https://github.com/fnando/rails_env/tree/v2.0.
|
163
|
-
changelog_uri: https://github.com/fnando/rails_env/tree/v2.0.
|
164
|
-
documentation_uri: https://github.com/fnando/rails_env/tree/v2.0.
|
165
|
-
license_uri: https://github.com/fnando/rails_env/tree/v2.0.
|
162
|
+
source_code_uri: https://github.com/fnando/rails_env/tree/v2.0.1
|
163
|
+
changelog_uri: https://github.com/fnando/rails_env/tree/v2.0.1/CHANGELOG.md
|
164
|
+
documentation_uri: https://github.com/fnando/rails_env/tree/v2.0.1/README.md
|
165
|
+
license_uri: https://github.com/fnando/rails_env/tree/v2.0.1/LICENSE.md
|
166
166
|
post_install_message:
|
167
167
|
rdoc_options: []
|
168
168
|
require_paths:
|