open_graphy 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/open_graphy/fetcher.rb +1 -1
- data/lib/open_graphy/uri.rb +0 -2
- data/lib/open_graphy/url.rb +1 -1
- data/lib/open_graphy/version.rb +1 -1
- data/open_graphy.gemspec +5 -4
- data/spec/open_graphy_spec.rb +6 -2
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb96a766afc24c92ea612a84627ac817b3d8f91e
|
4
|
+
data.tar.gz: 68d2f7cd34b1d3b65f02c46202e54400be016aac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: debb02504ecc8df2458800d72087aa2bdf8d41f8ff3697e1b047d99f7ef4b1c1a7bbb6e4298abf6b5d5782021d8f1b771d328d45e02a23c3954de1d7cc3cdd2d
|
7
|
+
data.tar.gz: 14f3a84476359456f5cdc954bc3d5587b15279763aa3952d7666ad74dfd621b1822bdc5a5ca084f724be3bf01e968600c6ea1f11d2ab8d9bfc9fa68cb73f56f4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# OpenGraphy [![Build Status](https://travis-ci.org/onthebeach/open_graphy.svg)](https://travis-ci.org/onthebeach/open_graphy) [![Gem Version](https://badge.fury.io/rb/open_graphy.svg)](http://badge.fury.io/rb/open_graphy)
|
1
|
+
# OpenGraphy [![Build Status](https://travis-ci.org/onthebeach/open_graphy.svg)](https://travis-ci.org/onthebeach/open_graphy) [![Gem Version](https://badge.fury.io/rb/open_graphy.svg)](http://badge.fury.io/rb/open_graphy) [![Code Climate](https://codeclimate.com/github/onthebeach/open_graphy/badges/gpa.svg)](https://codeclimate.com/github/onthebeach/open_graphy)
|
2
2
|
|
3
3
|
This ruby gem allow you to fetch data that follows the opengraph protocol, and lets you fetch data from custom metatags also.
|
4
4
|
|
data/lib/open_graphy/fetcher.rb
CHANGED
data/lib/open_graphy/uri.rb
CHANGED
data/lib/open_graphy/url.rb
CHANGED
data/lib/open_graphy/version.rb
CHANGED
data/open_graphy.gemspec
CHANGED
@@ -17,10 +17,11 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.add_dependency "nokogiri", "~> 1.6"
|
21
|
+
|
20
22
|
spec.add_development_dependency "bundler", "~> 1.7"
|
21
|
-
spec.add_development_dependency "rake", "~>
|
22
|
-
spec.add_development_dependency "nokogiri", "~> 1.6"
|
23
|
+
spec.add_development_dependency "rake", "~> 11.0"
|
23
24
|
spec.add_development_dependency "rspec", "~> 3.1"
|
24
|
-
spec.add_development_dependency "vcr", '~>
|
25
|
-
spec.add_development_dependency "webmock", "~> 1
|
25
|
+
spec.add_development_dependency "vcr", '~> 3.0'
|
26
|
+
spec.add_development_dependency "webmock", "~> 2.1"
|
26
27
|
end
|
data/spec/open_graphy_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe OpenGraphy do
|
4
|
-
subject {
|
3
|
+
RSpec.describe OpenGraphy do
|
4
|
+
subject(:open_graphy) {
|
5
5
|
VCR.use_cassette('imdb/tt2084970') do
|
6
6
|
OpenGraphy.fetch(url)
|
7
7
|
end
|
@@ -12,6 +12,10 @@ describe OpenGraphy do
|
|
12
12
|
it 'should return an object with the opengraph data' do
|
13
13
|
expect(subject).to be_kind_of(OpenGraphy::MetaTags)
|
14
14
|
end
|
15
|
+
|
16
|
+
it { expect(open_graphy.url).to eql('http://www.imdb.com/title/tt2084970/') }
|
17
|
+
it { expect(open_graphy.site_name).to eql('IMDb') }
|
18
|
+
it { expect(open_graphy.image).to eql('http://ia.media-imdb.com/images/M/MV5BNDkwNTEyMzkzNl5BMl5BanBnXkFtZTgwNTAwNzk3MjE@._V1_.jpg') }
|
15
19
|
end
|
16
20
|
|
17
21
|
describe 'custom metatags' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_graphy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Bradley
|
@@ -9,50 +9,50 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: nokogiri
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
21
|
-
type: :
|
20
|
+
version: '1.6'
|
21
|
+
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
27
|
+
version: '1.6'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '1.7'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '1.7'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '11.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '11.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,28 +73,28 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '3.0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '3.0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: webmock
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '1
|
90
|
+
version: '2.1'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '1
|
97
|
+
version: '2.1'
|
98
98
|
description: A simple ruby wrapper for the open graph protocol
|
99
99
|
email:
|
100
100
|
- craig.bradley@onthebeach.co.uk
|