html2rss 0.2.1 → 0.2.2

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: 27868040d219facc52f726ae3b47e470dda54df364a847937f3cbe48be290ab6
4
- data.tar.gz: 5baef95e3ec284b76fed9d4aa8c76440cb0884f8e62f7770b69c497f91ffbfa3
3
+ metadata.gz: 2d23c5f38ec394aa7a095ed72fe438bbb7480e56e3f1466afccf8b15640ad3ea
4
+ data.tar.gz: 9cf409fb2b00a21964e91ee81882dc626b47a9a37a5dd7817b59048197f44e45
5
5
  SHA512:
6
- metadata.gz: 93953bb19bb2d4a8e281f8594b80f8dfdc49e7797d495f1c35b3df928036f9479e16b4f14dbe124cd15b84bbf5c862faa48683c5770550a9e5056337a9b69c59
7
- data.tar.gz: 1dc9d2fcb768c52a9df6ce08da334d44e9c698d0c4edb5d33da528b1a4bf6743a8e3ed5a18d50a379799f9dda427fa8f0d367eb90d50ec7bd312ae2f1cc51ae0
6
+ metadata.gz: 4650b3337acea8b93a0d73279e401c3790b67ff9e311e21782e1a892e58d5dd156ce7c649e961b36031d046d4c272042c5ecba6e185fc91a42718ef345aea40c
7
+ data.tar.gz: 76a3d9517ea0f5e6f6f12b1de803cbe1bc1cc5b7f5401a8bf5c3cf3de544b3580ab23bfe9be8964e5fb5b1da8b35184ce1bfea418808c447812b8d99def8897c
data/.travis.yml CHANGED
@@ -12,6 +12,7 @@ rvm:
12
12
  - 2.3.8
13
13
  - 2.4.5
14
14
  - 2.5.3
15
+ - 2.6.1
15
16
 
16
17
  script:
17
18
  - bundle exec rspec
data/Gemfile.lock CHANGED
@@ -3,7 +3,8 @@ PATH
3
3
  specs:
4
4
  html2rss (0.2.1)
5
5
  faraday (~> 0.15)
6
- nokogiri (~> 1.8)
6
+ faraday_middleware (~> 0.13)
7
+ nokogiri (>= 1.10)
7
8
  sanitize (~> 5.0)
8
9
 
9
10
  GEM
@@ -13,13 +14,15 @@ GEM
13
14
  crass (1.0.4)
14
15
  diff-lcs (1.3)
15
16
  docile (1.3.1)
16
- faraday (0.15.3)
17
+ faraday (0.15.4)
17
18
  multipart-post (>= 1.2, < 3)
19
+ faraday_middleware (0.13.0)
20
+ faraday (>= 0.7.4, < 1.0)
18
21
  json (2.1.0)
19
- mini_portile2 (2.3.0)
22
+ mini_portile2 (2.4.0)
20
23
  multipart-post (2.0.0)
21
- nokogiri (1.8.5)
22
- mini_portile2 (~> 2.3.0)
24
+ nokogiri (1.10.1)
25
+ mini_portile2 (~> 2.4.0)
23
26
  nokogumbo (2.0.1)
24
27
  nokogiri (~> 1.8, >= 1.8.4)
25
28
  rspec (3.8.0)
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 Gil Desmarais
3
+ Copyright (c) 2019 Gil Desmarais
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/html2rss.gemspec CHANGED
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ['lib']
30
30
 
31
31
  spec.add_dependency 'faraday', '~> 0.15'
32
- spec.add_dependency 'nokogiri', '~> 1.8'
32
+ spec.add_dependency 'faraday_middleware', '~> 0.13'
33
+ spec.add_dependency 'nokogiri', '>= 1.10'
33
34
  spec.add_dependency 'sanitize', '~> 5.0'
34
35
  spec.add_development_dependency 'bundler', '~> 1.16'
35
36
  spec.add_development_dependency 'byebug', '~> 10.0'
data/lib/html2rss/item.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'faraday'
2
+ require 'faraday_middleware'
2
3
  require 'open-uri'
3
4
  require 'nokogiri'
4
5
  require_relative 'item_extractor'
@@ -47,7 +48,11 @@ module Html2rss
47
48
  end
48
49
 
49
50
  def self.from_url(url, config)
50
- connection = Faraday.new(url: url, headers: config.headers)
51
+ connection = Faraday.new(url: url, headers: config.headers) { |faraday|
52
+ faraday.use FaradayMiddleware::FollowRedirects
53
+ faraday.adapter Faraday.default_adapter
54
+ }
55
+
51
56
  page = Nokogiri::HTML(connection.get.body)
52
57
  page.css(config.selector('items')).map do |xml_item|
53
58
  new xml_item, config
@@ -1,3 +1,3 @@
1
1
  module Html2rss
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gil Desmarais
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-18 00:00:00.000000000 Z
11
+ date: 2019-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -25,19 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.15'
27
27
  - !ruby/object:Gem::Dependency
28
- name: nokogiri
28
+ name: faraday_middleware
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '0.13'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: '0.13'
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '1.10'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '1.10'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: sanitize
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -177,8 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
191
  - !ruby/object:Gem::Version
178
192
  version: '0'
179
193
  requirements: []
180
- rubyforge_project:
181
- rubygems_version: 2.7.8
194
+ rubygems_version: 3.0.2
182
195
  signing_key:
183
196
  specification_version: 4
184
197
  summary: Generate RSS feeds by scraping websites by providing a config.