rails_locale_detection 3.0.0 → 3.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/CHANGELOG.md +37 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -29
- data/lib/rails_locale_detection/version.rb +1 -1
- data/rails_locale_detection.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dec076589ca16f216a536e23b3d099e774928fd14b56a24bf8254e05348c715e
|
|
4
|
+
data.tar.gz: 471f5933c6021b16f900d54a6f77e4a1c5c71aedd488e54971168902bdb98aa0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8866c4544627be14a013f7d1d414f0e35bad3aff38b221394ebc9d9d9f3dfd5948eecb6ea7ab4b7c8575ac0d4d2fcf64a5cb9822f4ee2049f24314d1baa3253
|
|
7
|
+
data.tar.gz: 31f10d8820d4867224a0ae48dff54d639077c48751240f8ebc85f40c94d980d02d509f728aea4f70e5bf578843aa8bb4e5b1d86128c220d3d55c3858be83c8b0
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.0.1 (2026-05-15)
|
|
4
|
+
|
|
5
|
+
* Corrected `required_ruby_version` to `>= 3.1` to match the supported CI matrix
|
|
6
|
+
* Documented `ActionController::API` support in the README
|
|
7
|
+
* Added a compatibility line to the top of the README
|
|
8
|
+
* Extracted changelog into `CHANGELOG.md`
|
|
9
|
+
|
|
10
|
+
## 3.0 (2026-05-15)
|
|
11
|
+
|
|
12
|
+
* Rails 6.1, 7.0, 7.1, 7.2, and 8.0 compatibility
|
|
13
|
+
* Dropped support for Rails < 6.1 and Ruby < 3.1
|
|
14
|
+
* `ActionController::API` controllers are now supported alongside `ActionController::Base`
|
|
15
|
+
* Replaced Travis CI with GitHub Actions
|
|
16
|
+
* Internal cleanup: removed legacy version conditionals, modernized syntax, dropped the `timecop` dev dependency in favor of ActiveSupport's `freeze_time`
|
|
17
|
+
|
|
18
|
+
## 2.3 (2018-06-16)
|
|
19
|
+
|
|
20
|
+
* Update dependencies
|
|
21
|
+
|
|
22
|
+
## 2.2 (2017-04-22)
|
|
23
|
+
|
|
24
|
+
* Cookie is now set only when the locale differs from the previous value, to avoid Set-Cookie headers being sent with every request
|
|
25
|
+
|
|
26
|
+
## 2.1 (2016-08-01)
|
|
27
|
+
|
|
28
|
+
* Rails 5 compatibility
|
|
29
|
+
|
|
30
|
+
## 2.0 (2015-10-14)
|
|
31
|
+
|
|
32
|
+
* Rails 4 compatibility
|
|
33
|
+
* Namespace has been changed from Rails::LocaleDetection to RailsLocaleDetection,
|
|
34
|
+
although the previous namespace is still supported for legacy config files
|
|
35
|
+
* Locale detection has been moved to a separate object, to avoid polluting controllers with extra methods.
|
|
36
|
+
* Detection order has been changed to `param` first, as this make more sense in most contexts.
|
|
37
|
+
* Shortcut locale accessors are now mixed into views as well
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/mateomurphy/rails_locale_detection/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
+
**Compatibility:** Rails 6.1–8.0, Ruby 3.1+
|
|
6
|
+
|
|
5
7
|
Sets the current locale of a request using a combination of params, cookies, http headers, and an optional user object.
|
|
6
8
|
|
|
7
9
|
In turn, it checks the value of `params[:locale]`, `cookies[:locale]` and `HTTP_ACCEPT_LANGUAGE` headers to find a locale that
|
|
@@ -27,7 +29,9 @@ To support user locales, add a `user_locale` method
|
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
30
|
-
Methods for accessing `current_locale`, `available_locales`, and `alternate_locales` are available in controller and views
|
|
32
|
+
Methods for accessing `current_locale`, `available_locales`, and `alternate_locales` are available in controller and views.
|
|
33
|
+
|
|
34
|
+
Works with both `ActionController::Base` and `ActionController::API` controllers.
|
|
31
35
|
|
|
32
36
|
## Configuration
|
|
33
37
|
|
|
@@ -55,34 +59,7 @@ The configuration options:
|
|
|
55
59
|
|
|
56
60
|
## Changelog
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* Rails 6.1, 7.0, 7.1, 7.2, and 8.0 compatibility
|
|
61
|
-
* Dropped support for Rails < 6.1 and Ruby < 2.7
|
|
62
|
-
* `ActionController::API` controllers are now supported alongside `ActionController::Base`
|
|
63
|
-
* Replaced Travis CI with GitHub Actions
|
|
64
|
-
* Internal cleanup: removed legacy version conditionals, modernized syntax, dropped the `timecop` dev dependency in favor of ActiveSupport's `freeze_time`
|
|
65
|
-
|
|
66
|
-
### 2.3 (2018-06-16)
|
|
67
|
-
|
|
68
|
-
* Update dependencies
|
|
69
|
-
|
|
70
|
-
### 2.2 (2017-04-22)
|
|
71
|
-
|
|
72
|
-
* Cookie is now set only when the locale differs from the previous value, to avoid Set-Cookie headers being sent with every request
|
|
73
|
-
|
|
74
|
-
### 2.1 (2016-08-01)
|
|
75
|
-
|
|
76
|
-
* Rails 5 compatibility
|
|
77
|
-
|
|
78
|
-
### 2.0 (2015-10-14)
|
|
79
|
-
|
|
80
|
-
* Rails 4 compatibility
|
|
81
|
-
* Namespace has been changed from Rails::LocaleDetection to RailsLocaleDetection,
|
|
82
|
-
although the previous namespace is still supported for legacy config files
|
|
83
|
-
* Locale detection has been moved to a seperate object, to avoid polluting controllers with extra methods.
|
|
84
|
-
* Detection order has been changed to `param` first, as this make more sense in most contexts.
|
|
85
|
-
* Shortcut locale accessors are now mixed into views as well
|
|
62
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
86
63
|
|
|
87
64
|
## Contributing to rails_locale_detection
|
|
88
65
|
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
|
13
13
|
gem.homepage = "https://github.com/mateomurphy/rails_locale_detection"
|
|
14
14
|
gem.license = 'MIT'
|
|
15
15
|
|
|
16
|
-
gem.required_ruby_version = '>=
|
|
16
|
+
gem.required_ruby_version = '>= 3.1'
|
|
17
17
|
|
|
18
18
|
gem.files = `git ls-files`.split($/)
|
|
19
19
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_locale_detection
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mateo Murphy
|
|
@@ -107,6 +107,7 @@ files:
|
|
|
107
107
|
- ".mise.toml"
|
|
108
108
|
- ".rspec"
|
|
109
109
|
- Appraisals
|
|
110
|
+
- CHANGELOG.md
|
|
110
111
|
- Gemfile
|
|
111
112
|
- Gemfile.lock
|
|
112
113
|
- LICENSE
|
|
@@ -144,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
144
145
|
requirements:
|
|
145
146
|
- - ">="
|
|
146
147
|
- !ruby/object:Gem::Version
|
|
147
|
-
version: '
|
|
148
|
+
version: '3.1'
|
|
148
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
150
|
requirements:
|
|
150
151
|
- - ">="
|