jekyll-sitemap 0.6.1 → 0.6.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb47192318cebe414dcbb039415aa8552eba9e09
4
- data.tar.gz: cbd6b3a37119d0d53169b00191c7f375ef11f2d1
3
+ metadata.gz: f9880a5009a3aaeac34db6db65a1bef1495003cd
4
+ data.tar.gz: e7fe8c7f186641a6e266573d1e2133d92cf7fce1
5
5
  SHA512:
6
- metadata.gz: 8a9248ae011481a24d01f72deec69acdf4fa63e80a238ed95e4d7df92cba11147c1abdf5b8b158a5e5dac71a3212cb42bd2fa51c922caa56f3370e67834e3987
7
- data.tar.gz: 375306d7c78a56de56a208369bc344d0f5f7ac673a7ac2f2a697531b6d2be3d6e04a2343ed2e9340b283c71aa3f7157b6d279e5703e17baae3407ac866770f9b
6
+ metadata.gz: 77929b27a0c4aedd89c7cd09230c0e0239fb38604f725879b3556efe3ff08cb8df95c6b4b93ee6d3ec32018c9e3bd6a232efa900e915a2b7f07f782ba283aa32
7
+ data.tar.gz: 15a9aba383b96a0151e09ecc1e692a5838401620f5be5b9f15db6fb5d8e2c842d60b30a66ce43a24bf4360b4be9ab4122cbdd742693479ac931e71b9b337b70a
@@ -3,4 +3,7 @@ rvm:
3
3
  - 2.1
4
4
  - 2.0.0
5
5
  - 1.9.3
6
+ before_script: bundle update
6
7
  script: "script/cibuild"
8
+ sudo: false
9
+ cache: bundler
@@ -1,3 +1,10 @@
1
+ ## 0.6.2 / 2014-11-08
2
+
3
+ ### Bug Fixes
4
+
5
+ * Don't attempt to read the sitemap upon page creation. (#52)
6
+ * Use new secure methods to build source & dest paths. (#53)
7
+
1
8
  ## 0.6.1 / 2014-10-17
2
9
 
3
10
  ### Minor Enhancements
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "jekyll-sitemap"
5
5
  spec.summary = "Automatically generate a sitemap.xml for your Jekyll site."
6
- spec.version = "0.6.1"
6
+ spec.version = "0.6.2"
7
7
  spec.authors = ["GitHub, Inc."]
8
8
  spec.email = "support@github.com"
9
9
  spec.homepage = "https://github.com/jekyll/jekyll-sitemap"
@@ -1,6 +1,12 @@
1
1
  require 'fileutils'
2
2
 
3
3
  module Jekyll
4
+ class PageWithoutAFile < Page
5
+ def read_yaml(*)
6
+ @data ||= {}
7
+ end
8
+ end
9
+
4
10
  class JekyllSitemap < Jekyll::Generator
5
11
  safe true
6
12
 
@@ -28,7 +34,7 @@ module Jekyll
28
34
 
29
35
  # Destination for sitemap.xml file within the site source directory
30
36
  def destination_path
31
- File.expand_path "sitemap.xml", @site.dest
37
+ @site.in_dest_dir("sitemap.xml")
32
38
  end
33
39
 
34
40
  # copy sitemap template from source to destination
@@ -38,7 +44,7 @@ module Jekyll
38
44
  end
39
45
 
40
46
  def sitemap_content
41
- site_map = Page.new(@site, File.dirname(__FILE__), "", "sitemap.xml")
47
+ site_map = PageWithoutAFile.new(@site, File.dirname(__FILE__), "", "sitemap.xml")
42
48
  site_map.content = File.read(source_path)
43
49
  site_map.data["layout"] = nil
44
50
  site_map.render(Hash.new, @site.site_payload)
@@ -47,7 +53,7 @@ module Jekyll
47
53
 
48
54
  # Checks if a sitemap already exists in the site source
49
55
  def sitemap_exists?
50
- File.exists? File.expand_path "sitemap.xml", @site.source
56
+ File.exists? @site.in_source_dir("sitemap.xml")
51
57
  end
52
58
  end
53
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-17 00:00:00.000000000 Z
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll