sitemap_notifier 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
  SitemapNotifier::Notifier.sitemap_url = "http://example.com/sitemap.xml"
3
3
 
4
4
  # source models – default is :all for all models
5
- # SitemapNotifier::Notifier.sources = [:articles, :categories]
5
+ # SitemapNotifier::Notifier.models = [Article, Category]
6
6
 
7
7
  # enabled in which environments – default is [:production]
8
8
  # SitemapNotifier::Notifier.environments = [:development, :production]
@@ -3,7 +3,7 @@ module SitemapNotifier
3
3
  def notify_sitemap
4
4
  notifier = ::SitemapNotifier::Notifier
5
5
 
6
- if notifier.sources == :all || notifier.sources.include?(self.class.name.tableize.to_sym)
6
+ if notifier.models == :all || notifier.models.include?(self.class)
7
7
  notifier.notify!
8
8
  end
9
9
  end
@@ -9,9 +9,9 @@ module SitemapNotifier
9
9
  attr_accessor :sitemap_url
10
10
 
11
11
  # source
12
- attr_writer :sources
13
- def sources
14
- @sources ||= :all
12
+ attr_writer :models
13
+ def models
14
+ @models ||= :all
15
15
  end
16
16
 
17
17
  # delay
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitemap_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lasse Bunk
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-20 00:00:00 Z
18
+ date: 2011-09-28 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Ruby on Rails plugin that automatically notifies Google, Bing, Yahoo, and Ask.com of changes to your models, i.e. changes to your sitemap.
@@ -31,7 +31,6 @@ files:
31
31
  - lib/generators/sitemap_notifier/templates/initializer.rb
32
32
  - lib/sitemap_notifier/active_record.rb
33
33
  - lib/sitemap_notifier/notifier.rb
34
- - lib/sitemap_notifier.rb
35
34
  homepage: http://github.com/lassebunk/sitemap_notifier
36
35
  licenses: []
37
36
 
@@ -1,4 +0,0 @@
1
- require 'sitemap_notifier/active_record'
2
- require 'sitemap_notifier/notifier'
3
-
4
- ActiveRecord::Base.send :include, SitemapNotifier::ActiveRecord