petrify 0.4.2 → 0.4.3

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
- SHA1:
3
- metadata.gz: 6c086ef4cd464da1a9ef636ea37412ff44971678
4
- data.tar.gz: 901f9b8fbe04b7c88ff912ce97cd1ca67acf87d8
2
+ SHA256:
3
+ metadata.gz: e7e9bbafebfed1dd01c8e2b678aa8c23d21751979139eb5e041c4940a54ca620
4
+ data.tar.gz: a0d9b3aaf1a9cd5667c0843d784e0f37bebece33b5c600f6744b8169267c4e97
5
5
  SHA512:
6
- metadata.gz: 0c875f3552659e165a733b04bea2c622bae1b4187cb114d65c1f078401200be8e40ff440d4faa58be270bc040801faa0935d7399319f953fc159d041534e123c
7
- data.tar.gz: a6b05544836e62ff26ac486723b2af99bad66d8c89ff650ac3079383848adcceb4ad5466995f01b65cff34a82d37772c5b21f37329091f8c7acc8593463f9f42
6
+ metadata.gz: 3585396864422408ccabbb65431ca8f0945dd2a8f21a2f7be78d2457afde632b202dc1bd58c158fece495d1d584c796d689d5ade56fa20c4797b452c4352990a
7
+ data.tar.gz: ad68e9b2f4064c65c4a4b90e56edaa2570f35b4217e0311ab4263fc7303e1eb5331c9322385c6054289ce29ccca45018d0ba785fc9b7880d3fe6610e3c66e9b0
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased](https://github.com/adrianshort/petrify)
8
+
9
+ This functionality is on GitHub but not yet on RubyGems.
10
+
11
+ ## [0.4.3](https://github.com/adrianshort/petrify/releases/tag/v0.4.3) - 2020-07-25
12
+
13
+ - Move development to GitHub.
14
+
15
+ ## [0.4.2](https://github.com/adrianshort/petrify/releases/tag/v0.4.2) - 2020-01-16
16
+
17
+ ## [0.4.1](https://github.com/adrianshort/petrify/releases/tag/v0.4.1) - 2019-11-13
18
+
19
+ ## [0.4.0](https://github.com/adrianshort/petrify/releases/tag/v0.4.0) - 2019-10-26
20
+
21
+ ## [0.3.1](https://github.com/adrianshort/petrify/releases/tag/v0.3.1) - 2019-01-22
22
+
23
+ ## [0.3.0](https://github.com/adrianshort/petrify/releases/tag/v0.3.0) - 2018-10-18
24
+
25
+ ## [0.2.0](https://github.com/adrianshort/petrify/releases/tag/v0.2.0) - 2018-10-04
26
+
27
+ ## [0.1.0](https://github.com/adrianshort/petrify/releases/tag/v0.1.0) - 2018-09-24
28
+
@@ -8,7 +8,6 @@ module Petrify
8
8
  @@working_dir = File.join(Dir.pwd, @@output_dir)
9
9
  @@views_dir = 'views'
10
10
  @@layout_fn = File.join(@@views_dir, 'layout.haml')
11
- @@sitemap = []
12
11
 
13
12
  # https://stackoverflow.com/questions/917566/ruby-share-logger-instance-among-module-classes#6768164
14
13
  @@log = Logger.new($stdout)
@@ -25,8 +24,9 @@ module Petrify
25
24
  end
26
25
 
27
26
  File.write(fn, html)
28
- add_to_sitemap(fn)
29
27
  @@log.info fn
28
+ # TODO - add page to sitemap.xml or sitemap.txt
29
+ # https://support.google.com/webmasters/answer/183668?hl=en&ref_topic=4581190
30
30
  end
31
31
 
32
32
  # Write a CSV file from an array of hashes (or an empty array)
@@ -45,7 +45,6 @@ module Petrify
45
45
  end
46
46
 
47
47
  File.write(fn, csv_string)
48
- add_to_sitemap(fn)
49
48
  @@log.info fn
50
49
  end
51
50
 
@@ -55,26 +54,6 @@ module Petrify
55
54
  fn = File.join(dir, filename)
56
55
  File.write(fn, data)
57
56
  @@log.info fn
58
- add_to_sitemap(fn) unless filename == 'sitemap.txt'
59
- end
60
-
61
- # Output a sitemap text file to the site root
62
- def self.sitemap(baseurl)
63
- # Add trailing slash to baseurl unless there's already one there
64
- baseurl += '/' unless baseurl.match(/\/$/)
65
-
66
- data = []
67
- @@sitemap.each do |fn|
68
- data << baseurl + fn
69
- end
70
-
71
- file('.', 'sitemap.txt', data.join("\n"))
72
- end
73
-
74
- def self.add_to_sitemap(fn)
75
- path_bits = fn.split('/')[1..-1]
76
- path_bits.pop if path_bits[-1] == 'index.html'
77
- @@sitemap << File.join(path_bits)
78
57
  end
79
58
 
80
59
  def self.setup
@@ -1,3 +1,3 @@
1
1
  module Petrify
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.licenses = ['MIT']
12
12
  spec.summary = %q{A data(base)-driven static site generator with Haml templates.}
13
13
  #spec.description = %q{TODO: Write a longer description or delete this line.}
14
- spec.homepage = "https://git.adrianshort.org/adrian/petrify"
14
+ spec.homepage = "https://github.com/adrianshort/petrify"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
17
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petrify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Short
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - CHANGELOG.md
63
64
  - Gemfile
64
65
  - LICENSE
65
66
  - README.md
@@ -69,7 +70,7 @@ files:
69
70
  - lib/petrify.rb
70
71
  - lib/petrify/version.rb
71
72
  - petrify.gemspec
72
- homepage: https://git.adrianshort.org/adrian/petrify
73
+ homepage: https://github.com/adrianshort/petrify
73
74
  licenses:
74
75
  - MIT
75
76
  metadata: {}
@@ -88,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
91
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.5.2.3
92
+ rubygems_version: 3.1.2
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: A data(base)-driven static site generator with Haml templates.