jekyll-feed 0.9.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +5 -5
  2. data/History.markdown +115 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +118 -4
  5. data/lib/jekyll-feed.rb +2 -0
  6. data/lib/jekyll-feed/feed.xml +45 -15
  7. data/lib/jekyll-feed/generator.rb +109 -24
  8. data/lib/jekyll-feed/meta-tag.rb +9 -8
  9. data/lib/jekyll-feed/page-without-a-file.rb +2 -0
  10. data/lib/jekyll-feed/version.rb +7 -0
  11. metadata +49 -78
  12. data/.gitignore +0 -20
  13. data/.rspec +0 -2
  14. data/.rubocop.yml +0 -29
  15. data/.travis.yml +0 -20
  16. data/Gemfile +0 -6
  17. data/Rakefile +0 -6
  18. data/jekyll-feed.gemspec +0 -25
  19. data/script/bootstrap +0 -3
  20. data/script/cibuild +0 -7
  21. data/script/release +0 -7
  22. data/spec/fixtures/_config.yml +0 -9
  23. data/spec/fixtures/_data/authors.yml +0 -5
  24. data/spec/fixtures/_drafts/2015-01-12-a-draft.md +0 -4
  25. data/spec/fixtures/_layouts/some_default.html +0 -11
  26. data/spec/fixtures/_posts/2013-12-12-dec-the-second.md +0 -6
  27. data/spec/fixtures/_posts/2014-03-02-march-the-second.md +0 -5
  28. data/spec/fixtures/_posts/2014-03-04-march-the-fourth.md +0 -8
  29. data/spec/fixtures/_posts/2015-01-18-jekyll-last-modified-at.md +0 -5
  30. data/spec/fixtures/_posts/2015-02-12-strip-newlines.md +0 -6
  31. data/spec/fixtures/_posts/2015-05-12-liquid.md +0 -7
  32. data/spec/fixtures/_posts/2015-05-12-pre.html +0 -7
  33. data/spec/fixtures/_posts/2015-05-18-author-detail.md +0 -9
  34. data/spec/fixtures/_posts/2015-08-08-stuck-in-the-middle.html +0 -2
  35. data/spec/fixtures/_posts/2016-04-25-author-reference.md +0 -6
  36. data/spec/fixtures/feed.xslt.xml +0 -0
  37. data/spec/jekyll-feed_spec.rb +0 -278
  38. data/spec/spec_helper.rb +0 -28
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module JekyllFeed
2
4
  class MetaTag < Liquid::Tag
3
5
  # Use Jekyll's native relative_url filter
@@ -5,14 +7,17 @@ module JekyllFeed
5
7
 
6
8
  def render(context)
7
9
  @context = context
8
- attrs = attributes.map { |k, v| %(#{k}="#{v}") }.join(" ")
9
- "<link #{attrs} />"
10
+ attrs = attributes.map do |k, v|
11
+ v = v.to_s unless v.respond_to?(:encode)
12
+ %(#{k}=#{v.encode(:xml => :attr)})
13
+ end
14
+ "<link #{attrs.join(" ")} />"
10
15
  end
11
16
 
12
17
  private
13
18
 
14
19
  def config
15
- @context.registers[:site].config
20
+ @config ||= @context.registers[:site].config
16
21
  end
17
22
 
18
23
  def attributes
@@ -25,11 +30,7 @@ module JekyllFeed
25
30
  end
26
31
 
27
32
  def path
28
- if config["feed"] && config["feed"]["path"]
29
- config["feed"]["path"]
30
- else
31
- "feed.xml"
32
- end
33
+ config.dig("feed", "path") || "feed.xml"
33
34
  end
34
35
 
35
36
  def title
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module JekyllFeed
2
4
  class PageWithoutAFile < Jekyll::Page
3
5
  def read_yaml(*)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Feed
5
+ VERSION = "0.15.1"
6
+ end
7
+ end
metadata CHANGED
@@ -1,160 +1,149 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-feed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '3.3'
22
+ version: '5.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '3.3'
32
+ version: '5.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: '1.6'
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: '1.6'
46
+ version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
- name: rake
48
+ name: nokogiri
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '10.0'
53
+ version: '1.6'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '10.0'
60
+ version: '1.6'
55
61
  - !ruby/object:Gem::Dependency
56
- name: rspec
62
+ name: rake
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '3.0'
67
+ version: '12.0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '3.0'
74
+ version: '12.0'
69
75
  - !ruby/object:Gem::Dependency
70
- name: typhoeus
76
+ name: rspec
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '0.7'
81
+ version: '3.0'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: '0.7'
88
+ version: '3.0'
83
89
  - !ruby/object:Gem::Dependency
84
- name: nokogiri
90
+ name: rubocop-jekyll
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
93
  - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '1.6'
95
+ version: '0.5'
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
100
  - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '1.6'
102
+ version: '0.5'
97
103
  - !ruby/object:Gem::Dependency
98
- name: rubocop
104
+ name: typhoeus
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
107
  - - ">="
102
108
  - !ruby/object:Gem::Version
103
- version: '0'
109
+ version: '0.7'
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.0'
104
113
  type: :development
105
114
  prerelease: false
106
115
  version_requirements: !ruby/object:Gem::Requirement
107
116
  requirements:
108
117
  - - ">="
109
118
  - !ruby/object:Gem::Version
110
- version: '0'
111
- description:
119
+ version: '0.7'
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.0'
123
+ description:
112
124
  email:
113
125
  - ben.balter@github.com
114
126
  executables: []
115
127
  extensions: []
116
- extra_rdoc_files: []
128
+ extra_rdoc_files:
129
+ - README.md
130
+ - History.markdown
131
+ - LICENSE.txt
117
132
  files:
118
- - ".gitignore"
119
- - ".rspec"
120
- - ".rubocop.yml"
121
- - ".travis.yml"
122
- - Gemfile
123
133
  - History.markdown
124
134
  - LICENSE.txt
125
135
  - README.md
126
- - Rakefile
127
- - jekyll-feed.gemspec
128
136
  - lib/jekyll-feed.rb
129
137
  - lib/jekyll-feed/feed.xml
130
138
  - lib/jekyll-feed/generator.rb
131
139
  - lib/jekyll-feed/meta-tag.rb
132
140
  - lib/jekyll-feed/page-without-a-file.rb
133
- - script/bootstrap
134
- - script/cibuild
135
- - script/release
136
- - spec/fixtures/_config.yml
137
- - spec/fixtures/_data/authors.yml
138
- - spec/fixtures/_drafts/2015-01-12-a-draft.md
139
- - spec/fixtures/_layouts/some_default.html
140
- - spec/fixtures/_posts/2013-12-12-dec-the-second.md
141
- - spec/fixtures/_posts/2014-03-02-march-the-second.md
142
- - spec/fixtures/_posts/2014-03-04-march-the-fourth.md
143
- - spec/fixtures/_posts/2015-01-18-jekyll-last-modified-at.md
144
- - spec/fixtures/_posts/2015-02-12-strip-newlines.md
145
- - spec/fixtures/_posts/2015-05-12-liquid.md
146
- - spec/fixtures/_posts/2015-05-12-pre.html
147
- - spec/fixtures/_posts/2015-05-18-author-detail.md
148
- - spec/fixtures/_posts/2015-08-08-stuck-in-the-middle.html
149
- - spec/fixtures/_posts/2016-04-25-author-reference.md
150
- - spec/fixtures/feed.xslt.xml
151
- - spec/jekyll-feed_spec.rb
152
- - spec/spec_helper.rb
141
+ - lib/jekyll-feed/version.rb
153
142
  homepage: https://github.com/jekyll/jekyll-feed
154
143
  licenses:
155
144
  - MIT
156
145
  metadata: {}
157
- post_install_message:
146
+ post_install_message:
158
147
  rdoc_options: []
159
148
  require_paths:
160
149
  - lib
@@ -162,33 +151,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
151
  requirements:
163
152
  - - ">="
164
153
  - !ruby/object:Gem::Version
165
- version: '0'
154
+ version: 2.4.0
166
155
  required_rubygems_version: !ruby/object:Gem::Requirement
167
156
  requirements:
168
157
  - - ">="
169
158
  - !ruby/object:Gem::Version
170
159
  version: '0'
171
160
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.4.5
174
- signing_key:
161
+ rubygems_version: 3.0.3
162
+ signing_key:
175
163
  specification_version: 4
176
164
  summary: A Jekyll plugin to generate an Atom feed of your Jekyll posts
177
- test_files:
178
- - spec/fixtures/_config.yml
179
- - spec/fixtures/_data/authors.yml
180
- - spec/fixtures/_drafts/2015-01-12-a-draft.md
181
- - spec/fixtures/_layouts/some_default.html
182
- - spec/fixtures/_posts/2013-12-12-dec-the-second.md
183
- - spec/fixtures/_posts/2014-03-02-march-the-second.md
184
- - spec/fixtures/_posts/2014-03-04-march-the-fourth.md
185
- - spec/fixtures/_posts/2015-01-18-jekyll-last-modified-at.md
186
- - spec/fixtures/_posts/2015-02-12-strip-newlines.md
187
- - spec/fixtures/_posts/2015-05-12-liquid.md
188
- - spec/fixtures/_posts/2015-05-12-pre.html
189
- - spec/fixtures/_posts/2015-05-18-author-detail.md
190
- - spec/fixtures/_posts/2015-08-08-stuck-in-the-middle.html
191
- - spec/fixtures/_posts/2016-04-25-author-reference.md
192
- - spec/fixtures/feed.xslt.xml
193
- - spec/jekyll-feed_spec.rb
194
- - spec/spec_helper.rb
165
+ test_files: []
data/.gitignore DELETED
@@ -1,20 +0,0 @@
1
- /vendor
2
- /.bundle/
3
- /.yardoc
4
- /Gemfile.lock
5
- /_yardoc/
6
- /coverage/
7
- /doc/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
11
- *.bundle
12
- *.so
13
- *.o
14
- *.a
15
- mkmf.log
16
- *.gem
17
- Gemfile.lock
18
- spec/dest
19
- .bundle
20
- spec/fixtures/.jekyll-metadata
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
data/.rubocop.yml DELETED
@@ -1,29 +0,0 @@
1
- inherit_gem:
2
- jekyll: .rubocop.yml
3
-
4
- AllCops:
5
- TargetRubyVersion: 2.0
6
- Include:
7
- - lib/*.rb
8
-
9
- Exclude:
10
- - .rubocop.yml
11
- - .codeclimate.yml
12
- - .travis.yml
13
- - .gitignore
14
- - .rspec
15
-
16
- - Gemfile.lock
17
- - CHANGELOG.md
18
- - readme.md
19
- - README.md
20
- - Readme.md
21
- - ReadMe.md
22
- - COPYING
23
- - LICENSE
24
-
25
- - test/**/*
26
- - vendor/**/*
27
- - features/**/*
28
- - script/**/*
29
- - spec/**/*
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2
4
- env:
5
- global:
6
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
7
- cache: bundler
8
- sudo: false
9
- before_script: bundle update
10
- script: "./script/cibuild"
11
- notifications:
12
- email: false
13
- deploy:
14
- provider: rubygems
15
- api_key:
16
- secure: qz0q6ur0kGo03jjLdoAak6WcEAwxX2r9LG3DVrhOrcfoFipkuW+uwR0et4tpK8uFrz0P9y7eTIKOb0XCXeIsIXWj6R5benpRGr2U8m9A+tE/jxviBFUaxaokte0lqWiX1fEyhRmW3zvcdLQ47Vd2EwTNaq6ZmPulmEe9gS0rBQghyclakGlZ17LI7oGgiNL9SQ335Yqa1qJklTHYHbodWQ3Z07v7VN2jxqi3WH6NacT5gUGp5iCNCLLa8+jpKr4uONNIoy6/geAWdqtvgGUE8oTjIWDoJarrknJpqfx9Rd0KLDzkyneAigHDYPW60QtrE6GGpK/+TF1pF4DzdK2EgTWqGFnZf8ehfnxmtHVl2Xq/DPr6hS8Q/f+ut4ioMzBQxPD0hfh8/EOMYKsO8mOuOlYTiZXC7iuGyvFUOl2hnBgWA99t+I0NNB06qFp3ZxIjolEc3zjzc9f1a5HUXlEut5V8nqvCwbctNiTVpT8ZEWlsQlyRUnr9cIMUTEfLgQ+v6DnvAJBMO1EILq6liB5qfutjNhzhlREt7P/ZdppGsAzWpgt0q2PafqVoPe62WR3+/8Lj2ErMr034xSSqZVNcBS0mbdvW6k3jaABo1VJ4XuHm6/yDuemWzWb7kdG9/14+IIJMW1VuaWcmnCnB6gxjkCW3Dm2ftYiN7Rfn3AUz/nU=
17
- gem: jekyll-feed
18
- on:
19
- tags: true
20
- repo: jekyll/jekyll-feed
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- if ENV["JEKYLL_VERSION"]
5
- gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
6
- end
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/jekyll-feed.gemspec DELETED
@@ -1,25 +0,0 @@
1
- # coding: utf-8
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "jekyll-feed"
5
- spec.version = "0.9.0"
6
- spec.authors = ["Ben Balter"]
7
- spec.email = ["ben.balter@github.com"]
8
- spec.summary = "A Jekyll plugin to generate an Atom feed of your Jekyll posts"
9
- spec.homepage = "https://github.com/jekyll/jekyll-feed"
10
- spec.license = "MIT"
11
-
12
- spec.files = `git ls-files -z`.split("\x0")
13
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
- spec.require_paths = ["lib"]
16
-
17
- spec.add_dependency "jekyll", "~> 3.3"
18
-
19
- spec.add_development_dependency "bundler", "~> 1.6"
20
- spec.add_development_dependency "rake", "~> 10.0"
21
- spec.add_development_dependency "rspec", "~> 3.0"
22
- spec.add_development_dependency "typhoeus", "~> 0.7"
23
- spec.add_development_dependency "nokogiri", "~> 1.6"
24
- spec.add_development_dependency "rubocop"
25
- end
data/script/bootstrap DELETED
@@ -1,3 +0,0 @@
1
- #! /bin/bash
2
-
3
- bundle install
data/script/cibuild DELETED
@@ -1,7 +0,0 @@
1
- #! /bin/bash
2
-
3
- set -e
4
-
5
- bundle exec rspec
6
- bundle exec rubocop -S -D
7
- bundle exec rake build
data/script/release DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
- # Tag and push a release.
3
-
4
- set -e
5
-
6
- script/cibuild
7
- bundle exec rake release
@@ -1,9 +0,0 @@
1
- timezone: UTC
2
-
3
- defaults:
4
- -
5
- scope:
6
- path: ""
7
- type: page
8
- values:
9
- layout: some_default