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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea802749d2e70a95ff81d1b0b0a1de144edd4e6832c7c82d2572f27261628f81
4
- data.tar.gz: 8c145d8d22615140b8522e5cfdac2ad3b8306901d26d40827ac0e8a4025ba746
3
+ metadata.gz: e00ec34d2254078e3667c53a347d45fad7dcec20bdbcfd0f059cfaaff238c845
4
+ data.tar.gz: 899f3078f18680bd4f854edff0026ff47a31696022a387fd590d366e2eac460e
5
5
  SHA512:
6
- metadata.gz: 7304f1800a93bb07c64c51c1bd514576935110bfda4d1a5121c81920076c14b1e5ba327d222deb8d689d647657c63b671d84ddcbaafff72b78bfc80a45c8f6a0
7
- data.tar.gz: e00b9ac0a8c4dd4196709d042c8042afdb668ad1edb8714f0eb549405ad25a0fb07ff1a6a3a96eb38b4e88992cd4f479a40a28970d7895f0830ea0b201cdff50
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.
@@ -3,4 +3,4 @@
3
3
  source "https://rubygems.org"
4
4
  gemspec path: ".."
5
5
 
6
- gem "rails", "~> 7.0.0.alpha2"
6
+ gem "rails", "~> 7.0.0.rc1"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsEnv
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
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
- if config.i18n.respond_to?(:raise_on_missing_translations)
60
- ActionView::Base.raise_on_missing_translations =
61
- config.i18n.raise_on_missing_translations
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.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-06 00:00:00.000000000 Z
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.0
163
- changelog_uri: https://github.com/fnando/rails_env/tree/v2.0.0/CHANGELOG.md
164
- documentation_uri: https://github.com/fnando/rails_env/tree/v2.0.0/README.md
165
- license_uri: https://github.com/fnando/rails_env/tree/v2.0.0/LICENSE.md
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: