bridgetown-sitemap 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f226e2e56bf64f42b6a99beb1746bb7f80978afd15d32184811d48407d49c748
4
- data.tar.gz: 7f32c80706a3f471d5f06ebe160a08c98a42e2e454c58f07687b5f180b6fb026
3
+ metadata.gz: e4d18b78fd58f13369c0d31a8724d4f21c75e808633ce7d6b57e33096c01bc84
4
+ data.tar.gz: 4d36151297d1fcd9f6e346fba34429e980fc679bb7bf6b9f9238f23a6d361d3c
5
5
  SHA512:
6
- metadata.gz: 98a535901ad01db535da8c6f9edebdd77486ae18a02807ec888473d7eb70fe0d02bc9438ac5f23a4710a7c1e8bde768db0b37b37f2f83ac6cbff8c4d4b0ad118
7
- data.tar.gz: f54dec2c2f477bd7f4ea88dce67564e01ea4b7d94df19ee7523fcc18c8ae96245029475a038240d617e049747df570d3f35212e7507a43cd056693c152acd882
6
+ metadata.gz: 2cf2fcc93b4f2ed10d6ee42d5fb2f3aa0f238116678563a0be1923ba3588d9f09502cc486684a314fb9305ef566f1b56e5c52589340b1067f877181ed28a3d33
7
+ data.tar.gz: 161b5344a25c2dc540652da65bae69d285cdda829570213408461926f17d876aad6e50fae9d6e9173c3222bc23a7336e3f9302f4acebd99d2b23cc6bc9aac5eb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # main
2
2
 
3
+ # 1.1.1 / 11-06-2021
4
+
5
+ * Fix an error when building a site with uncommitted files.
6
+
3
7
  # 1.1.0 / 07-05-2021
4
8
 
5
9
  * Change `<lastmod>` behaviour to use time from `git log` rather than from the filesystem.
data/README.md CHANGED
@@ -31,7 +31,7 @@ content_engine: "resource"
31
31
  The `<lastmod>` tag in the `sitemap.xml` will reflect by priority:
32
32
 
33
33
  1. A personalised date if you add the variable `last_modified_at:` with a date in the Front Matter. (*Dates need to be formatted as* `%Y-%m-%d %H:%M:%S %z`)
34
- 2. The modified date of the file as reported by the `git log`.
34
+ 2. The modified date of the file as reported by `git log`.
35
35
 
36
36
 
37
37
  ## Exclusions
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownSitemap
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -10,7 +10,8 @@ module Bridgetown
10
10
  private
11
11
 
12
12
  def latest_git_commit_date
13
- Time.parse(`git log -1 --pretty="format:%cI" "#{path}"`)
13
+ date = `git log -1 --pretty="format:%cI" "#{path}"`
14
+ Time.parse(date) if date.present?
14
15
  end
15
16
  end
16
17
  end
data/test/test_sitemap.rb CHANGED
@@ -186,6 +186,22 @@ class TestSitemap < BridgetownSitemap::Test
186
186
  end
187
187
  end
188
188
 
189
+ context "rendering the site with an uncommitted file" do
190
+ setup do
191
+ File.write(source_dir("new.html"), "---\n---")
192
+ build_site
193
+ @sitemap = File.read(dest_dir("sitemap.xml"))
194
+ end
195
+
196
+ teardown do
197
+ File.delete(source_dir("new.html"))
198
+ end
199
+
200
+ should "include the uncommitted file in the sitemap" do
201
+ assert_match %r!<loc>https://example.com/new/</loc>!, @sitemap
202
+ end
203
+ end
204
+
189
205
  context "rendering the site without the resource content engine" do
190
206
  setup { config.delete "content_engine" }
191
207
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ayush Newatia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-07 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown