rack-locale_memorable 0.3.3 → 0.3.4

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: 51ae9ed5a060ebb4263d0faeded7a6bdd94d40abb9835c670ce500e278ae5ac1
4
- data.tar.gz: 758bc0cf5ac3498be41d78b79382024752d8a7ebb5995c0097b16031dacf4d86
3
+ metadata.gz: ee932ccf31e17732f87bcbf4db7647cae4836b1424d85097da281ffe1ffaeddf
4
+ data.tar.gz: 9c807857bf6296170af7746df724aa24d90ff9f7fb22d4c41b508f365da51cda
5
5
  SHA512:
6
- metadata.gz: a6f73bce4a3940de8115d561cb2a3785f143e48496ba0822a186257122a3b8e4a0e2de1bc84ef5466da5cb0862fdcf5e410520d0d949100f7cfecfefad9e1a15
7
- data.tar.gz: e38a7bd143e65235b55af8b05897135d04ca897ba0fdac1892e66b992005f7e81517a3265924bbba210860451abd8c39e9d5c756f029a5299bd9c98831599027
6
+ metadata.gz: 4ba6eff0fbb1cd813a1ad908cea006779858702d63911592679893060b10ba0c464cef63d7a493ef366aaedac558fa85f492cbd9f6653b06de8e5baebac7ae97
7
+ data.tar.gz: ac2e798b0ac97a176af482b78f260eae3ece611c197f2435196895c869127d7cf2beb0c25d0798e5858003d369be131e7d2a097cbe8d11790a133755cb2082c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.4] - 2022-09-28
4
+
5
+ ### Fixed
6
+
7
+ - fix changelog url https://github.com/nov/rack-locale_memorable/commit/fc744c6fe1489cee12225b8cc5991a9f4d797278
8
+
3
9
  ## [0.3.3] - 2022-09-28
4
10
 
5
11
  ### Refactored
data/README.md CHANGED
@@ -21,29 +21,20 @@ Rails.application.configure do |config|
21
21
  end
22
22
  ```
23
23
 
24
- NOTE: If you're using devise, set `Rack::LocaleMemorable` before `Warden::Manager`, otherwise you see warden error messages in wrong locale.
25
-
26
- ```ruby
27
- Rails.application.configure do |config|
28
- config.middleware.insert_before Warden::Manager, Rack::LocaleMemorable
29
- end
30
- ```
31
-
32
- By default, this gem handles
24
+ By default, this gem handles locale variables in 3 places in the order below, and when explicit locale is specified (= when locale is specified via query params) in the request, remember it in cookie too.
33
25
 
34
- * `params['locale']` as explicit locale
35
- * `cookies['locale']` as remembered locale
36
- * `headers['HTTP_ACCEPT_LANGUAGE']` as implicit locale
26
+ 1. `params['locale']` as explicit locale
27
+ 2. `cookies['locale']` as remembered locale
28
+ 3. `headers['HTTP_ACCEPT_LANGUAGE']` as implicit locale
37
29
 
38
- and when explicit locale is specified in the request, remember it in cookie.
30
+ There are several customizable options listed below.
39
31
 
40
- You can customize those values
41
32
  * params_key (`'locale'` by default)
42
33
  * cookie_key (`'locale'` by default)
43
34
  * secure_cookie (`true` by default)
44
35
  * cookie_lifetime (`1.year` by default)
45
36
 
46
- like below
37
+ You can customize them like below
47
38
 
48
39
  ```ruby
49
40
  Rails.application.configure do |config|
@@ -57,6 +48,14 @@ Rails.application.configure do |config|
57
48
  end
58
49
  ```
59
50
 
51
+ NOTE: If you're using devise, set `Rack::LocaleMemorable` before `Warden::Manager`, otherwise you see warden error messages in wrong locale.
52
+
53
+ ```ruby
54
+ Rails.application.configure do |config|
55
+ config.middleware.insert_before Warden::Manager, Rack::LocaleMemorable
56
+ end
57
+ ```
58
+
60
59
  ## Development
61
60
 
62
61
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  class LocaleMemorable
5
- VERSION = '0.3.3'
5
+ VERSION = '0.3.4'
6
6
  end
7
7
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
18
  spec.metadata['source_code_uri'] = 'https://github.com/nov/rack-locale_memorable'
19
- spec.metadata['changelog_uri'] = 'https://github.com/nov/rack-locale_memorable/CHANGELOG.md'
19
+ spec.metadata['changelog_uri'] = 'https://github.com/nov/rack-locale_memorable/blob/main/CHANGELOG.md'
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-locale_memorable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-27 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -147,7 +147,7 @@ licenses:
147
147
  metadata:
148
148
  homepage_uri: https://github.com/nov/rack-locale_memorable
149
149
  source_code_uri: https://github.com/nov/rack-locale_memorable
150
- changelog_uri: https://github.com/nov/rack-locale_memorable/CHANGELOG.md
150
+ changelog_uri: https://github.com/nov/rack-locale_memorable/blob/main/CHANGELOG.md
151
151
  post_install_message:
152
152
  rdoc_options: []
153
153
  require_paths: