rails-env 2.0.1 → 2.0.2
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/.github/workflows/ruby-tests.yml +1 -0
- data/CHANGELOG.md +5 -1
- data/gemfiles/rails_6_1.gemfile +6 -0
- data/lib/rails-env/version.rb +1 -1
- data/lib/rails-env.rb +16 -4
- data/rails-env.gemspec +1 -0
- metadata +21 -8
- data/gemfiles/rails_5_0.gemfile +0 -4
- data/gemfiles/rails_5_2.gemfile +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce003b00f171ed3cf0d04345adfaf1cde619fd0e99cbc913ca57015344c4686b
|
4
|
+
data.tar.gz: 2532b5358fbeb054778349e852baba9a8689de98339813038fb4cbe192dff6b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e18cd47c8f8637dc39235043bd83e13861d5585cddfb86ba3dc13934ed9de10739dbb27fb40f3e140d2e312c6e04570c25513716a1793284a55454b43d76590
|
7
|
+
data.tar.gz: 77a8797ca01accd1302f6866c1253915450a6b14f52284101e67590750b7928bb397beb555abae2bdb1a230504f04ec15bec226baa62947154614143ba8416f5
|
data/CHANGELOG.md
CHANGED
@@ -11,9 +11,13 @@ Prefix your message with one of the following:
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
12
12
|
-->
|
13
13
|
|
14
|
+
## Unreleased
|
15
|
+
|
16
|
+
- [Fixed] Fix ActiveRecord 7 deprecation warnings.
|
17
|
+
|
14
18
|
## v2.0.1 - 2021-12-11
|
15
19
|
|
16
|
-
- [Fixed] Rails 7 was raising an exception because
|
20
|
+
- [Fixed] Rails 7 was raising an exception because
|
17
21
|
`ActionView::Base.raise_on_missing_translations` is not a thing anymore.
|
18
22
|
|
19
23
|
## v2.0.0 - 2021-12-06
|
data/lib/rails-env/version.rb
CHANGED
data/lib/rails-env.rb
CHANGED
@@ -15,6 +15,10 @@ module Rails
|
|
15
15
|
end
|
16
16
|
|
17
17
|
module RailsEnv
|
18
|
+
def self.deprecations
|
19
|
+
@deprecations ||= []
|
20
|
+
end
|
21
|
+
|
18
22
|
class Railtie < Rails::Railtie
|
19
23
|
initializer "rails-env" do
|
20
24
|
Rails.env.extend(Extension)
|
@@ -30,7 +34,15 @@ module RailsEnv
|
|
30
34
|
propagate(:action_mailer, "::ActionMailer::Base")
|
31
35
|
propagate(:action_view, "::ActionView::Base")
|
32
36
|
propagate(:active_job, "::ActiveJob::Base")
|
33
|
-
|
37
|
+
|
38
|
+
with_rails_constraint("< 7.0.0") do
|
39
|
+
propagate(:active_record, "::ActiveRecord::Base")
|
40
|
+
end
|
41
|
+
|
42
|
+
with_rails_constraint(">= 7.0.0") do
|
43
|
+
propagate(:active_record, "::ActiveRecord")
|
44
|
+
end
|
45
|
+
|
34
46
|
propagate(:time_zone, "::Time", :zone)
|
35
47
|
propagate_hosts
|
36
48
|
propagate_autoload_paths
|
@@ -101,9 +113,9 @@ module RailsEnv
|
|
101
113
|
end
|
102
114
|
|
103
115
|
def self.with_rails_constraint(constraint)
|
104
|
-
Gem::Requirement
|
105
|
-
|
106
|
-
|
116
|
+
yield if Gem::Requirement
|
117
|
+
.create(constraint)
|
118
|
+
.satisfied_by?(Gem::Version.create(Rails::VERSION::STRING))
|
107
119
|
end
|
108
120
|
|
109
121
|
module Extension
|
data/rails-env.gemspec
CHANGED
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.2
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sqlite3
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: Avoid environment detection on Rails
|
126
140
|
email:
|
127
141
|
- me@fnando.com
|
@@ -145,9 +159,8 @@ files:
|
|
145
159
|
- LICENSE.md
|
146
160
|
- README.md
|
147
161
|
- Rakefile
|
148
|
-
- gemfiles/rails_5_0.gemfile
|
149
|
-
- gemfiles/rails_5_2.gemfile
|
150
162
|
- gemfiles/rails_6_0.gemfile
|
163
|
+
- gemfiles/rails_6_1.gemfile
|
151
164
|
- gemfiles/rails_7_0.gemfile
|
152
165
|
- lib/rails-env.rb
|
153
166
|
- lib/rails-env/version.rb
|
@@ -159,10 +172,10 @@ metadata:
|
|
159
172
|
rubygems_mfa_required: 'true'
|
160
173
|
homepage_uri: https://github.com/fnando/rails_env
|
161
174
|
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.
|
175
|
+
source_code_uri: https://github.com/fnando/rails_env/tree/v2.0.2
|
176
|
+
changelog_uri: https://github.com/fnando/rails_env/tree/v2.0.2/CHANGELOG.md
|
177
|
+
documentation_uri: https://github.com/fnando/rails_env/tree/v2.0.2/README.md
|
178
|
+
license_uri: https://github.com/fnando/rails_env/tree/v2.0.2/LICENSE.md
|
166
179
|
post_install_message:
|
167
180
|
rdoc_options: []
|
168
181
|
require_paths:
|
data/gemfiles/rails_5_0.gemfile
DELETED
data/gemfiles/rails_5_2.gemfile
DELETED