radiant-tags-extension 1.6.6 → 1.6.7

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,3 +1,8 @@
1
1
  module RadiantTagsExtension
2
- VERSION = '1.6.6'
2
+ VERSION = '1.6.7'
3
+ AUTHORS = ['Benny Degezelle']
4
+ EMAIL = ['benny@gorilla-webdesign.be']
5
+ HOMEPAGE = 'http://ext.radiantcms.org/extensions/195-tags'
6
+ SUMMARY = %q{Tagging for Radiant CMS}
7
+ DESCRIPTION = %q{This extension enhances the page model with tagging capabilities, tagging as in \"2.0" and tagclouds.}
3
8
  end
@@ -5,15 +5,15 @@ TaggingMethods = Proc.new do
5
5
  end
6
6
  alias_method_chain :valid?, :tags
7
7
 
8
- def tag_with new_tags
9
- self.save if self.new_record?
8
+ def save_with_tags!
9
+ self.save_without_tags!
10
10
  # just skip the whole method if the tags string hasn't changed
11
- return if new_tags == tag_list
11
+ return if @new_tags == tag_list
12
12
 
13
13
  # tags have changed, so we delete all taggings and re-create to preserve order
14
14
  taggings.clear
15
15
 
16
- new_tags.split(MetaTag::DELIMITER).each do |tag|
16
+ @new_tags.split(MetaTag::DELIMITER).each do |tag|
17
17
  begin
18
18
  tag = MetaTag.find_or_initialize_by_name(tag.strip.squeeze(" "))
19
19
  meta_tags << tag unless meta_tags.include?(tag)
@@ -26,8 +26,11 @@ TaggingMethods = Proc.new do
26
26
  end
27
27
  end
28
28
  end
29
+ alias_method_chain :save!, :tags
29
30
 
30
- alias :meta_tags= :tag_with
31
+ def meta_tags=(tags)
32
+ @new_tags = tags
33
+ end
31
34
 
32
35
  def ordered_meta_tags
33
36
  # HACK: need to order by tagging to preserve creation order, otherwise
@@ -6,11 +6,11 @@ Gem::Specification.new do |s|
6
6
  s.name = 'radiant-tags-extension'
7
7
  s.version = RadiantTagsExtension::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ['Benny Degezelle']
10
- s.email = ['benny@gorilla-webdesign.be']
11
- s.homepage = 'http://ext.radiantcms.org/extensions/195-tags'
12
- s.summary = %q{Tagging for Radiant CMS}
13
- s.description = %q{This extension enhances the page model with tagging capabilities, tagging as in \"2.0" and tagclouds.}
9
+ s.authors = RadiantTagsExtension::AUTHORS
10
+ s.email = RadiantTagsExtension::EMAIL
11
+ s.homepage = RadiantTagsExtension::HOMEPAGE
12
+ s.summary = RadiantTagsExtension::SUMMARY
13
+ s.description = RadiantTagsExtension::DESCRIPTION
14
14
 
15
15
  # TODO: add gem dependency on this instead of bundling it
16
16
  # s.add_dependency 'has_many_polymorphs'
data/tags_extension.rb CHANGED
@@ -13,9 +13,8 @@ class TagsExtension < Radiant::Extension
13
13
  raise "The Shards extension is required and must be loaded first!" unless defined?(admin.page)
14
14
  if Radiant::Config.table_exists?
15
15
  Radiant::Config['tags.results_page_url'] = TagsExtension::DEFAULT_RESULTS_URL unless Radiant::Config['tags.results_page_url']
16
- Radiant::Config['tags.complex_strings'] = 'false' unless Radiant::Config['tags.complex_strings']
16
+ Radiant::Config['tags.complex_strings'] = 'true' unless Radiant::Config['tags.complex_strings']
17
17
  end
18
- TagSearchPage
19
18
  Page.send :include, RadiusTags
20
19
  begin
21
20
  MetaTag
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-tags-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 6
10
- version: 1.6.6
9
+ - 7
10
+ version: 1.6.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benny Degezelle
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-03 00:00:00 +01:00
19
- default_executable:
18
+ date: 2012-05-06 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: This extension enhances the page model with tagging capabilities, tagging as in \"2.0" and tagclouds.
@@ -238,11 +237,10 @@ files:
238
237
  - vendor/plugins/has_many_polymorphs/test/setup.rb
239
238
  - vendor/plugins/has_many_polymorphs/test/test_helper.rb
240
239
  - vendor/plugins/has_many_polymorphs/test/unit/has_many_polymorphs_test.rb
241
- has_rdoc: true
242
240
  homepage: http://ext.radiantcms.org/extensions/195-tags
243
241
  licenses: []
244
242
 
245
- post_install_message: "\n Add this to your radiant project by adding the following line to your environment.rb:\n config.gem 'radiant-tags-extension', :version => '1.6.6'\n "
243
+ post_install_message: "\n Add this to your radiant project by adding the following line to your environment.rb:\n config.gem 'radiant-tags-extension', :version => '1.6.7'\n "
246
244
  rdoc_options: []
247
245
 
248
246
  require_paths:
@@ -268,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
266
  requirements: []
269
267
 
270
268
  rubyforge_project:
271
- rubygems_version: 1.4.2
269
+ rubygems_version: 1.8.23
272
270
  signing_key:
273
271
  specification_version: 3
274
272
  summary: Tagging for Radiant CMS
@@ -429,3 +427,4 @@ test_files:
429
427
  - vendor/plugins/has_many_polymorphs/test/setup.rb
430
428
  - vendor/plugins/has_many_polymorphs/test/test_helper.rb
431
429
  - vendor/plugins/has_many_polymorphs/test/unit/has_many_polymorphs_test.rb
430
+ has_rdoc: