metapage 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +9 -7
- data/Rakefile +1 -1
- data/lib/metapage/version.rb +1 -1
- data/metapage.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e864cae0626afd75c19e1887743f5909532b658
|
4
|
+
data.tar.gz: 44cd6928669d3af624ac8362ff426d3021419df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73606a697e7c6adc7448d71f3b2daa9b92c960360401aadaa757aeb30610896c66d2f22c5bf19a9727b264da58d40a3b0d0e8ec0f684d3dd5786cc41089b4f3d
|
7
|
+
data.tar.gz: 08deeda370fa63dbb25b0f1ce74273b41b9e616eafea6411c24a8d3dd04f6a87a50e569f4c32401f95c35e044aae8df343a0b72630c272c8bbf863f30ef9ae82
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Metapage
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/protonet/metapage.svg)](https://travis-ci.org/protonet/metapage)
|
4
4
|
|
5
5
|
A tiny class for extracting title, description and some further information from given urls using [open graph](http://www.ogp.me) and regular meta tags.
|
6
6
|
|
@@ -22,14 +22,15 @@ Add `gem 'metapage'` to your `Gemfile` or `gem install metapage` on your command
|
|
22
22
|
|
23
23
|
Fetch a specific URL. Returns `nil` if the content is not html or an image or loading fails due to invalid url, http response or timeout.
|
24
24
|
|
25
|
-
pp Metapage.fetch("https://github.com/
|
26
|
-
|
27
|
-
|
25
|
+
pp Metapage.fetch("https://github.com/protonet/metapage").to_h
|
26
|
+
|
27
|
+
{:id=>"58329eab7cf73bb0b29123a63ae150cc59dcf2e3",
|
28
|
+
:title=>"protonet/metapage",
|
28
29
|
:description=>
|
29
30
|
"metapage - A tiny class for extracting title, description and some further information from given urls",
|
30
|
-
:image_url=>"https://
|
31
|
+
:image_url=>"https://avatars1.githubusercontent.com/u/375656?v=3&s=400",
|
31
32
|
:type=>"object",
|
32
|
-
:canonical_url=>"https://github.com/
|
33
|
+
:canonical_url=>"https://github.com/protonet/metapage",
|
33
34
|
:site_name=>"GitHub",
|
34
35
|
:media_type=>"text",
|
35
36
|
:content_type=>"text/html"}
|
@@ -37,6 +38,7 @@ Fetch a specific URL. Returns `nil` if the content is not html or an image or lo
|
|
37
38
|
For images, the resulting content is much more minimal:
|
38
39
|
|
39
40
|
pp Metapage.fetch("https://s-media-cache-ak0.pinimg.com/736x/e3/ce/b3/e3ceb3fe3224e104ad0f019117b8e1f0.jpg").to_h
|
41
|
+
|
40
42
|
{:id=>"7bd710044d61b55c63d1d0089632a6417f370f53",
|
41
43
|
:title=>nil,
|
42
44
|
:description=>nil,
|
@@ -67,7 +69,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
67
69
|
|
68
70
|
## Contributing
|
69
71
|
|
70
|
-
1. Fork it ( https://github.com/
|
72
|
+
1. Fork it ( https://github.com/protonet/metapage/fork )
|
71
73
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
72
74
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
73
75
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
data/lib/metapage/version.rb
CHANGED
data/metapage.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Extract metadata about a given HTML url from open graph and regular meta tags}
|
13
13
|
spec.description = spec.summary
|
14
|
-
spec.homepage = "https://github.com/
|
14
|
+
spec.homepage = "https://github.com/protonet/metapage"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.bindir = "exe"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metapage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Olszowka
|
@@ -157,7 +157,7 @@ files:
|
|
157
157
|
- lib/metapage.rb
|
158
158
|
- lib/metapage/version.rb
|
159
159
|
- metapage.gemspec
|
160
|
-
homepage: https://github.com/
|
160
|
+
homepage: https://github.com/protonet/metapage
|
161
161
|
licenses: []
|
162
162
|
metadata: {}
|
163
163
|
post_install_message:
|