weneedfeed 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +7 -1
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +79 -60
- data/lib/weneedfeed/faraday_response_middleware.rb +5 -0
- data/lib/weneedfeed/item.rb +2 -3
- data/lib/weneedfeed/version.rb +1 -1
- data/weneedfeed.gemspec +3 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f0099d83b69c32c84f244925370a77c7724874e287e9d55d105af0b5ab53df8
|
4
|
+
data.tar.gz: 39646f492c8b1accb725dab3ef96a9bb5ab77291e46182789fb75f2389cc0df9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50699fe2779917eb03e0d6845d884c26398312f7950252663dce13ac73d9f5356cbea1670ac84d39877692897711f393d1e8b55c5c3de5a9c7f8a514dd8a296c
|
7
|
+
data.tar.gz: 45cbe8c18b887791ccb7c3a83c35c841be13f95d4219bc16a31f8ae766a59880820291a091c3d0f58e97aba71e3ea766f4993948c063f6c18b812bf88560cfa9
|
data/.github/workflows/test.yml
CHANGED
@@ -8,13 +8,19 @@ on:
|
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
rspec:
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby:
|
15
|
+
- 2.7.2
|
16
|
+
- 3.0.2
|
11
17
|
runs-on: ubuntu-20.04
|
12
18
|
steps:
|
13
19
|
- uses: actions/checkout@v2
|
14
20
|
- uses: ruby/setup-ruby@v1
|
15
21
|
with:
|
16
22
|
bundler-cache: true
|
17
|
-
ruby-version:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
18
24
|
- run: bundle exec rspec --force-color
|
19
25
|
rubocop:
|
20
26
|
runs-on: ubuntu-20.04
|
data/CHANGELOG.md
CHANGED
@@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## Unreleased
|
9
9
|
|
10
|
-
## 0.
|
10
|
+
## 0.10.0 - 2022-04-13
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Replace mimemagic with marcel.
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
|
18
|
+
- Fix error on activesupport 7.
|
19
|
+
|
20
|
+
## 0.9.2 - 2020-12-03
|
11
21
|
|
12
22
|
### Fixed
|
13
23
|
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
weneedfeed (0.
|
4
|
+
weneedfeed (0.10.0)
|
5
5
|
activesupport
|
6
6
|
builder
|
7
7
|
faraday
|
8
8
|
faraday_middleware
|
9
9
|
hibana (>= 0.2)
|
10
|
-
|
10
|
+
marcel
|
11
11
|
nokogiri
|
12
12
|
rack-capture (>= 0.4.0)
|
13
13
|
thor
|
@@ -15,25 +15,45 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activesupport (
|
18
|
+
activesupport (7.0.2.3)
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
-
i18n (>=
|
21
|
-
minitest (
|
22
|
-
tzinfo (~>
|
23
|
-
|
24
|
-
addressable (2.7.0)
|
20
|
+
i18n (>= 1.6, < 2)
|
21
|
+
minitest (>= 5.1)
|
22
|
+
tzinfo (~> 2.0)
|
23
|
+
addressable (2.8.0)
|
25
24
|
public_suffix (>= 2.0.2, < 5.0)
|
26
|
-
ast (2.4.
|
25
|
+
ast (2.4.2)
|
27
26
|
builder (3.2.4)
|
28
|
-
concurrent-ruby (1.1.
|
29
|
-
crack (0.4.
|
30
|
-
|
31
|
-
|
27
|
+
concurrent-ruby (1.1.10)
|
28
|
+
crack (0.4.5)
|
29
|
+
rexml
|
30
|
+
diff-lcs (1.5.0)
|
31
|
+
faraday (1.10.0)
|
32
|
+
faraday-em_http (~> 1.0)
|
33
|
+
faraday-em_synchrony (~> 1.0)
|
34
|
+
faraday-excon (~> 1.1)
|
35
|
+
faraday-httpclient (~> 1.0)
|
36
|
+
faraday-multipart (~> 1.0)
|
37
|
+
faraday-net_http (~> 1.0)
|
38
|
+
faraday-net_http_persistent (~> 1.0)
|
39
|
+
faraday-patron (~> 1.0)
|
40
|
+
faraday-rack (~> 1.0)
|
41
|
+
faraday-retry (~> 1.0)
|
42
|
+
ruby2_keywords (>= 0.0.4)
|
43
|
+
faraday-em_http (1.0.0)
|
44
|
+
faraday-em_synchrony (1.0.0)
|
45
|
+
faraday-excon (1.1.0)
|
46
|
+
faraday-httpclient (1.0.1)
|
47
|
+
faraday-multipart (1.0.3)
|
32
48
|
multipart-post (>= 1.2, < 3)
|
33
|
-
|
34
|
-
|
49
|
+
faraday-net_http (1.0.1)
|
50
|
+
faraday-net_http_persistent (1.2.0)
|
51
|
+
faraday-patron (1.0.0)
|
52
|
+
faraday-rack (1.0.0)
|
53
|
+
faraday-retry (1.0.3)
|
54
|
+
faraday_middleware (1.2.0)
|
35
55
|
faraday (~> 1.0)
|
36
|
-
hanami-router (2.0.0.
|
56
|
+
hanami-router (2.0.0.alpha5)
|
37
57
|
mustermann (~> 1.0)
|
38
58
|
mustermann-contrib (~> 1.0)
|
39
59
|
rack (~> 2.0)
|
@@ -43,72 +63,71 @@ GEM
|
|
43
63
|
hanami-router (>= 2.0.0.alpha3)
|
44
64
|
rack
|
45
65
|
tilt
|
46
|
-
i18n (1.
|
66
|
+
i18n (1.10.0)
|
47
67
|
concurrent-ruby (~> 1.0)
|
48
|
-
|
49
|
-
mini_portile2 (2.
|
50
|
-
minitest (5.
|
68
|
+
marcel (1.0.2)
|
69
|
+
mini_portile2 (2.8.0)
|
70
|
+
minitest (5.15.0)
|
51
71
|
multipart-post (2.1.1)
|
52
72
|
mustermann (1.1.1)
|
53
73
|
ruby2_keywords (~> 0.0.1)
|
54
74
|
mustermann-contrib (1.1.1)
|
55
75
|
hansi (~> 0.2.0)
|
56
76
|
mustermann (= 1.1.1)
|
57
|
-
nokogiri (1.
|
58
|
-
mini_portile2 (~> 2.
|
59
|
-
|
60
|
-
|
77
|
+
nokogiri (1.13.4)
|
78
|
+
mini_portile2 (~> 2.8.0)
|
79
|
+
racc (~> 1.4)
|
80
|
+
parallel (1.22.1)
|
81
|
+
parser (3.1.2.0)
|
61
82
|
ast (~> 2.4.1)
|
62
|
-
public_suffix (4.0.
|
83
|
+
public_suffix (4.0.7)
|
84
|
+
racc (1.6.0)
|
63
85
|
rack (2.2.3)
|
64
86
|
rack-capture (0.4.0)
|
65
87
|
rack
|
66
88
|
rack-test (1.1.0)
|
67
89
|
rack (>= 1.0, < 3)
|
68
|
-
rainbow (3.
|
90
|
+
rainbow (3.1.1)
|
69
91
|
rake (12.3.3)
|
70
|
-
regexp_parser (
|
71
|
-
rexml (3.2.
|
72
|
-
rspec (3.
|
73
|
-
rspec-core (~> 3.
|
74
|
-
rspec-expectations (~> 3.
|
75
|
-
rspec-mocks (~> 3.
|
76
|
-
rspec-core (3.
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-expectations (3.
|
92
|
+
regexp_parser (2.3.0)
|
93
|
+
rexml (3.2.5)
|
94
|
+
rspec (3.11.0)
|
95
|
+
rspec-core (~> 3.11.0)
|
96
|
+
rspec-expectations (~> 3.11.0)
|
97
|
+
rspec-mocks (~> 3.11.0)
|
98
|
+
rspec-core (3.11.0)
|
99
|
+
rspec-support (~> 3.11.0)
|
100
|
+
rspec-expectations (3.11.0)
|
79
101
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-mocks (3.
|
102
|
+
rspec-support (~> 3.11.0)
|
103
|
+
rspec-mocks (3.11.1)
|
82
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-support (3.
|
85
|
-
rubocop (1.
|
105
|
+
rspec-support (~> 3.11.0)
|
106
|
+
rspec-support (3.11.0)
|
107
|
+
rubocop (1.27.0)
|
86
108
|
parallel (~> 1.10)
|
87
|
-
parser (>=
|
109
|
+
parser (>= 3.1.0.0)
|
88
110
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
-
regexp_parser (>= 1.8)
|
111
|
+
regexp_parser (>= 1.8, < 3.0)
|
90
112
|
rexml
|
91
|
-
rubocop-ast (>= 1.
|
113
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
92
114
|
ruby-progressbar (~> 1.7)
|
93
|
-
unicode-display_width (>= 1.4.0, <
|
94
|
-
rubocop-ast (1.
|
95
|
-
parser (>=
|
96
|
-
rubocop-rspec (2.
|
97
|
-
rubocop (~> 1.
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
thor (1.0.1)
|
102
|
-
thread_safe (0.3.6)
|
115
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
116
|
+
rubocop-ast (1.17.0)
|
117
|
+
parser (>= 3.1.1.0)
|
118
|
+
rubocop-rspec (2.9.0)
|
119
|
+
rubocop (~> 1.19)
|
120
|
+
ruby-progressbar (1.11.0)
|
121
|
+
ruby2_keywords (0.0.5)
|
122
|
+
thor (1.2.1)
|
103
123
|
tilt (2.0.10)
|
104
|
-
tzinfo (
|
105
|
-
|
106
|
-
unicode-display_width (1.
|
107
|
-
webmock (3.
|
108
|
-
addressable (>= 2.
|
124
|
+
tzinfo (2.0.4)
|
125
|
+
concurrent-ruby (~> 1.0)
|
126
|
+
unicode-display_width (2.1.0)
|
127
|
+
webmock (3.14.0)
|
128
|
+
addressable (>= 2.8.0)
|
109
129
|
crack (>= 0.3.2)
|
110
130
|
hashdiff (>= 0.4.0, < 2.0.0)
|
111
|
-
zeitwerk (2.4.2)
|
112
131
|
|
113
132
|
PLATFORMS
|
114
133
|
ruby
|
@@ -123,4 +142,4 @@ DEPENDENCIES
|
|
123
142
|
weneedfeed!
|
124
143
|
|
125
144
|
BUNDLED WITH
|
126
|
-
2.
|
145
|
+
2.2.29
|
@@ -1,5 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# For faraday_middleware/response_middleware.
|
4
|
+
# https://github.com/r7kamura/weneedfeed/issues/19
|
5
|
+
require 'active_support'
|
6
|
+
require 'active_support/isolated_execution_state' if ActiveSupport.gem_version >= Gem::Version.new('7')
|
7
|
+
|
3
8
|
require 'active_support/core_ext/array/conversions'
|
4
9
|
require 'active_support/core_ext/hash/conversions'
|
5
10
|
require 'faraday'
|
data/lib/weneedfeed/item.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'marcel'
|
4
4
|
require 'uri'
|
5
5
|
|
6
6
|
module Weneedfeed
|
@@ -54,8 +54,7 @@ module Weneedfeed
|
|
54
54
|
def image_mime_type
|
55
55
|
return unless image_url
|
56
56
|
|
57
|
-
|
58
|
-
::MimeMagic.by_path(uri.path)&.type
|
57
|
+
::Marcel::Magic.by_path(image_url)&.type
|
59
58
|
end
|
60
59
|
|
61
60
|
# @return [String, nil]
|
data/lib/weneedfeed/version.rb
CHANGED
data/weneedfeed.gemspec
CHANGED
@@ -16,6 +16,8 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
18
18
|
|
19
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
20
|
+
|
19
21
|
# Specify which files should be added to the gem when it is released.
|
20
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
23
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
@@ -30,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
30
32
|
spec.add_runtime_dependency 'faraday'
|
31
33
|
spec.add_runtime_dependency 'faraday_middleware'
|
32
34
|
spec.add_runtime_dependency 'hibana', '>= 0.2'
|
33
|
-
spec.add_runtime_dependency '
|
35
|
+
spec.add_runtime_dependency 'marcel'
|
34
36
|
spec.add_runtime_dependency 'nokogiri'
|
35
37
|
spec.add_runtime_dependency 'rack-capture', '>= 0.4.0'
|
36
38
|
spec.add_runtime_dependency 'thor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weneedfeed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: marcel
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -186,6 +186,7 @@ licenses:
|
|
186
186
|
metadata:
|
187
187
|
homepage_uri: https://github.com/r7kamura/weneedfeed
|
188
188
|
source_code_uri: https://github.com/r7kamura/weneedfeed
|
189
|
+
rubygems_mfa_required: 'true'
|
189
190
|
post_install_message:
|
190
191
|
rdoc_options: []
|
191
192
|
require_paths:
|
@@ -201,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
202
|
- !ruby/object:Gem::Version
|
202
203
|
version: '0'
|
203
204
|
requirements: []
|
204
|
-
rubygems_version: 3.1.
|
205
|
+
rubygems_version: 3.1.4
|
205
206
|
signing_key:
|
206
207
|
specification_version: 4
|
207
208
|
summary: Generate feeds from URL and selectors.
|