tkh_authentication 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/app/models/user.rb +2 -0
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/de.yml +75 -0
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/en.yml +1 -14
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/es.yml +7 -8
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/fr.yml +7 -188
- data/lib/tkh_authentication/version.rb +1 -1
- metadata +5 -4
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This is a Rails engine which provides basic authentication. It is based on Railscasts 250 and 274.
|
4
4
|
|
5
|
-
Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful.
|
5
|
+
Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful. It's primarily developed to work in sync with the tkh_cms gem suite but over time more and more effort will be made to make it work in isolation.
|
6
6
|
|
7
7
|
It's still in its infancy. Many improvements to come.
|
8
8
|
|
@@ -48,7 +48,7 @@ To display the login information module anywhere in your views
|
|
48
48
|
|
49
49
|
render 'shared/login_info'
|
50
50
|
|
51
|
-
|
51
|
+
To restrict access to your controllers to logged in users:
|
52
52
|
|
53
53
|
before_filter :authenticate, except: 'show'
|
54
54
|
|
data/app/models/user.rb
CHANGED
@@ -2,6 +2,8 @@ class User < ActiveRecord::Base
|
|
2
2
|
|
3
3
|
has_secure_password
|
4
4
|
|
5
|
+
has_many :pages
|
6
|
+
|
5
7
|
# not allowed are :admin:boolean, :auth_token:string, password_reset_token:string, password_reset_sent_at:datetime
|
6
8
|
attr_accessible :email, :password, :password_confirmation, :first_name, :last_name
|
7
9
|
|
@@ -0,0 +1,75 @@
|
|
1
|
+
de:
|
2
|
+
|
3
|
+
activerecord:
|
4
|
+
attributes:
|
5
|
+
user:
|
6
|
+
first_name: "prénom"
|
7
|
+
last_name: "nom de famille"
|
8
|
+
email: "courriel"
|
9
|
+
password: 'mot de passe'
|
10
|
+
password_confirmation: 'confirmation de mot de passe'
|
11
|
+
|
12
|
+
authentication:
|
13
|
+
create_account: 'create your account'
|
14
|
+
forgot_password: "forgot your password?"
|
15
|
+
login_confirmation: "You have been logged in!"
|
16
|
+
login_now: "log in"
|
17
|
+
logout: "log out"
|
18
|
+
logout_confirmation: "You have been logged out!"
|
19
|
+
not_registered: "you don't have an account yet?"
|
20
|
+
password_reset_confirmation: "Your password has been successfully reset!"
|
21
|
+
password_reset_email_subject: "Password reset"
|
22
|
+
reset_instructions: "To reset your password, click or visit this link: %{reset_url} \n\nIf you did not request your password to be reset, please ignore this email. Your password will stay as it is."
|
23
|
+
reset_password_email_sent_confirmation: "We have emailed you a link to reset your password."
|
24
|
+
reset_your_password: "Reset Password"
|
25
|
+
signup_confirmation: "Your account has been created and you have been logged in!"
|
26
|
+
update_password: "Update Password"
|
27
|
+
warning:
|
28
|
+
email_or_password_invalid: "Email or password is invalid"
|
29
|
+
login_needed: "You must be logged in to access this page. You have been redirected to the login form."
|
30
|
+
no_such_email: "We do not have any accounts with the email you have provided."
|
31
|
+
password_reset_expired: "Password reset has expired. There was a 24 hours grace period"
|
32
|
+
restricted_access: "This section is reserved to the site's administrators. Contact the site owner if you would like access to be granted to you."
|
33
|
+
|
34
|
+
|
35
|
+
# leaving these until I have used up all the ones I need.
|
36
|
+
access_control:
|
37
|
+
already_signed_up_message: "You already have a La Source account. Please login to your existing account."
|
38
|
+
email_hint: This address will be used as your login id
|
39
|
+
email_must_be_valid: Please enter a valid email address before submitting
|
40
|
+
|
41
|
+
|
42
|
+
have_an_account: 'have an account?'
|
43
|
+
hello: hello
|
44
|
+
hello_name: "Hi %{name},"
|
45
|
+
invalid_email_or_password: "Invalid email or password. Please double check your data, modify it, and resubmit the form"
|
46
|
+
login: "log in"
|
47
|
+
|
48
|
+
|
49
|
+
login_now_in_text: log in here
|
50
|
+
|
51
|
+
|
52
|
+
my_profile: 'my profile'
|
53
|
+
new_password: New Password
|
54
|
+
new_password_confirmation: New Password confirmation
|
55
|
+
|
56
|
+
not_authorized_alert: "You are not authorized to access this page. You have been redirected to the home page."
|
57
|
+
|
58
|
+
or: "or"
|
59
|
+
password: password
|
60
|
+
password_confirmation: password confirmation
|
61
|
+
|
62
|
+
|
63
|
+
password_must_match_confirmation: 'the password and the password confirmation must match'
|
64
|
+
password_on_its_way: "A new password has been generated. It will be emailed within 24 hours to %{email_address}."
|
65
|
+
password_reset: Password reset
|
66
|
+
phone_entry_request: "If enrolling in a course, we would appreciate at least one phone number."
|
67
|
+
please_log_in: Please log in to see your personal information.
|
68
|
+
remember_me: "stay logged in"
|
69
|
+
|
70
|
+
|
71
|
+
signup: "create an account"
|
72
|
+
|
73
|
+
signup_now: "create an account"
|
74
|
+
|
75
|
+
valid_email_needed: 'Please enter a valid email address'
|
@@ -1,18 +1,5 @@
|
|
1
|
-
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
|
-
|
4
1
|
en:
|
5
|
-
|
6
|
-
formats:
|
7
|
-
simple_date: "%B %d"
|
8
|
-
time:
|
9
|
-
formats:
|
10
|
-
informal: "at %H:%M"
|
11
|
-
default: "%a. %b. %d, '%y at %H:%M"
|
12
|
-
just_time: "%I:%M %p"
|
13
|
-
long: "%A %d %B %Y at %H:%M"
|
14
|
-
# custom sections - the obove is provided by rails
|
15
|
-
language_name: English
|
2
|
+
|
16
3
|
authentication:
|
17
4
|
create_account: 'create your account'
|
18
5
|
forgot_password: "forgot your password?"
|
@@ -1,14 +1,13 @@
|
|
1
1
|
es:
|
2
|
-
language_name: "Español"
|
3
2
|
|
4
3
|
activerecord:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
attributes:
|
5
|
+
user:
|
6
|
+
first_name: "nombre de pila"
|
7
|
+
last_name: "apellido"
|
8
|
+
email: "email"
|
9
|
+
password: 'contraseña'
|
10
|
+
password_confirmation: 'confirmar contraseña'
|
12
11
|
|
13
12
|
authentication:
|
14
13
|
create_account: 'crea tu cuenta'
|
@@ -1,194 +1,13 @@
|
|
1
1
|
fr:
|
2
|
-
date:
|
3
|
-
formats:
|
4
|
-
short: "%e %b"
|
5
|
-
long: "%e %B %Y"
|
6
|
-
only_day: "%e"
|
7
|
-
simple_date: "%d %B"
|
8
|
-
day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
|
9
|
-
abbr_day_names: [dim, lun, mar, mer, jeu, ven, sam]
|
10
|
-
month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
|
11
|
-
abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
|
12
|
-
order:
|
13
|
-
- :day
|
14
|
-
- :month
|
15
|
-
- :year
|
16
|
-
time:
|
17
|
-
formats:
|
18
|
-
informal: "à %H:%M"
|
19
|
-
default: "%a. %d %b %Y à %H:%M"
|
20
|
-
short: "%d %b %H:%M"
|
21
|
-
long: "%A %d %B %Y à %H:%M"
|
22
|
-
just_time: "%H:%M"
|
23
|
-
|
24
|
-
am: 'am'
|
25
|
-
pm: 'pm'
|
26
|
-
|
27
|
-
datetime:
|
28
|
-
distance_in_words:
|
29
|
-
half_a_minute: "une demi-minute"
|
30
|
-
less_than_x_seconds:
|
31
|
-
zero: "moins d'une seconde"
|
32
|
-
one: "moins d'une seconde"
|
33
|
-
other: "moins de %{count} secondes"
|
34
|
-
x_seconds:
|
35
|
-
one: "1 seconde"
|
36
|
-
other: "%{count} secondes"
|
37
|
-
less_than_x_minutes:
|
38
|
-
zero: "moins d'une minute"
|
39
|
-
one: "moins d'une minute"
|
40
|
-
other: "moins de %{count} minutes"
|
41
|
-
x_minutes:
|
42
|
-
one: "1 minute"
|
43
|
-
other: "%{count} minutes"
|
44
|
-
about_x_hours:
|
45
|
-
one: "environ une heure"
|
46
|
-
other: "environ %{count} heures"
|
47
|
-
x_days:
|
48
|
-
one: "1 jour"
|
49
|
-
other: "%{count} jours"
|
50
|
-
about_x_months:
|
51
|
-
one: "environ un mois"
|
52
|
-
other: "environ %{count} mois"
|
53
|
-
x_months:
|
54
|
-
one: "1 mois"
|
55
|
-
other: "%{count} mois"
|
56
|
-
about_x_years:
|
57
|
-
one: "environ un an"
|
58
|
-
other: "environ %{count} ans"
|
59
|
-
over_x_years:
|
60
|
-
one: "plus d'un an"
|
61
|
-
other: "plus de %{count} ans"
|
62
|
-
almost_x_years:
|
63
|
-
one: "presqu'un an"
|
64
|
-
other: "presque %{count} ans"
|
65
|
-
prompts:
|
66
|
-
year: "Année"
|
67
|
-
month: "Mois"
|
68
|
-
day: "Jour"
|
69
|
-
hour: "Heure"
|
70
|
-
minute: "Minute"
|
71
|
-
second: "Seconde"
|
72
|
-
|
73
|
-
number:
|
74
|
-
format:
|
75
|
-
separator: ","
|
76
|
-
delimiter: " "
|
77
|
-
precision: 3
|
78
|
-
significant: false
|
79
|
-
strip_insignificant_zeros: false
|
80
|
-
currency:
|
81
|
-
format:
|
82
|
-
format: "%n %u"
|
83
|
-
unit: "€"
|
84
|
-
separator: ","
|
85
|
-
delimiter: " "
|
86
|
-
precision: 2
|
87
|
-
significant: false
|
88
|
-
strip_insignificant_zeros: false
|
89
|
-
percentage:
|
90
|
-
format:
|
91
|
-
delimiter: ""
|
92
|
-
precision:
|
93
|
-
format:
|
94
|
-
delimiter: ""
|
95
|
-
human:
|
96
|
-
format:
|
97
|
-
delimiter: ""
|
98
|
-
precision: 2
|
99
|
-
significant: true
|
100
|
-
strip_insignificant_zeros: true
|
101
|
-
storage_units:
|
102
|
-
format: "%n %u"
|
103
|
-
units:
|
104
|
-
byte:
|
105
|
-
one: "octet"
|
106
|
-
other: "octets"
|
107
|
-
kb: "ko"
|
108
|
-
mb: "Mo"
|
109
|
-
gb: "Go"
|
110
|
-
tb: "To"
|
111
|
-
decimal_units:
|
112
|
-
format: "%n %u"
|
113
|
-
units:
|
114
|
-
unit: ""
|
115
|
-
thousand: "millier"
|
116
|
-
million: "million"
|
117
|
-
billion: "milliard"
|
118
|
-
trillion: "billion"
|
119
|
-
quadrillion: "million de milliards"
|
120
|
-
|
121
|
-
support:
|
122
|
-
array:
|
123
|
-
words_connector: ", "
|
124
|
-
two_words_connector: " et "
|
125
|
-
last_word_connector: " et "
|
126
|
-
select:
|
127
|
-
prompt: "Veuillez sélectionner"
|
128
|
-
|
129
|
-
helpers:
|
130
|
-
select:
|
131
|
-
prompt: "Veuillez sélectionner"
|
132
|
-
submit:
|
133
|
-
create: "Créer un %{model}"
|
134
|
-
update: "Modifier ce %{model}"
|
135
|
-
submit: "Enregistrer ce %{model}"
|
136
|
-
|
137
|
-
attributes:
|
138
|
-
created_at: "Créé le"
|
139
|
-
updated_at: "Modifié le"
|
140
|
-
|
141
|
-
errors:
|
142
|
-
format: "Le %{attribute} %{message}"
|
143
|
-
messages: &errors_messages
|
144
|
-
inclusion: "n'est pas inclus(e) dans la liste"
|
145
|
-
exclusion: "n'est pas disponible"
|
146
|
-
invalid: "n'est pas valide"
|
147
|
-
confirmation: "ne concorde pas avec la confirmation"
|
148
|
-
accepted: "doit être accepté(e)"
|
149
|
-
empty: "doit être rempli(e)"
|
150
|
-
blank: "doit être rempli(e)"
|
151
|
-
too_long: "est trop long (pas plus de %{count} caractères)"
|
152
|
-
too_short: "est trop court (au moins %{count} caractères)"
|
153
|
-
wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)"
|
154
|
-
not_a_number: "n'est pas un nombre"
|
155
|
-
not_an_integer: "doit être un nombre entier"
|
156
|
-
greater_than: "doit être supérieur à %{count}"
|
157
|
-
greater_than_or_equal_to: "doit être supérieur ou égal à %{count}"
|
158
|
-
equal_to: "doit être égal à %{count}"
|
159
|
-
less_than: "doit être inférieur à %{count}"
|
160
|
-
less_than_or_equal_to: "doit être inférieur ou égal à %{count}"
|
161
|
-
odd: "doit être impair"
|
162
|
-
even: "doit être pair"
|
163
|
-
template: &errors_template
|
164
|
-
header:
|
165
|
-
one: "Impossible d'enregistrer ce %{model} : 1 erreur"
|
166
|
-
other: "Impossible d'enregistrer ce %{model} : %{count} erreurs"
|
167
|
-
body: "Veuillez vérifier les champs suivants : "
|
168
|
-
|
169
|
-
activerecord:
|
170
|
-
errors:
|
171
|
-
messages:
|
172
|
-
taken: "n'est pas disponible"
|
173
|
-
record_invalid: "La validation a échoué : %{errors}"
|
174
|
-
<<: *errors_messages
|
175
|
-
template:
|
176
|
-
<<: *errors_template
|
177
|
-
full_messages:
|
178
|
-
format: "%{attribute} %{message}"
|
179
|
-
|
180
|
-
# custom sections - the obove is provided by rails
|
181
|
-
language_name: Français
|
182
|
-
|
183
2
|
|
184
3
|
activerecord:
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
4
|
+
attributes:
|
5
|
+
user:
|
6
|
+
first_name: "prénom"
|
7
|
+
last_name: "nom de famille"
|
8
|
+
email: "courriel"
|
9
|
+
password: 'mot de passe'
|
10
|
+
password_confirmation: 'confirmation de mot de passe'
|
192
11
|
|
193
12
|
authentication:
|
194
13
|
create_your_account: 'créez votre compte'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/generators/tkh_authentication/create_migration/create_migration_generator.rb
|
116
116
|
- lib/generators/tkh_authentication/create_migration/templates/create_users.rb
|
117
117
|
- lib/generators/tkh_authentication/create_or_update_locales/create_or_update_locales_generator.rb
|
118
|
+
- lib/generators/tkh_authentication/create_or_update_locales/templates/de.yml
|
118
119
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/en.yml
|
119
120
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/es.yml
|
120
121
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/fr.yml
|
@@ -171,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
172
|
version: '0'
|
172
173
|
segments:
|
173
174
|
- 0
|
174
|
-
hash:
|
175
|
+
hash: -2564773836693246689
|
175
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
177
|
none: false
|
177
178
|
requirements:
|
@@ -180,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
181
|
version: '0'
|
181
182
|
segments:
|
182
183
|
- 0
|
183
|
-
hash:
|
184
|
+
hash: -2564773836693246689
|
184
185
|
requirements: []
|
185
186
|
rubyforge_project:
|
186
187
|
rubygems_version: 1.8.23
|