radiant-reader-extension 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
data/lib/reader_tags.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module ReaderTags
2
2
  include Radiant::Taggable
3
+ include ReaderHelper
3
4
 
4
5
  class TagError < StandardError; end
5
6
 
6
-
7
7
  # I can see this causing problems: will change soon
8
8
 
9
9
  desc %{
@@ -296,5 +296,15 @@ module ReaderTags
296
296
  tag.expand unless Reader.current && !tag.locals.page.cache?
297
297
  end
298
298
 
299
+ # work in progress
300
+ tag "truncated" do |tag|
301
+ limit = tag.attr['limit'] || 64
302
+ omission = tag.attr['omission'] || '&hellip;'
303
+ content = tag.expand
304
+
305
+ Rails.logger.warn "!! truncating #{content} to #{limit}#{omission}"
306
+
307
+ truncate_words(content, limit, omission)
308
+ end
299
309
 
300
310
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-reader-extension}
8
- s.version = "1.2.1"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
12
- s.date = %q{2010-12-14}
12
+ s.date = %q{2010-12-20}
13
13
  s.description = %q{Centralises reader/member/user registration and management tasks for the benefit of other extensions}
14
14
  s.email = %q{will@spanner.org}
15
15
  s.extra_rdoc_files = [
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.2.1"
4
+ version "1.2.2"
5
5
  description "Provides reader/member/user registration and management functions"
6
6
  url "http://spanner.org/radiant/reader"
7
7
 
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-14 00:00:00 +00:00
18
+ date: 2010-12-20 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency