quo_vadis 1.3.2 → 1.4.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 +21 -0
- data/README.md +1 -1
- data/Rakefile +1 -9
- data/app/mailers/quo_vadis/notifier.rb +3 -3
- data/config/locales/quo_vadis.en.yml +6 -0
- data/lib/quo_vadis.rb +0 -8
- data/lib/quo_vadis/version.rb +1 -1
- data/quo_vadis.gemspec +2 -1
- data/test/dummy/config/initializers/quo_vadis.rb +0 -7
- data/test/integration/config_test.rb +0 -14
- data/test/test_helper.rb +0 -2
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cd2f1cd76d5a11353c01d7644a56b587f4e958c
|
4
|
+
data.tar.gz: 34586a9d0e1ee196d3a81382e1e5c8cbb4e4052e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24da8db1b59b03a14586e650f88aa0f43f39cf7b7d58f5aa403689a36f9b86a82bfd0bf736364f797c586a94965f40427c371da5d942731bad6e4530d89cb5bc
|
7
|
+
data.tar.gz: 2b40461150448705b4eaff767c30ab195d322364bc507314a7a73323a98e7e3b64a10116ae317e251b38a5c414c2e04da20337b23ced428c0f9d7c8854fded1f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
3
|
|
4
|
+
## 1.4.0 (12 October 2016)
|
5
|
+
|
6
|
+
* Internationalise emails' subject lines.
|
7
|
+
|
8
|
+
|
9
|
+
## 1.3.2 (22 July 2015)
|
10
|
+
|
11
|
+
* Loosen Rails dependency.
|
12
|
+
* Remove unnecessary code from test app.
|
13
|
+
|
14
|
+
|
15
|
+
## 1.3.1 (22 July 2015)
|
16
|
+
|
17
|
+
* Prefer an instance method to prepare for activation.
|
18
|
+
|
19
|
+
|
20
|
+
## 1.3.0 (23 May 2013)
|
21
|
+
|
22
|
+
* Validate username's uniqueness case-insensitively.
|
23
|
+
|
24
|
+
|
4
25
|
## 1.2.3 (21 March 2013)
|
5
26
|
|
6
27
|
* Ability to override the activation email's from and subject.
|
data/README.md
CHANGED
@@ -161,7 +161,7 @@ Write the mailer view, i.e. the email which will be sent to your new users ([exa
|
|
161
161
|
* be at `app/views/quo_vadis/notifier/invite.text.erb`
|
162
162
|
* render `@url` somewhere (this is the link the user clicks to go to the invitation page)
|
163
163
|
|
164
|
-
You can also refer to `@user` in the email view, as well as any other data you pass to `invite_to_activate`. Note that passing `:from` and/or `:subject` in the hash to `invite_to_activate` overrides the default `QuoVadis.from` and/or `
|
164
|
+
You can also refer to `@user` in the email view, as well as any other data you pass to `invite_to_activate`. Note that passing `:from` and/or `:subject` in the hash to `invite_to_activate` overrides the default `QuoVadis.from` and/or `I18n.t('quo_vadis.notifier.invite.subject')` respectively.
|
165
165
|
|
166
166
|
Configure the email's from address in `config/initializers/quo_vadis.rb` (or pass in the data hash to `invite_to_activate`).
|
167
167
|
|
data/Rakefile
CHANGED
@@ -2,21 +2,13 @@ require 'bundler'
|
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
4
|
require 'rake/testtask'
|
5
|
-
require 'rake/rdoctask'
|
6
5
|
|
7
6
|
Rake::TestTask.new(:test) do |t|
|
8
7
|
t.libs << 'lib'
|
9
8
|
t.libs << 'test'
|
10
9
|
t.pattern = 'test/**/*_test.rb'
|
11
10
|
t.verbose = false
|
12
|
-
|
13
|
-
|
14
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
15
|
-
rdoc.rdoc_dir = 'rdoc'
|
16
|
-
rdoc.title = 'Quo Vadis'
|
17
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
18
|
-
rdoc.rdoc_files.include('README.md')
|
19
|
-
rdoc.rdoc_files.include('app/**/*.rb')
|
11
|
+
t.warning = false
|
20
12
|
end
|
21
13
|
|
22
14
|
task :default => :test
|
@@ -6,7 +6,7 @@ module QuoVadis
|
|
6
6
|
def change_password(user)
|
7
7
|
@username = user.username
|
8
8
|
@url = change_password_url user.token
|
9
|
-
mail :to => user.email, :from => QuoVadis.from, :subject =>
|
9
|
+
mail :to => user.email, :from => QuoVadis.from, :subject => I18n.t('quo_vadis.notifier.change_password.subject')
|
10
10
|
end
|
11
11
|
|
12
12
|
# Sends an email to <tt>user</tt> with a link to a page where they
|
@@ -20,8 +20,8 @@ module QuoVadis
|
|
20
20
|
@url = invitation_url user.token
|
21
21
|
|
22
22
|
from = data.delete(:from) || QuoVadis.from
|
23
|
-
subject = data.delete(:subject) ||
|
24
|
-
|
23
|
+
subject = data.delete(:subject) || I18n.t('quo_vadis.notifier.invite.subject')
|
24
|
+
|
25
25
|
data.each { |k,v| instance_variable_set :"@#{k}", v }
|
26
26
|
mail :to => user.email, :from => from, :subject => subject
|
27
27
|
end
|
@@ -20,3 +20,9 @@ en:
|
|
20
20
|
accepted: "Your account is active and you're now signed in."
|
21
21
|
invalid_token: "Sorry, this link isn't valid anymore."
|
22
22
|
invalid_credentials: "Sorry, we couldn't accept that username and/or password."
|
23
|
+
|
24
|
+
notifier:
|
25
|
+
change_password:
|
26
|
+
subject: Change your password
|
27
|
+
invite:
|
28
|
+
subject: Activate your account
|
data/lib/quo_vadis.rb
CHANGED
@@ -101,14 +101,6 @@ module QuoVadis
|
|
101
101
|
mattr_accessor :from
|
102
102
|
@@from = 'noreply@example.com'
|
103
103
|
|
104
|
-
# Subject of the forgotten-password email.
|
105
|
-
mattr_accessor :subject_change_password
|
106
|
-
@@subject_change_password = 'Change your password.'
|
107
|
-
|
108
|
-
# Subject of the invitation email.
|
109
|
-
mattr_accessor :subject_invitation
|
110
|
-
@@subject_invitation = 'Activate your account'
|
111
|
-
|
112
104
|
|
113
105
|
#
|
114
106
|
# Miscellaneous
|
data/lib/quo_vadis/version.rb
CHANGED
data/quo_vadis.gemspec
CHANGED
@@ -23,8 +23,9 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency 'bcrypt-ruby', '~> 3.0.0'
|
24
24
|
|
25
25
|
# s.add_development_dependency 'rails', '~> 3.0.4' # so we can test CSRF protection
|
26
|
-
s.add_development_dependency 'sqlite3
|
26
|
+
s.add_development_dependency 'sqlite3'
|
27
27
|
s.add_development_dependency 'capybara', '~>1.1'
|
28
28
|
s.add_development_dependency 'launchy'
|
29
29
|
s.add_development_dependency 'rake'
|
30
|
+
s.add_development_dependency 'test-unit', '~> 3.0'
|
30
31
|
end
|
@@ -67,13 +67,6 @@ QuoVadis.configure do |config|
|
|
67
67
|
# From whom the forgotten-password email should be sent.
|
68
68
|
config.from = 'noreply@example.com'
|
69
69
|
|
70
|
-
# Subject of the forgotten-password email.
|
71
|
-
config.subject_change_password = 'Change your password'
|
72
|
-
|
73
|
-
# Subject of the invitation email.
|
74
|
-
config.subject_invitation = 'Activate your account'
|
75
|
-
|
76
|
-
|
77
70
|
#
|
78
71
|
# Miscellaneous
|
79
72
|
#
|
@@ -115,18 +115,4 @@ class ConfigTest < ActiveSupport::IntegrationCase
|
|
115
115
|
assert_equal ['jim@example.com'], email.from
|
116
116
|
end
|
117
117
|
|
118
|
-
test 'change-password mailer subject config' do
|
119
|
-
QuoVadis.subject_change_password = 'You idiot!'
|
120
|
-
(user = User.last).generate_token
|
121
|
-
email = QuoVadis::Notifier.change_password(user)
|
122
|
-
assert_equal 'You idiot!', email.subject
|
123
|
-
end
|
124
|
-
|
125
|
-
test 'invitation mailer subject config' do
|
126
|
-
QuoVadis.subject_invitation = 'Wooha'
|
127
|
-
(user = User.last).generate_token
|
128
|
-
email = QuoVadis::Notifier.invite(user)
|
129
|
-
assert_equal 'Wooha', email.subject
|
130
|
-
end
|
131
|
-
|
132
118
|
end
|
data/test/test_helper.rb
CHANGED
@@ -56,8 +56,6 @@ def reset_quo_vadis_configuration
|
|
56
56
|
QuoVadis.signed_out_hook = nil
|
57
57
|
QuoVadis.layout = 'application'
|
58
58
|
QuoVadis.from = 'noreply@example.com'
|
59
|
-
QuoVadis.subject_change_password = 'Change your password'
|
60
|
-
QuoVadis.subject_invitation = 'Activate your account'
|
61
59
|
QuoVadis.remember_for = 2.weeks
|
62
60
|
QuoVadis.blocked = false
|
63
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quo_vadis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 3.0.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: sqlite3
|
48
|
+
name: sqlite3
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
@@ -100,6 +100,20 @@ dependencies:
|
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: test-unit
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.0'
|
103
117
|
description: Simple username/password authentication for Rails 3.
|
104
118
|
email:
|
105
119
|
- boss@airbladesoftware.com
|
@@ -219,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
233
|
version: '0'
|
220
234
|
requirements: []
|
221
235
|
rubyforge_project: quo_vadis
|
222
|
-
rubygems_version: 2.
|
236
|
+
rubygems_version: 2.5.1
|
223
237
|
signing_key:
|
224
238
|
specification_version: 4
|
225
239
|
summary: Simple username/password authentication for Rails 3.
|