radiant-reader-extension 3.0.14 → 3.0.15

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.
@@ -105,7 +105,7 @@ class Message < ActiveRecord::Base
105
105
  record_delivery(reader)
106
106
  true
107
107
  rescue => e
108
- logger.warn "@@ delivery failed: #{e.inspect}"
108
+ Rails.logger.warn "@@ delivery failed: #{e.inspect}"
109
109
  raise
110
110
  end
111
111
 
@@ -66,7 +66,6 @@ module ControllerExtensions # for inclusion into ApplicationController
66
66
  end
67
67
 
68
68
  def redirect_back_with_format(format = 'html')
69
- Rails.logger.warn "<<< redirect_back_with_format. session[:return_to] is #{session[:return_to].inspect}"
70
69
  address = session[:return_to]
71
70
  previous_format = File.extname(address)
72
71
  raise StandardError, "Can't add format to an already formatted url: #{address}" unless previous_format.blank? || previous_format == format
data/lib/grouped_page.rb CHANGED
@@ -6,6 +6,7 @@ module GroupedPage
6
6
  has_one :homegroup, :foreign_key => 'homepage_id', :class_name => 'Group'
7
7
  include InstanceMethods
8
8
  alias_method_chain :permitted_group_ids, :inheritance
9
+ alias_method_chain :cache?, :restrictions
9
10
  }
10
11
  end
11
12
 
@@ -26,16 +27,16 @@ module GroupedPage
26
27
  (permitted_group_ids_without_inheritance + inherited_group_ids).flatten.uniq
27
28
  end
28
29
 
30
+ # this is regrettably expensive and I plan to replace it with a
31
+ # private? method that would be cascaded on page update
32
+ #
29
33
  def restricted?
30
34
  self.permitted_groups.any?
31
35
  end
32
36
 
33
- # this is regrettably expensive and I plan to replace it with a
34
- # private? method that would be cascaded on page update
35
- #
36
- def cache?
37
- !restricted?
38
- end
37
+ def cache_with_restrictions?
38
+ cache_without_restrictions? && !restricted?
39
+ end
39
40
 
40
41
  def has_inherited_group?(group)
41
42
  return self.inherited_groups.include?(group)
data/lib/message_tags.rb CHANGED
@@ -80,10 +80,6 @@ module MessageTags
80
80
  <pre><code><r:recipient:edit_preferences_url /></code></pre>
81
81
  }
82
82
  tag "recipient:edit_preferences_url" do |tag|
83
-
84
- Rails.logger.warn "and the :host argument will be #{@mailer_vars[:@host]}"
85
- Rails.logger.warn "giving us #{reader_account_url(:host => @mailer_vars[:@host])}"
86
-
87
83
  reader_account_url(:host => @mailer_vars[:@host])
88
84
  end
89
85
 
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.14'
2
+ VERSION = '3.0.15'
3
3
  SUMMARY = %q{Reader/viewer/visitor registration, login and access-control for Radiant CMS}
4
4
  DESCRIPTION = %q{Provides reader/member/user registration and management functions including password-reminder, group-based page access control and administrative email.}
5
5
  URL = "http://radiant.spanner.org/reader"
Binary file
@@ -47,7 +47,7 @@ describe "Reader Tags" do
47
47
 
48
48
  describe "utility tags" do
49
49
  subject { page }
50
- it { should render(%{<r:truncated chars="50">All happy families are alike; each unhappy family is unhappy in its own way.</r:truncated>}).as('All happy families are alike; each unhappy&hellip;') }
50
+ it { should render(%{<r:truncated chars="50">All happy families are alike; each unhappy family is unhappy in its own way.</r:truncated>}).as(' All happy families are alike; each unhapp&hellip;') }
51
51
  it { should render(%{<r:truncated words="5" omission="">All happy families are alike; each unhappy family is unhappy in its own way.</r:truncated>}).as('All happy families are alike;') }
52
52
  it { should render(%{<r:truncated words="5" allow_html="true" omission=" (tbc)">All <em>happy families</em> are alike; each unhappy family is unhappy in its own way.</r:truncated>}).as('All <em>happy families</em> are alike; (tbc)') }
53
53
  end
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 14
10
- version: 3.0.14
9
+ - 15
10
+ version: 3.0.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -328,6 +328,7 @@ files:
328
328
  - public/stylesheets/sass/admin/reader.sass
329
329
  - public/stylesheets/sass/admin/reader_group.sass
330
330
  - public/stylesheets/sass/reader.sass
331
+ - radiant-reader-extension-3.0.14.gem
331
332
  - radiant-reader-extension.gemspec
332
333
  - Rakefile
333
334
  - reader_extension.rb
@@ -356,7 +357,7 @@ files:
356
357
  homepage: http://radiant.spanner.org/reader
357
358
  licenses: []
358
359
 
359
- post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.14'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
360
+ post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.15'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
360
361
  rdoc_options: []
361
362
 
362
363
  require_paths: