radiant-reader-extension 1.3.10 → 1.3.11
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.
- data/VERSION +1 -1
- data/app/controllers/reader_activations_controller.rb +2 -5
- data/config/locales/en.yml +3 -0
- data/lib/controller_extensions.rb +11 -2
- data/radiant-reader-extension.gemspec +1 -1
- data/reader_extension.rb +1 -1
- data/spec/controllers/reader_activations_controller_spec.rb +6 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.11
|
@@ -31,14 +31,11 @@ class ReaderActivationsController < ReaderActionController
|
|
31
31
|
if @reader
|
32
32
|
@reader.activate!
|
33
33
|
self.current_reader = @reader
|
34
|
-
flash[:notice] = t("thanks_activated")
|
35
|
-
redirect_back_or_to default_activated_url
|
36
34
|
else
|
37
35
|
@error = t("please_check_message")
|
38
|
-
flash[:error] = t("activation_failed")
|
39
|
-
expires_now
|
40
|
-
render :action => 'show'
|
41
36
|
end
|
37
|
+
expires_now
|
38
|
+
render :action => 'show'
|
42
39
|
end
|
43
40
|
|
44
41
|
protected
|
data/config/locales/en.yml
CHANGED
@@ -10,6 +10,7 @@ en:
|
|
10
10
|
activation_required_explanation: "You should have received a confirmation message containing a link that will activate your account."
|
11
11
|
activation_sent: "Activation message sent"
|
12
12
|
affected_fields_highlighted: "The affected fields are highlighted below."
|
13
|
+
all_deliveries_failed: "All deliveries failed"
|
13
14
|
already_active: "Your account is already active."
|
14
15
|
already_logged_in: "You're already logged in!"
|
15
16
|
already_registered: "If you've already registered, you should only need to"
|
@@ -82,6 +83,7 @@ en:
|
|
82
83
|
login_or_email: "Login name or email address"
|
83
84
|
login_unknown: "Sorry: we don't recognise that combination of username and password."
|
84
85
|
logout_message: "You are logged out. Bye!"
|
86
|
+
message_delivered: "Message delivered"
|
85
87
|
must_be_empty: "must be empty"
|
86
88
|
navigation:
|
87
89
|
account: "Your account"
|
@@ -141,6 +143,7 @@ en:
|
|
141
143
|
send_it_again: "send it again"
|
142
144
|
send_reset_button: "send me instructions"
|
143
145
|
set_new_password: "set new password"
|
146
|
+
some_deliveries_failed: "Some deliveries failed"
|
144
147
|
sorry: "sorry"
|
145
148
|
sorry_access_denied: "Sorry: access denied"
|
146
149
|
spam_trap: "it's a spam trap and shouldn't be visible"
|
@@ -47,9 +47,18 @@ module ControllerExtensions # for inclusion into ApplicationController
|
|
47
47
|
session[:return_to] = location
|
48
48
|
end
|
49
49
|
|
50
|
+
def redirect_back
|
51
|
+
if session[:return_to]
|
52
|
+
redirect_to session[:return_to]
|
53
|
+
session[:return_to] = nil
|
54
|
+
true
|
55
|
+
else
|
56
|
+
false
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
50
60
|
def redirect_back_or_to(default)
|
51
|
-
redirect_to(
|
52
|
-
session[:return_to] = nil
|
61
|
+
redirect_back or redirect_to(default)
|
53
62
|
end
|
54
63
|
|
55
64
|
def redirect_back_with_format(format = 'html')
|
data/reader_extension.rb
CHANGED
@@ -21,8 +21,9 @@ describe ReaderActivationsController do
|
|
21
21
|
@reader.activated_at.should be_close((Time.now).utc, 1.minute)
|
22
22
|
end
|
23
23
|
|
24
|
-
it "should
|
25
|
-
response.should
|
24
|
+
it "should show the show page" do
|
25
|
+
response.should be_success
|
26
|
+
response.should render_template("show")
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
@@ -32,13 +33,13 @@ describe ReaderActivationsController do
|
|
32
33
|
put :update, :id => @newreader.id, :activation_code => 'down perishcope'
|
33
34
|
end
|
34
35
|
|
35
|
-
it "should render the
|
36
|
+
it "should render the show page" do
|
36
37
|
response.should be_success
|
37
38
|
response.should render_template("show")
|
38
39
|
end
|
39
40
|
|
40
|
-
it "should flash an error" do
|
41
|
-
flash[:error].
|
41
|
+
it "should not flash an error" do
|
42
|
+
flash[:error].should be_nil
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-reader-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 11
|
10
|
+
version: 1.3.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- spanner
|