html2rss 0.8.2 → 0.10.0
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 +4 -4
- data/.gitignore +1 -1
- data/.mergify.yml +15 -0
- data/.rubocop.yml +13 -42
- data/Gemfile +19 -2
- data/Gemfile.lock +116 -94
- data/README.md +326 -253
- data/bin/console +1 -0
- data/exe/html2rss +6 -0
- data/html2rss.gemspec +16 -21
- data/lib/html2rss/attribute_post_processors/gsub.rb +30 -8
- data/lib/html2rss/attribute_post_processors/html_to_markdown.rb +7 -2
- data/lib/html2rss/attribute_post_processors/html_transformers/transform_urls_to_absolute_ones.rb +27 -0
- data/lib/html2rss/attribute_post_processors/html_transformers/wrap_img_in_a.rb +41 -0
- data/lib/html2rss/attribute_post_processors/markdown_to_html.rb +11 -2
- data/lib/html2rss/attribute_post_processors/parse_time.rb +11 -4
- data/lib/html2rss/attribute_post_processors/parse_uri.rb +12 -2
- data/lib/html2rss/attribute_post_processors/sanitize_html.rb +46 -51
- data/lib/html2rss/attribute_post_processors/substring.rb +14 -4
- data/lib/html2rss/attribute_post_processors/template.rb +36 -12
- data/lib/html2rss/attribute_post_processors.rb +28 -5
- data/lib/html2rss/cli.rb +29 -0
- data/lib/html2rss/config/channel.rb +117 -0
- data/lib/html2rss/config/selectors.rb +91 -0
- data/lib/html2rss/config.rb +71 -78
- data/lib/html2rss/item.rb +118 -40
- data/lib/html2rss/item_extractors/attribute.rb +20 -7
- data/lib/html2rss/item_extractors/href.rb +20 -4
- data/lib/html2rss/item_extractors/html.rb +18 -6
- data/lib/html2rss/item_extractors/static.rb +18 -7
- data/lib/html2rss/item_extractors/text.rb +17 -5
- data/lib/html2rss/item_extractors.rb +75 -9
- data/lib/html2rss/object_to_xml_converter.rb +56 -0
- data/lib/html2rss/rss_builder/channel.rb +21 -0
- data/lib/html2rss/rss_builder/item.rb +83 -0
- data/lib/html2rss/rss_builder/stylesheet.rb +37 -0
- data/lib/html2rss/rss_builder.rb +96 -0
- data/lib/html2rss/utils.rb +94 -19
- data/lib/html2rss/version.rb +6 -1
- data/lib/html2rss.rb +51 -20
- data/rakefile.rb +16 -0
- metadata +54 -150
- data/.travis.yml +0 -25
- data/CHANGELOG.md +0 -210
- data/lib/html2rss/feed_builder.rb +0 -75
- data/lib/html2rss/item_extractors/current_time.rb +0 -21
- data/support/logo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d51b095228dec5d98a1ff66ee7329171d2297bad67ca27a7930afe296b589e8
|
4
|
+
data.tar.gz: 32bf56a05ed45a1bb8c3341f228f41d1441e65243c6a5d55908e90d002f8880b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cbe761521ec3cd43bd25565f6425e6ced445814c30706d50d52c008ce6e3905a6f95b9f6d9dfa2faf90baf4bc2fbeb43741af5bc185e1488d31b55b9ffa3c75
|
7
|
+
data.tar.gz: 353e1586ddde92858ea95a2eecda6d752975585038acc29e6d09ff97363e5429d15966a005e1f9c4a41e9ad83b972973cfadd9c840160849d530166e7dd84298
|
data/.gitignore
CHANGED
data/.mergify.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
queue_rules:
|
2
|
+
- name: dependabot
|
3
|
+
conditions:
|
4
|
+
- author=dependabot[bot]
|
5
|
+
- status-success=test
|
6
|
+
- base=master
|
7
|
+
|
8
|
+
pull_request_rules:
|
9
|
+
- name: automatic merge for Dependabot pull requests
|
10
|
+
conditions:
|
11
|
+
- author=dependabot[bot]
|
12
|
+
actions:
|
13
|
+
queue:
|
14
|
+
method: squash
|
15
|
+
name: dependabot
|
data/.rubocop.yml
CHANGED
@@ -1,59 +1,30 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-performance
|
3
3
|
- rubocop-rspec
|
4
|
+
- rubocop-md
|
5
|
+
- rubocop-rake
|
4
6
|
|
5
7
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.4
|
7
8
|
DisplayCopNames: true
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
NewCops: enable
|
10
|
+
Exclude:
|
11
|
+
- vendor/**/*
|
11
12
|
|
12
13
|
Metrics/BlockLength:
|
13
14
|
Exclude:
|
14
|
-
- "
|
15
|
+
- "spec/**/*_spec.rb"
|
15
16
|
- html2rss.gemspec
|
16
17
|
|
17
|
-
|
18
|
+
RSpec/NestedGroups:
|
18
19
|
Exclude:
|
19
|
-
-
|
20
|
-
|
21
|
-
Metrics/MethodLength:
|
22
|
-
Max: 15
|
20
|
+
- spec/html2rss_spec.rb
|
23
21
|
|
24
|
-
|
25
|
-
Enabled: true
|
22
|
+
RSpec/DescribeClass:
|
26
23
|
Exclude:
|
27
|
-
-
|
28
|
-
|
29
|
-
Style/FrozenStringLiteralComment:
|
30
|
-
Enabled: false
|
31
|
-
|
32
|
-
Style/AsciiComments:
|
33
|
-
Enabled: false
|
24
|
+
- spec/exe/**/*_spec.rb
|
34
25
|
|
35
|
-
|
36
|
-
Description: 'Enforce braces style around hash parameters.'
|
37
|
-
Enabled: true
|
38
|
-
|
39
|
-
Style/HashSyntax:
|
40
|
-
Enabled: true
|
41
|
-
|
42
|
-
Style/FormatStringToken:
|
26
|
+
RSpec/NamedSubject:
|
43
27
|
Enabled: false
|
44
28
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
Performance/CaseWhenSplat:
|
49
|
-
Enabled: true
|
50
|
-
|
51
|
-
Performance/ChainArrayAllocation:
|
52
|
-
Enabled: true
|
53
|
-
|
54
|
-
Performance/OpenStruct:
|
55
|
-
Enabled: true
|
56
|
-
|
57
|
-
RSpec/NestedGroups:
|
58
|
-
Exclude:
|
59
|
-
- spec/html2rss_spec.rb
|
29
|
+
Naming/RescuedExceptionsVariableName:
|
30
|
+
PreferredName: error
|
data/Gemfile
CHANGED
@@ -1,8 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
|
-
gem 'coveralls', require: false
|
6
|
-
|
7
7
|
# Specify your gem's dependencies in html2rss.gemspec
|
8
8
|
gemspec
|
9
|
+
|
10
|
+
group :development, :test do
|
11
|
+
gem 'byebug'
|
12
|
+
gem 'rake'
|
13
|
+
gem 'rspec', '~> 3.0'
|
14
|
+
gem 'rubocop'
|
15
|
+
gem 'rubocop-md'
|
16
|
+
gem 'rubocop-performance'
|
17
|
+
gem 'rubocop-rake'
|
18
|
+
gem 'rubocop-rspec'
|
19
|
+
gem 'vcr'
|
20
|
+
gem 'yard'
|
21
|
+
end
|
22
|
+
|
23
|
+
group :test do
|
24
|
+
gem 'simplecov', require: false
|
25
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,131 +1,153 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
html2rss (0.
|
5
|
-
activesupport (~> 5.0)
|
4
|
+
html2rss (0.10.0)
|
6
5
|
addressable (~> 2.7)
|
7
|
-
|
8
|
-
faraday
|
9
|
-
faraday_middleware (~> 0.13)
|
6
|
+
faraday (> 2.0.1, < 3.0)
|
7
|
+
faraday-follow_redirects
|
10
8
|
kramdown
|
11
9
|
mime-types (> 3.0)
|
12
10
|
nokogiri (>= 1.10, < 2.0)
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
regexp_parser
|
12
|
+
reverse_markdown (~> 2.0)
|
13
|
+
rss
|
14
|
+
sanitize (~> 6.0)
|
15
|
+
thor
|
16
|
+
tzinfo
|
16
17
|
zeitwerk
|
17
18
|
|
18
19
|
GEM
|
19
20
|
remote: https://rubygems.org/
|
20
21
|
specs:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
docile (1.3.2)
|
41
|
-
faraday (0.17.0)
|
42
|
-
multipart-post (>= 1.2, < 3)
|
43
|
-
faraday_middleware (0.13.1)
|
44
|
-
faraday (>= 0.7.4, < 1.0)
|
45
|
-
i18n (1.7.0)
|
46
|
-
concurrent-ruby (~> 1.0)
|
47
|
-
jaro_winkler (1.5.4)
|
48
|
-
json (2.2.0)
|
49
|
-
kramdown (2.1.0)
|
50
|
-
mime-types (3.3)
|
22
|
+
addressable (2.8.6)
|
23
|
+
public_suffix (>= 2.0.2, < 6.0)
|
24
|
+
ast (2.4.2)
|
25
|
+
byebug (11.1.3)
|
26
|
+
concurrent-ruby (1.2.3)
|
27
|
+
crass (1.0.6)
|
28
|
+
diff-lcs (1.5.1)
|
29
|
+
docile (1.4.0)
|
30
|
+
faraday (2.9.0)
|
31
|
+
faraday-net_http (>= 2.0, < 3.2)
|
32
|
+
faraday-follow_redirects (0.3.0)
|
33
|
+
faraday (>= 1, < 3)
|
34
|
+
faraday-net_http (3.1.0)
|
35
|
+
net-http
|
36
|
+
json (2.7.2)
|
37
|
+
kramdown (2.4.0)
|
38
|
+
rexml
|
39
|
+
language_server-protocol (3.17.0.3)
|
40
|
+
mime-types (3.5.2)
|
51
41
|
mime-types-data (~> 3.2015)
|
52
|
-
mime-types-data (3.
|
53
|
-
mini_portile2 (2.
|
54
|
-
|
55
|
-
|
56
|
-
nokogiri (1.
|
57
|
-
mini_portile2 (~> 2.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
42
|
+
mime-types-data (3.2024.0305)
|
43
|
+
mini_portile2 (2.8.6)
|
44
|
+
net-http (0.4.1)
|
45
|
+
uri
|
46
|
+
nokogiri (1.16.5)
|
47
|
+
mini_portile2 (~> 2.8.2)
|
48
|
+
racc (~> 1.4)
|
49
|
+
nokogiri (1.16.5-x86_64-darwin)
|
50
|
+
racc (~> 1.4)
|
51
|
+
nokogiri (1.16.5-x86_64-linux)
|
52
|
+
racc (~> 1.4)
|
53
|
+
parallel (1.24.0)
|
54
|
+
parser (3.3.1.0)
|
55
|
+
ast (~> 2.4.1)
|
56
|
+
racc
|
57
|
+
public_suffix (5.0.5)
|
58
|
+
racc (1.7.3)
|
59
|
+
rainbow (3.1.1)
|
60
|
+
rake (13.2.1)
|
61
|
+
regexp_parser (2.9.0)
|
62
|
+
reverse_markdown (2.1.1)
|
66
63
|
nokogiri
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
rspec-
|
71
|
-
|
72
|
-
rspec-
|
73
|
-
rspec-
|
64
|
+
rexml (3.3.2)
|
65
|
+
strscan
|
66
|
+
rspec (3.13.0)
|
67
|
+
rspec-core (~> 3.13.0)
|
68
|
+
rspec-expectations (~> 3.13.0)
|
69
|
+
rspec-mocks (~> 3.13.0)
|
70
|
+
rspec-core (3.13.0)
|
71
|
+
rspec-support (~> 3.13.0)
|
72
|
+
rspec-expectations (3.13.0)
|
74
73
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-mocks (3.
|
74
|
+
rspec-support (~> 3.13.0)
|
75
|
+
rspec-mocks (3.13.0)
|
77
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
-
rspec-support (~> 3.
|
79
|
-
rspec-support (3.
|
80
|
-
|
81
|
-
|
77
|
+
rspec-support (~> 3.13.0)
|
78
|
+
rspec-support (3.13.1)
|
79
|
+
rss (0.3.0)
|
80
|
+
rexml
|
81
|
+
rubocop (1.63.4)
|
82
|
+
json (~> 2.3)
|
83
|
+
language_server-protocol (>= 3.17.0)
|
82
84
|
parallel (~> 1.10)
|
83
|
-
parser (>= 2
|
85
|
+
parser (>= 3.3.0.2)
|
84
86
|
rainbow (>= 2.2.2, < 4.0)
|
87
|
+
regexp_parser (>= 1.8, < 3.0)
|
88
|
+
rexml (>= 3.2.5, < 4.0)
|
89
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
85
90
|
ruby-progressbar (~> 1.7)
|
86
|
-
unicode-display_width (>=
|
87
|
-
rubocop-
|
88
|
-
|
89
|
-
rubocop-
|
90
|
-
rubocop (
|
91
|
-
|
92
|
-
|
91
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
92
|
+
rubocop-ast (1.31.3)
|
93
|
+
parser (>= 3.3.1.0)
|
94
|
+
rubocop-capybara (2.20.0)
|
95
|
+
rubocop (~> 1.41)
|
96
|
+
rubocop-factory_bot (2.25.1)
|
97
|
+
rubocop (~> 1.41)
|
98
|
+
rubocop-md (1.2.2)
|
99
|
+
rubocop (>= 1.0)
|
100
|
+
rubocop-performance (1.21.0)
|
101
|
+
rubocop (>= 1.48.1, < 2.0)
|
102
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
103
|
+
rubocop-rake (0.6.0)
|
104
|
+
rubocop (~> 1.0)
|
105
|
+
rubocop-rspec (2.29.1)
|
106
|
+
rubocop (~> 1.40)
|
107
|
+
rubocop-capybara (~> 2.17)
|
108
|
+
rubocop-factory_bot (~> 2.22)
|
109
|
+
rubocop-rspec_rails (~> 2.28)
|
110
|
+
rubocop-rspec_rails (2.28.3)
|
111
|
+
rubocop (~> 1.40)
|
112
|
+
ruby-progressbar (1.13.0)
|
113
|
+
sanitize (6.1.0)
|
93
114
|
crass (~> 1.0.2)
|
94
|
-
nokogiri (>= 1.
|
95
|
-
|
96
|
-
simplecov (0.16.1)
|
115
|
+
nokogiri (>= 1.12.0)
|
116
|
+
simplecov (0.22.0)
|
97
117
|
docile (~> 1.1)
|
98
|
-
|
99
|
-
|
100
|
-
simplecov-html (0.
|
101
|
-
|
102
|
-
|
103
|
-
thor (
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
yard (0.9.20)
|
112
|
-
zeitwerk (2.2.1)
|
118
|
+
simplecov-html (~> 0.11)
|
119
|
+
simplecov_json_formatter (~> 0.1)
|
120
|
+
simplecov-html (0.12.3)
|
121
|
+
simplecov_json_formatter (0.1.4)
|
122
|
+
strscan (3.1.0)
|
123
|
+
thor (1.3.1)
|
124
|
+
tzinfo (2.0.6)
|
125
|
+
concurrent-ruby (~> 1.0)
|
126
|
+
unicode-display_width (2.5.0)
|
127
|
+
uri (0.13.0)
|
128
|
+
vcr (6.2.0)
|
129
|
+
yard (0.9.36)
|
130
|
+
zeitwerk (2.6.13)
|
113
131
|
|
114
132
|
PLATFORMS
|
115
133
|
ruby
|
134
|
+
x86_64-darwin
|
135
|
+
x86_64-darwin-20
|
136
|
+
x86_64-linux
|
116
137
|
|
117
138
|
DEPENDENCIES
|
118
|
-
bundler (~> 1.16)
|
119
139
|
byebug
|
120
|
-
coveralls
|
121
140
|
html2rss!
|
141
|
+
rake
|
122
142
|
rspec (~> 3.0)
|
123
143
|
rubocop
|
144
|
+
rubocop-md
|
124
145
|
rubocop-performance
|
146
|
+
rubocop-rake
|
125
147
|
rubocop-rspec
|
126
148
|
simplecov
|
127
149
|
vcr
|
128
150
|
yard
|
129
151
|
|
130
152
|
BUNDLED WITH
|
131
|
-
|
153
|
+
2.4.1
|