rodauth-select-account 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +9 -2
- data/lib/rodauth/select-account/version.rb +1 -1
- data/lib/rodauth/select-account.rb +2 -0
- data/locales/en.yml +12 -0
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1268790cfe1720860c39c93bced3253c0cb1bf83dacec424d21cf7facd2f0a3
|
4
|
+
data.tar.gz: d161bade62b8e1b935fb192ebec45d3641b546b4cf52896cccc3f225a01450ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd003394cba3aaad1c103ffae1dd008cea6e3788cb9cd96636074021854891a20d2c9d43f83351ba938cd78b923fab171de7d31609d32638a18a0c2202b139d0
|
7
|
+
data.tar.gz: c489337600b4e06912ecf4e650dcf4b58b2ad69524d9acbe6cbe45df6ab8a1c75faa8b23481456eac12b6d4d42fb19779f2b22934e2ac175a84db597b61a687a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.1.0
|
6
|
+
|
7
|
+
Support for internationalization (I18n) by hooking up with [rodauth-i18n](https://github.com/janko/rodauth-i18n). Shipping translation for english under `locales/` dir.
|
8
|
+
|
5
9
|
## 0.0.4
|
6
10
|
|
7
11
|
Cookies used for selected account are now secure by default (httponly on, secure if request is TLS-enabled);
|
data/README.md
CHANGED
@@ -110,7 +110,7 @@ The following options and methods are also available to override, and names shou
|
|
110
110
|
* `add_account_redirect`
|
111
111
|
* `select_account_notice_flash`
|
112
112
|
* `select_account_error_flash`
|
113
|
-
* `require_select_account_error_flash
|
113
|
+
* `require_select_account_error_flash`
|
114
114
|
* `before_select_account_route`
|
115
115
|
* `before_select_account`
|
116
116
|
* `after_select_account`
|
@@ -125,6 +125,14 @@ These are also available methods:
|
|
125
125
|
* `accounts_in_session`: returns all the available accounts in session
|
126
126
|
* `require_select_account`: to be used like `require_account`, as a filter to actions that require a user to explicitly select an account before allowing it.
|
127
127
|
|
128
|
+
#### Internationalization (i18n)
|
129
|
+
|
130
|
+
`rodauth-select-account` supports translating all user-facing text found in all pages and forms and buttons, by integrating with [rodauth-i18n](https://github.com/janko/rodauth-i18n). Just set it up in your application and `rodauth` configuration.
|
131
|
+
|
132
|
+
Default translations shipping with `rodauth-select-account` can be found [in this directory](https://gitlab.com/honeyryderchuck/rodauth-select-account/-/tree/master/locales). If they're not available for the languages you'd like to support, consider getting them translated from the english text, and contributing them to this repository via a Merge Request.
|
133
|
+
|
134
|
+
(This feature is available since `v0.1`.)
|
135
|
+
|
128
136
|
## Ruby support policy
|
129
137
|
|
130
138
|
The minimum Ruby version required to run `rodauth-select-account` is 2.4 . Besides that, it supports all rubies that rodauth and roda support, including JRuby and truffleruby.
|
@@ -136,4 +144,3 @@ After checking out the repo, run `bundle install` to install dependencies. Then,
|
|
136
144
|
## Contributing
|
137
145
|
|
138
146
|
Bug reports and pull requests are welcome on Gitlab at https://gitlab.com/honeyryderchuck/rodauth-select-account.
|
139
|
-
|
data/locales/en.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
en:
|
2
|
+
rodauth:
|
3
|
+
add_account_notice_flash: "You have added a new account"
|
4
|
+
add_account_error_flash: "There was an error adding the new account"
|
5
|
+
require_add_account_error_flash: "Please add account to continue"
|
6
|
+
add_account_page_title: "Add Account"
|
7
|
+
add_account_button: "Add Account"
|
8
|
+
select_account_notice_flash: "You have selected an account"
|
9
|
+
select_account_error_flash: "There was an error selecting the account"
|
10
|
+
require_select_account_error_flash: "Please select account to continue"
|
11
|
+
select_account_page_title: "Select Account"
|
12
|
+
no_account_message: "could not select account"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth-select-account
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-12-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rodauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
13
27
|
description: Multiple authenticated accounts per session in rodauth.
|
14
28
|
email:
|
15
29
|
- cardoso_tiago@hotmail.com
|
@@ -26,6 +40,7 @@ files:
|
|
26
40
|
- lib/rodauth/features/select_account.rb
|
27
41
|
- lib/rodauth/select-account.rb
|
28
42
|
- lib/rodauth/select-account/version.rb
|
43
|
+
- locales/en.yml
|
29
44
|
- templates/add-account-form.str
|
30
45
|
- templates/add-account.str
|
31
46
|
- templates/select-account.str
|
@@ -50,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
65
|
- !ruby/object:Gem::Version
|
51
66
|
version: '0'
|
52
67
|
requirements: []
|
53
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.2.22
|
54
69
|
signing_key:
|
55
70
|
specification_version: 4
|
56
71
|
summary: Multiple authenticated accounts per session in rodauth.
|