radiant-taggable-extension 2.0.0.rc1 → 2.0.0.rc2

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.
@@ -1,5 +1,5 @@
1
1
  module RadiantTaggableExtension
2
- VERSION = '2.0.0.rc1'
2
+ VERSION = '2.0.0.rc2'
3
3
  SUMMARY = %q{Tagging, clouding and faceting extension for Radiant CMS}
4
4
  DESCRIPTION = %q{General purpose tagging and retrieval extension: more versatile but less focused than the tags extension. A good way to support faceted search.}
5
5
  URL = "http://spanner.org/radiant/taggable"
@@ -17,7 +17,7 @@ module Taggable
17
17
  protected
18
18
 
19
19
  def load_default_tag_regions
20
- returning OpenStruct.new do |tag|
20
+ OpenStruct.new.tap do |tag|
21
21
  tag.edit = Radiant::AdminUI::RegionSet.new do |edit|
22
22
  edit.main.concat %w{edit_header edit_form}
23
23
  edit.form.concat %w{edit_name edit_role edit_description}
@@ -13,6 +13,10 @@ module Taggable
13
13
  def has_tags?
14
14
  false
15
15
  end
16
+ def is_taggable?
17
+ ActiveSupport::Deprecation.warn("The is_taggable syntax has been replaced with has_tags for consistency with other extensions.", caller)
18
+ has_tags?
19
+ end
16
20
 
17
21
  def has_tags
18
22
  return if has_tags?
@@ -70,8 +74,10 @@ module Taggable
70
74
  ActiveRecord::Base.taggable_models.push(self.to_s.intern)
71
75
  end
72
76
 
73
- alias :is_taggable :has_tags
74
- alias :is_taggable? :has_tags?
77
+ def is_taggable
78
+ ActiveSupport::Deprecation.warn("The is_taggable syntax has been replaced with has_tags() and has_tags? for consistency with other extensions.", caller)
79
+ has_tags
80
+ end
75
81
  end
76
82
 
77
83
  module TaggableClassMethods
@@ -88,7 +94,7 @@ module Taggable
88
94
  def has_tags?
89
95
  true
90
96
  end
91
-
97
+
92
98
  def tags_for_cloud_from(these, limit=50)
93
99
  Tag.attached_to(these).most_popular(limit) # here popularity is use-count *within the group*
94
100
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-taggable-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424087
4
+ hash: 15424081
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 0
10
10
  - rc
11
- - 1
12
- version: 2.0.0.rc1
11
+ - 2
12
+ version: 2.0.0.rc2
13
13
  platform: ruby
14
14
  authors:
15
15
  - William Ross
@@ -89,7 +89,7 @@ files:
89
89
  homepage: http://spanner.org/radiant/taggable
90
90
  licenses: []
91
91
 
92
- post_install_message: "\n Add this to your radiant project with:\n\n config.gem 'radiant-taggable-extension', :version => '~> 2.0.0.rc1'\n\n "
92
+ post_install_message: "\n Add this to your radiant project with:\n\n config.gem 'radiant-taggable-extension', :version => '~> 2.0.0.rc2'\n\n "
93
93
  rdoc_options: []
94
94
 
95
95
  require_paths: