link_preview 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +109 -0
- data/Rakefile +15 -0
- data/lib/faraday/follow_redirects.rb +155 -0
- data/lib/link_preview/configuration.rb +86 -0
- data/lib/link_preview/content.rb +350 -0
- data/lib/link_preview/http_client.rb +91 -0
- data/lib/link_preview/http_crawler.rb +114 -0
- data/lib/link_preview/null_crawler.rb +46 -0
- data/lib/link_preview/parser.rb +172 -0
- data/lib/link_preview/spec_helper.rb +1 -0
- data/lib/link_preview/uri.rb +149 -0
- data/lib/link_preview/version.rb +23 -0
- data/lib/link_preview.rb +51 -0
- data/spec/files/requests/bad_utf8.yml +186 -0
- data/spec/files/requests/elasticsearch.yml +2258 -0
- data/spec/files/requests/ggp_png.yml +256 -0
- data/spec/files/requests/kaltura.yml +3612 -0
- data/spec/files/requests/kaltura_opengraph.yml +1266 -0
- data/spec/files/requests/ogp_me.yml +880 -0
- data/spec/files/requests/sliderocket.yml +387 -0
- data/spec/files/requests/support_apple_com.yml +833 -0
- data/spec/files/requests/youtube.yml +3513 -0
- data/spec/files/requests/youtube_404.yml +1055 -0
- data/spec/link_preview/http_crawler_spec.rb +50 -0
- data/spec/link_preview/uri_spec.rb +99 -0
- data/spec/link_preview_spec.rb +383 -0
- data/spec/spec_helper.rb +39 -0
- data/spec/support/link_preview/link_preview_stubs.rb +26 -0
- metadata +241 -0
metadata
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: link_preview
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Andrews
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby-oembed
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: addressable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.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.9.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
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'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: multi_json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: vcr
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: webmock
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: debugger
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Generate a link_preview for any URL
|
168
|
+
email:
|
169
|
+
- michael@socialcast.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- LICENSE.txt
|
175
|
+
- README.md
|
176
|
+
- Rakefile
|
177
|
+
- lib/faraday/follow_redirects.rb
|
178
|
+
- lib/link_preview.rb
|
179
|
+
- lib/link_preview/configuration.rb
|
180
|
+
- lib/link_preview/content.rb
|
181
|
+
- lib/link_preview/http_client.rb
|
182
|
+
- lib/link_preview/http_crawler.rb
|
183
|
+
- lib/link_preview/null_crawler.rb
|
184
|
+
- lib/link_preview/parser.rb
|
185
|
+
- lib/link_preview/spec_helper.rb
|
186
|
+
- lib/link_preview/uri.rb
|
187
|
+
- lib/link_preview/version.rb
|
188
|
+
- spec/files/requests/bad_utf8.yml
|
189
|
+
- spec/files/requests/elasticsearch.yml
|
190
|
+
- spec/files/requests/ggp_png.yml
|
191
|
+
- spec/files/requests/kaltura.yml
|
192
|
+
- spec/files/requests/kaltura_opengraph.yml
|
193
|
+
- spec/files/requests/ogp_me.yml
|
194
|
+
- spec/files/requests/sliderocket.yml
|
195
|
+
- spec/files/requests/support_apple_com.yml
|
196
|
+
- spec/files/requests/youtube.yml
|
197
|
+
- spec/files/requests/youtube_404.yml
|
198
|
+
- spec/link_preview/http_crawler_spec.rb
|
199
|
+
- spec/link_preview/uri_spec.rb
|
200
|
+
- spec/link_preview_spec.rb
|
201
|
+
- spec/spec_helper.rb
|
202
|
+
- spec/support/link_preview/link_preview_stubs.rb
|
203
|
+
homepage: https://github.com/socialcast/link_preview
|
204
|
+
licenses: []
|
205
|
+
metadata: {}
|
206
|
+
post_install_message:
|
207
|
+
rdoc_options: []
|
208
|
+
require_paths:
|
209
|
+
- lib
|
210
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
215
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0'
|
220
|
+
requirements: []
|
221
|
+
rubyforge_project:
|
222
|
+
rubygems_version: 2.2.2
|
223
|
+
signing_key:
|
224
|
+
specification_version: 4
|
225
|
+
summary: Generate a link_preview for any URL
|
226
|
+
test_files:
|
227
|
+
- spec/files/requests/bad_utf8.yml
|
228
|
+
- spec/files/requests/elasticsearch.yml
|
229
|
+
- spec/files/requests/ggp_png.yml
|
230
|
+
- spec/files/requests/kaltura.yml
|
231
|
+
- spec/files/requests/kaltura_opengraph.yml
|
232
|
+
- spec/files/requests/ogp_me.yml
|
233
|
+
- spec/files/requests/sliderocket.yml
|
234
|
+
- spec/files/requests/support_apple_com.yml
|
235
|
+
- spec/files/requests/youtube.yml
|
236
|
+
- spec/files/requests/youtube_404.yml
|
237
|
+
- spec/link_preview/http_crawler_spec.rb
|
238
|
+
- spec/link_preview/uri_spec.rb
|
239
|
+
- spec/link_preview_spec.rb
|
240
|
+
- spec/spec_helper.rb
|
241
|
+
- spec/support/link_preview/link_preview_stubs.rb
|