jekyll-webring 0.2.0 → 0.3.0

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: caa2aa67b2b2fd4c8e891c6bf813cd4460e506666fb9ee3c38befa5c26673ce5
4
- data.tar.gz: c15c1b48f4e5a599e24b5bc682b77d1a6ff704959233ff8737d0f850af32933f
3
+ metadata.gz: 83cdc26571bad9e231fcd4783fc6907cf848e325ce25edea4398824de80c4f72
4
+ data.tar.gz: 59e7c9e407c4cad49e41713c051627e4f4810995585cd0ab0157cf8ad50b82db
5
5
  SHA512:
6
- metadata.gz: 4692f1940e06f93f886ad784d81e514cc5ec948c0ab02f0db826316513f5bd06cedc510235ca1090c0c31813aa5284028a675da67e16cfa76d18acecd77a2703
7
- data.tar.gz: fc1dc1cf6c67b7d5b9af5513b8e7eaabf3f6ae0d60fb50b0eff305119dfa3b98c7833f6bde9d9a9f904226d3fbaf3c7885759a76c8b2f44a03a73940d4ba9516
6
+ metadata.gz: 10ec5897a79de4f0c8c04dbeeea8001cfee9feac521d13f8ae166c597a8638e09e63c1bd508166aa28b866f4493855cd14383c1b1d7f78492ae99e2c7c4652ec
7
+ data.tar.gz: 046d2e6b09c04e3684f54a3332e398e0f96d746d44e8687b1601abbd48b94824582d483421c90ed77a2cca7cdecc5e2510c9e934c0e036e40704f54fcce1ac32
data/Gemfile.lock CHANGED
@@ -1,74 +1,92 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-webring (0.0.1)
4
+ jekyll-webring (0.2.0)
5
+ feedjira
6
+ httparty
5
7
  jekyll
6
8
  sanitize
7
9
 
8
10
  GEM
9
11
  remote: https://rubygems.org/
10
12
  specs:
11
- addressable (2.6.0)
12
- public_suffix (>= 2.0.2, < 4.0)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
13
15
  colorator (1.1.0)
14
16
  concurrent-ruby (1.1.5)
15
- crass (1.0.4)
17
+ crass (1.0.5)
16
18
  em-websocket (0.5.1)
17
19
  eventmachine (>= 0.12.9)
18
20
  http_parser.rb (~> 0.6.0)
19
21
  eventmachine (1.2.7)
22
+ feedjira (3.0.0)
23
+ loofah (>= 2.2.1)
24
+ sax-machine (>= 1.0)
20
25
  ffi (1.11.1)
21
26
  forwardable-extended (2.6.0)
22
27
  http_parser.rb (0.6.0)
23
- i18n (0.9.5)
28
+ httparty (0.17.1)
29
+ mime-types (~> 3.0)
30
+ multi_xml (>= 0.5.2)
31
+ i18n (1.7.0)
24
32
  concurrent-ruby (~> 1.0)
25
- jekyll (3.8.6)
33
+ jekyll (4.0.0)
26
34
  addressable (~> 2.4)
27
35
  colorator (~> 1.0)
28
36
  em-websocket (~> 0.5)
29
- i18n (~> 0.7)
30
- jekyll-sass-converter (~> 1.0)
37
+ i18n (>= 0.9.5, < 2)
38
+ jekyll-sass-converter (~> 2.0)
31
39
  jekyll-watch (~> 2.0)
32
- kramdown (~> 1.14)
40
+ kramdown (~> 2.1)
41
+ kramdown-parser-gfm (~> 1.0)
33
42
  liquid (~> 4.0)
34
43
  mercenary (~> 0.3.3)
35
44
  pathutil (~> 0.9)
36
- rouge (>= 1.7, < 4)
45
+ rouge (~> 3.0)
37
46
  safe_yaml (~> 1.0)
38
- jekyll-sass-converter (1.5.2)
39
- sass (~> 3.4)
47
+ terminal-table (~> 1.8)
48
+ jekyll-sass-converter (2.0.1)
49
+ sassc (> 2.0.1, < 3.0)
40
50
  jekyll-watch (2.2.1)
41
51
  listen (~> 3.0)
42
- kramdown (1.17.0)
52
+ kramdown (2.1.0)
53
+ kramdown-parser-gfm (1.1.0)
54
+ kramdown (~> 2.0)
43
55
  liquid (4.0.3)
44
- listen (3.1.5)
45
- rb-fsevent (~> 0.9, >= 0.9.4)
46
- rb-inotify (~> 0.9, >= 0.9.7)
47
- ruby_dep (~> 1.2)
56
+ listen (3.2.0)
57
+ rb-fsevent (~> 0.10, >= 0.10.3)
58
+ rb-inotify (~> 0.9, >= 0.9.10)
59
+ loofah (2.3.1)
60
+ crass (~> 1.0.2)
61
+ nokogiri (>= 1.5.9)
48
62
  mercenary (0.3.6)
63
+ mime-types (3.3)
64
+ mime-types-data (~> 3.2015)
65
+ mime-types-data (3.2019.1009)
49
66
  mini_portile2 (2.4.0)
50
- nokogiri (1.10.3)
67
+ multi_xml (0.6.0)
68
+ nokogiri (1.10.5)
51
69
  mini_portile2 (~> 2.4.0)
52
70
  nokogumbo (2.0.1)
53
71
  nokogiri (~> 1.8, >= 1.8.4)
54
72
  pathutil (0.16.2)
55
73
  forwardable-extended (~> 2.6)
56
- public_suffix (3.1.1)
74
+ public_suffix (4.0.1)
57
75
  rb-fsevent (0.10.3)
58
76
  rb-inotify (0.10.0)
59
77
  ffi (~> 1.0)
60
- rouge (3.6.0)
61
- ruby_dep (1.5.0)
78
+ rouge (3.12.0)
62
79
  safe_yaml (1.0.5)
63
- sanitize (5.0.0)
80
+ sanitize (5.1.0)
64
81
  crass (~> 1.0.2)
65
82
  nokogiri (>= 1.8.0)
66
83
  nokogumbo (~> 2.0)
67
- sass (3.7.4)
68
- sass-listen (~> 4.0.0)
69
- sass-listen (4.0.0)
70
- rb-fsevent (~> 0.9, >= 0.9.4)
71
- rb-inotify (~> 0.9, >= 0.9.7)
84
+ sassc (2.2.1)
85
+ ffi (~> 1.9)
86
+ sax-machine (1.3.2)
87
+ terminal-table (1.8.0)
88
+ unicode-display_width (~> 1.1, >= 1.1.1)
89
+ unicode-display_width (1.6.0)
72
90
 
73
91
  PLATFORMS
74
92
  ruby
@@ -20,6 +20,8 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency "jekyll"
22
22
  spec.add_runtime_dependency "sanitize"
23
+ spec.add_runtime_dependency "feedjira"
24
+ spec.add_runtime_dependency "httparty"
23
25
 
24
26
  spec.add_development_dependency "bundler"
25
27
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rss'
4
- require 'open-uri'
3
+ require 'feedjira'
4
+ require 'httparty'
5
5
  require 'sanitize'
6
6
  require 'yaml'
7
7
  require 'fileutils'
@@ -41,26 +41,26 @@ module Jekyll
41
41
  urls = CONFIG['feeds']
42
42
 
43
43
  urls.each do |url|
44
- open url do |rss|
45
- feed = []
46
- raw_feed = RSS::Parser.parse rss
47
- raw_feed.items.each do |item|
48
- sanitized = Sanitize.clean (item.content_encoded || item.description)
49
- summary = "#{ sanitized[0 ... @max_summary_length] }"
50
-
51
- feed_item = {
52
- 'source_title' => raw_feed.channel.title,
53
- 'source_url' => raw_feed.channel.link,
54
- 'title' => item.title,
55
- 'url' => item.link,
56
- '_date' => item.date,
57
- 'summary' => summary,
58
- }
59
-
60
- feed << feed_item
61
- end
62
- @feeds << feed
44
+ feed = []
45
+ xml = HTTParty.get(url).body
46
+ raw_feed = Feedjira.parse(xml)
47
+ raw_feed.entries.each do |item|
48
+ sanitized = Sanitize.fragment(item.summary)
49
+ summary = sanitized.length > @max_summary_length ?
50
+ "#{ sanitized[0 ... @max_summary_length] }..." : sanitized
51
+
52
+ feed_item = {
53
+ 'source_title' => raw_feed.title,
54
+ 'source_url' => raw_feed.url,
55
+ 'title' => item.title,
56
+ 'url' => item.url,
57
+ '_date' => item.published,
58
+ 'summary' => summary,
59
+ }
60
+
61
+ feed << feed_item
63
62
  end
63
+ @feeds << feed
64
64
  end
65
65
  end
66
66
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Webring
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-webring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophie Askew
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: feedjira
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: httparty
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: bundler
43
71
  requirement: !ruby/object:Gem::Requirement