sitemap_generator 4.3.0 → 4.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ./
3
3
  specs:
4
- sitemap_generator (4.3.0)
4
+ sitemap_generator (4.3.1)
5
5
  builder
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -104,6 +104,7 @@ That's it! Welcome to the future!
104
104
 
105
105
  ## Changelog
106
106
 
107
+ * v4.3.1: Support integer timestamps. Update README for new features added in last release.
107
108
  * v4.3.0: Support `media` attibute on alternate links ([#125](https://github.com/kjvarga/sitemap_generator/issues/125)). Changed `SitemapGenerator::S3Adapter` to write files in a single operation, avoiding potential permissions errors when listing a directory prior to writing ([#130](https://github.com/kjvarga/sitemap_generator/issues/130)). Remove Sitemap Writer from ping task ([#129](https://github.com/kjvarga/sitemap_generator/issues/129)). Support `url:expires` element ([#126](https://github.com/kjvarga/sitemap_generator/issues/126)).
108
109
  * v4.2.0: Update Google ping URL. Quote the ping URL in the output. Support Video `video:price` element ([#117](https://github.com/kjvarga/sitemap_generator/issues/117)). Support symbols as well as strings for most arguments to `add()` ([#113](https://github.com/kjvarga/sitemap_generator/issues/113)). Ensure that `public_path` and `sitemaps_path` end with a slash (`/`) ([#113](https://github.com/kjvarga/sitemap_generator/issues/118)).
109
110
  * v4.1.1: Support setting the S3 region. Fixed bug where incorrect URL was being used in the ping to search engines - only affected sites with a single sitemap file and no index file. Output the URL being pinged in the verbose output. Test in Rails 4.
@@ -602,7 +603,7 @@ For other options be sure to check out the **Sitemap Extensions** section below.
602
603
  add '/contact_us', :changefreq => 'monthly'
603
604
  ```
604
605
 
605
- * `lastmod` - Default: `Time.now` (Time).
606
+ * `lastmod` - Default: `Time.now` (Integer, Time, Date, DateTime, String).
606
607
 
607
608
  The date and time of last modification. Example:
608
609
 
@@ -626,6 +627,13 @@ add '/login', :host => 'https://securehost.com'
626
627
  add '/about', :priority => 0.75
627
628
  ```
628
629
 
630
+ * `expires` - Optional (Integer, Time, Date, DateTime, String)
631
+
632
+ [expires][Request removal of this URL from search engines' indexes]. Example (uses ActiveSupport):
633
+
634
+ ```ruby
635
+ add '/about', :expires => Time.now + 2.weeks
636
+
629
637
 
630
638
  ### Adding Links to the Sitemap Index
631
639
 
@@ -1004,6 +1012,7 @@ end
1004
1012
  * `:href` - Required, string.
1005
1013
  * `:lang` - Required, string.
1006
1014
  * `:nofollow` - Optional, boolean. Used to mark link as "nofollow".
1015
+ * `:media` - Optional, string. Specify [media][media targets for responsive design pages].
1007
1016
 
1008
1017
  ## Raison d'être
1009
1018
 
@@ -1093,3 +1102,5 @@ Copyright (c) 2009 Karl Varga released under the MIT license
1093
1102
  [alternate_links]:http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2620865
1094
1103
  [using_pagemaps]:https://developers.google.com/custom-search/docs/structured_data#pagemaps
1095
1104
  [iso_4217]:http://en.wikipedia.org/wiki/ISO_4217
1105
+ [media]:https://developers.google.com/webmasters/smartphone-sites/details
1106
+ [expires]:https://support.google.com/customsearch/answer/2631051?hl=en
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.3.0
1
+ 4.3.1
@@ -204,6 +204,8 @@ module SitemapGenerator
204
204
  date.new_offset(0)
205
205
  elsif date.respond_to?(:utc)
206
206
  date.utc
207
+ elsif date.is_a?(Integer)
208
+ Time.at(date).utc
207
209
  else
208
210
  nil
209
211
  end
@@ -112,6 +112,10 @@ describe SitemapGenerator::Builder::SitemapUrl do
112
112
  time.expects(:strftime).times(2).returns('+0800', '1970-01-01T00:00:00')
113
113
  new_url.send(:w3c_date, time).should == '1970-01-01T00:00:00+08:00'
114
114
  end
115
+
116
+ it "should support integers" do
117
+ new_url.send(:w3c_date, Time.at(0).to_i).should == '1970-01-01T00:00:00+00:00'
118
+ end
115
119
  end
116
120
 
117
121
  describe "yes_or_no" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 4
7
7
  - 3
8
- - 0
9
- version: 4.3.0
8
+ - 1
9
+ version: 4.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Karl Varga
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-11-14 00:00:00 -08:00
17
+ date: 2013-12-10 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -174,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - ">="
176
176
  - !ruby/object:Gem::Version
177
- hash: -1330086136380345562
177
+ hash: 556482523995297639
178
178
  segments:
179
179
  - 0
180
180
  version: "0"
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- hash: -1330086136380345562
186
+ hash: 556482523995297639
187
187
  segments:
188
188
  - 0
189
189
  version: "0"