radiant-reader-extension 1.3.10 → 1.3.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.10
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
@@ -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(session[:return_to] || default)
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')
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-reader-extension}
8
- s.version = "1.3.10"
8
+ s.version = "1.3.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
data/reader_extension.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require_dependency 'application_controller'
2
2
 
3
3
  class ReaderExtension < Radiant::Extension
4
- version "1.3.10"
4
+ version "1.3.11"
5
5
  description "Provides reader/member/user registration and management functions"
6
6
  url "http://spanner.org/radiant/reader"
7
7
 
@@ -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 redirect to a confirmation page" do
25
- response.should be_redirect
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 please-activate page" do
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].should_not be_nil
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 10
10
- version: 1.3.10
9
+ - 11
10
+ version: 1.3.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner