link_thumbnailer 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +334 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/README.md +210 -0
- data/Rakefile +9 -0
- data/lib/generators/link_thumbnailer/install_generator.rb +17 -0
- data/lib/generators/templates/initializer.rb +89 -0
- data/lib/link_thumbnailer.rb +38 -0
- data/lib/link_thumbnailer/configuration.rb +72 -0
- data/lib/link_thumbnailer/exceptions.rb +11 -0
- data/lib/link_thumbnailer/grader.rb +43 -0
- data/lib/link_thumbnailer/graders/base.rb +39 -0
- data/lib/link_thumbnailer/graders/html_attribute.rb +48 -0
- data/lib/link_thumbnailer/graders/length.rb +37 -0
- data/lib/link_thumbnailer/graders/link_density.rb +20 -0
- data/lib/link_thumbnailer/graders/position.rb +13 -0
- data/lib/link_thumbnailer/image_comparator.rb +26 -0
- data/lib/link_thumbnailer/image_comparators/base.rb +19 -0
- data/lib/link_thumbnailer/image_comparators/size.rb +13 -0
- data/lib/link_thumbnailer/image_parser.rb +62 -0
- data/lib/link_thumbnailer/image_validator.rb +32 -0
- data/lib/link_thumbnailer/model.rb +20 -0
- data/lib/link_thumbnailer/models/description.rb +37 -0
- data/lib/link_thumbnailer/models/favicon.rb +27 -0
- data/lib/link_thumbnailer/models/image.rb +56 -0
- data/lib/link_thumbnailer/models/title.rb +22 -0
- data/lib/link_thumbnailer/models/video.rb +44 -0
- data/lib/link_thumbnailer/models/website.rb +54 -0
- data/lib/link_thumbnailer/page.rb +43 -0
- data/lib/link_thumbnailer/parser.rb +15 -0
- data/lib/link_thumbnailer/processor.rb +128 -0
- data/lib/link_thumbnailer/railtie.rb +6 -0
- data/lib/link_thumbnailer/response.rb +39 -0
- data/lib/link_thumbnailer/scraper.rb +62 -0
- data/lib/link_thumbnailer/scrapers/base.rb +69 -0
- data/lib/link_thumbnailer/scrapers/default/base.rb +12 -0
- data/lib/link_thumbnailer/scrapers/default/description.rb +49 -0
- data/lib/link_thumbnailer/scrapers/default/favicon.rb +38 -0
- data/lib/link_thumbnailer/scrapers/default/images.rb +78 -0
- data/lib/link_thumbnailer/scrapers/default/title.rb +27 -0
- data/lib/link_thumbnailer/scrapers/default/videos.rb +18 -0
- data/lib/link_thumbnailer/scrapers/opengraph/base.rb +45 -0
- data/lib/link_thumbnailer/scrapers/opengraph/description.rb +12 -0
- data/lib/link_thumbnailer/scrapers/opengraph/favicon.rb +17 -0
- data/lib/link_thumbnailer/scrapers/opengraph/image.rb +107 -0
- data/lib/link_thumbnailer/scrapers/opengraph/images.rb +18 -0
- data/lib/link_thumbnailer/scrapers/opengraph/title.rb +12 -0
- data/lib/link_thumbnailer/scrapers/opengraph/video.rb +115 -0
- data/lib/link_thumbnailer/scrapers/opengraph/videos.rb +18 -0
- data/lib/link_thumbnailer/uri.rb +20 -0
- data/lib/link_thumbnailer/version.rb +5 -0
- data/lib/link_thumbnailer/video_parser.rb +47 -0
- data/link_thumbnailer.gemspec +29 -0
- data/spec/configuration_spec.rb +61 -0
- data/spec/fixture_spec.rb +114 -0
- data/spec/fixtures/bar.png +2907 -0
- data/spec/fixtures/default_from_body.html +13 -0
- data/spec/fixtures/default_from_meta.html +12 -0
- data/spec/fixtures/foo.png +0 -0
- data/spec/fixtures/google_shift_jis.html +6 -0
- data/spec/fixtures/google_utf8.html +6 -0
- data/spec/fixtures/og_not_valid_example.html +12 -0
- data/spec/fixtures/og_valid_example.html +18 -0
- data/spec/fixtures/og_valid_multi_image_example.html +13 -0
- data/spec/fixtures/og_valid_multi_video_example.html +13 -0
- data/spec/grader_spec.rb +27 -0
- data/spec/graders/base_spec.rb +14 -0
- data/spec/graders/html_attribute_spec.rb +50 -0
- data/spec/graders/length_spec.rb +93 -0
- data/spec/graders/link_density_spec.rb +52 -0
- data/spec/graders/position_spec.rb +49 -0
- data/spec/image_comparators/size_spec.rb +58 -0
- data/spec/image_validator_spec.rb +37 -0
- data/spec/model_spec.rb +27 -0
- data/spec/models/description_spec.rb +66 -0
- data/spec/models/favicon_spec.rb +12 -0
- data/spec/models/image_spec.rb +95 -0
- data/spec/models/title_spec.rb +26 -0
- data/spec/models/video_spec.rb +49 -0
- data/spec/models/website_spec.rb +51 -0
- data/spec/page_spec.rb +28 -0
- data/spec/processor_spec.rb +410 -0
- data/spec/response_spec.rb +62 -0
- data/spec/scraper_spec.rb +70 -0
- data/spec/scrapers/base_spec.rb +69 -0
- data/spec/scrapers/opengraph/base_spec.rb +96 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/uri_spec.rb +44 -0
- data/spec/video_parser_spec.rb +148 -0
- metadata +271 -0
metadata
ADDED
@@ -0,0 +1,271 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: link_thumbnailer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.3.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pierre-Louis Gottfrois
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-03-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.7.7
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.7.7
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: net-http-persistent
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.9'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.9'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: video_info
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.6'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.6'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: image_info
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
111
|
+
description: Ruby gem generating thumbnail images from a given URL.
|
112
|
+
email:
|
113
|
+
- pierrelouis.gottfrois@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".ruby-version"
|
121
|
+
- ".travis.yml"
|
122
|
+
- CHANGELOG.md
|
123
|
+
- Gemfile
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- lib/generators/link_thumbnailer/install_generator.rb
|
128
|
+
- lib/generators/templates/initializer.rb
|
129
|
+
- lib/link_thumbnailer.rb
|
130
|
+
- lib/link_thumbnailer/configuration.rb
|
131
|
+
- lib/link_thumbnailer/exceptions.rb
|
132
|
+
- lib/link_thumbnailer/grader.rb
|
133
|
+
- lib/link_thumbnailer/graders/base.rb
|
134
|
+
- lib/link_thumbnailer/graders/html_attribute.rb
|
135
|
+
- lib/link_thumbnailer/graders/length.rb
|
136
|
+
- lib/link_thumbnailer/graders/link_density.rb
|
137
|
+
- lib/link_thumbnailer/graders/position.rb
|
138
|
+
- lib/link_thumbnailer/image_comparator.rb
|
139
|
+
- lib/link_thumbnailer/image_comparators/base.rb
|
140
|
+
- lib/link_thumbnailer/image_comparators/size.rb
|
141
|
+
- lib/link_thumbnailer/image_parser.rb
|
142
|
+
- lib/link_thumbnailer/image_validator.rb
|
143
|
+
- lib/link_thumbnailer/model.rb
|
144
|
+
- lib/link_thumbnailer/models/description.rb
|
145
|
+
- lib/link_thumbnailer/models/favicon.rb
|
146
|
+
- lib/link_thumbnailer/models/image.rb
|
147
|
+
- lib/link_thumbnailer/models/title.rb
|
148
|
+
- lib/link_thumbnailer/models/video.rb
|
149
|
+
- lib/link_thumbnailer/models/website.rb
|
150
|
+
- lib/link_thumbnailer/page.rb
|
151
|
+
- lib/link_thumbnailer/parser.rb
|
152
|
+
- lib/link_thumbnailer/processor.rb
|
153
|
+
- lib/link_thumbnailer/railtie.rb
|
154
|
+
- lib/link_thumbnailer/response.rb
|
155
|
+
- lib/link_thumbnailer/scraper.rb
|
156
|
+
- lib/link_thumbnailer/scrapers/base.rb
|
157
|
+
- lib/link_thumbnailer/scrapers/default/base.rb
|
158
|
+
- lib/link_thumbnailer/scrapers/default/description.rb
|
159
|
+
- lib/link_thumbnailer/scrapers/default/favicon.rb
|
160
|
+
- lib/link_thumbnailer/scrapers/default/images.rb
|
161
|
+
- lib/link_thumbnailer/scrapers/default/title.rb
|
162
|
+
- lib/link_thumbnailer/scrapers/default/videos.rb
|
163
|
+
- lib/link_thumbnailer/scrapers/opengraph/base.rb
|
164
|
+
- lib/link_thumbnailer/scrapers/opengraph/description.rb
|
165
|
+
- lib/link_thumbnailer/scrapers/opengraph/favicon.rb
|
166
|
+
- lib/link_thumbnailer/scrapers/opengraph/image.rb
|
167
|
+
- lib/link_thumbnailer/scrapers/opengraph/images.rb
|
168
|
+
- lib/link_thumbnailer/scrapers/opengraph/title.rb
|
169
|
+
- lib/link_thumbnailer/scrapers/opengraph/video.rb
|
170
|
+
- lib/link_thumbnailer/scrapers/opengraph/videos.rb
|
171
|
+
- lib/link_thumbnailer/uri.rb
|
172
|
+
- lib/link_thumbnailer/version.rb
|
173
|
+
- lib/link_thumbnailer/video_parser.rb
|
174
|
+
- link_thumbnailer.gemspec
|
175
|
+
- spec/configuration_spec.rb
|
176
|
+
- spec/fixture_spec.rb
|
177
|
+
- spec/fixtures/bar.png
|
178
|
+
- spec/fixtures/default_from_body.html
|
179
|
+
- spec/fixtures/default_from_meta.html
|
180
|
+
- spec/fixtures/foo.png
|
181
|
+
- spec/fixtures/google_shift_jis.html
|
182
|
+
- spec/fixtures/google_utf8.html
|
183
|
+
- spec/fixtures/og_not_valid_example.html
|
184
|
+
- spec/fixtures/og_valid_example.html
|
185
|
+
- spec/fixtures/og_valid_multi_image_example.html
|
186
|
+
- spec/fixtures/og_valid_multi_video_example.html
|
187
|
+
- spec/grader_spec.rb
|
188
|
+
- spec/graders/base_spec.rb
|
189
|
+
- spec/graders/html_attribute_spec.rb
|
190
|
+
- spec/graders/length_spec.rb
|
191
|
+
- spec/graders/link_density_spec.rb
|
192
|
+
- spec/graders/position_spec.rb
|
193
|
+
- spec/image_comparators/size_spec.rb
|
194
|
+
- spec/image_validator_spec.rb
|
195
|
+
- spec/model_spec.rb
|
196
|
+
- spec/models/description_spec.rb
|
197
|
+
- spec/models/favicon_spec.rb
|
198
|
+
- spec/models/image_spec.rb
|
199
|
+
- spec/models/title_spec.rb
|
200
|
+
- spec/models/video_spec.rb
|
201
|
+
- spec/models/website_spec.rb
|
202
|
+
- spec/page_spec.rb
|
203
|
+
- spec/processor_spec.rb
|
204
|
+
- spec/response_spec.rb
|
205
|
+
- spec/scraper_spec.rb
|
206
|
+
- spec/scrapers/base_spec.rb
|
207
|
+
- spec/scrapers/opengraph/base_spec.rb
|
208
|
+
- spec/spec_helper.rb
|
209
|
+
- spec/uri_spec.rb
|
210
|
+
- spec/video_parser_spec.rb
|
211
|
+
homepage: https://github.com/gottfrois/link_thumbnailer
|
212
|
+
licenses: []
|
213
|
+
metadata: {}
|
214
|
+
post_install_message:
|
215
|
+
rdoc_options: []
|
216
|
+
require_paths:
|
217
|
+
- lib
|
218
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
225
|
+
- - ">="
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: '0'
|
228
|
+
requirements: []
|
229
|
+
rubyforge_project:
|
230
|
+
rubygems_version: 2.6.14
|
231
|
+
signing_key:
|
232
|
+
specification_version: 4
|
233
|
+
summary: Ruby gem ranking images from a given URL returning an object containing images
|
234
|
+
and website informations.
|
235
|
+
test_files:
|
236
|
+
- spec/configuration_spec.rb
|
237
|
+
- spec/fixture_spec.rb
|
238
|
+
- spec/fixtures/bar.png
|
239
|
+
- spec/fixtures/default_from_body.html
|
240
|
+
- spec/fixtures/default_from_meta.html
|
241
|
+
- spec/fixtures/foo.png
|
242
|
+
- spec/fixtures/google_shift_jis.html
|
243
|
+
- spec/fixtures/google_utf8.html
|
244
|
+
- spec/fixtures/og_not_valid_example.html
|
245
|
+
- spec/fixtures/og_valid_example.html
|
246
|
+
- spec/fixtures/og_valid_multi_image_example.html
|
247
|
+
- spec/fixtures/og_valid_multi_video_example.html
|
248
|
+
- spec/grader_spec.rb
|
249
|
+
- spec/graders/base_spec.rb
|
250
|
+
- spec/graders/html_attribute_spec.rb
|
251
|
+
- spec/graders/length_spec.rb
|
252
|
+
- spec/graders/link_density_spec.rb
|
253
|
+
- spec/graders/position_spec.rb
|
254
|
+
- spec/image_comparators/size_spec.rb
|
255
|
+
- spec/image_validator_spec.rb
|
256
|
+
- spec/model_spec.rb
|
257
|
+
- spec/models/description_spec.rb
|
258
|
+
- spec/models/favicon_spec.rb
|
259
|
+
- spec/models/image_spec.rb
|
260
|
+
- spec/models/title_spec.rb
|
261
|
+
- spec/models/video_spec.rb
|
262
|
+
- spec/models/website_spec.rb
|
263
|
+
- spec/page_spec.rb
|
264
|
+
- spec/processor_spec.rb
|
265
|
+
- spec/response_spec.rb
|
266
|
+
- spec/scraper_spec.rb
|
267
|
+
- spec/scrapers/base_spec.rb
|
268
|
+
- spec/scrapers/opengraph/base_spec.rb
|
269
|
+
- spec/spec_helper.rb
|
270
|
+
- spec/uri_spec.rb
|
271
|
+
- spec/video_parser_spec.rb
|