link_oracle 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffdf6cdb72710f8ec487c1118d15a031c79958ab
4
- data.tar.gz: ab1a3ea91f64b826fac48953777124f4c33c4e02
3
+ metadata.gz: b6e2b4ab5504ee1e7c46cdae0c8e09e6da8fe011
4
+ data.tar.gz: ca23aebe0f05bbfcda265765b221e293435a1407
5
5
  SHA512:
6
- metadata.gz: ff1d2bf9b3b49cc242f60810186e4bfe08108de08481d2e4d6d9cf37a7f6baa93b0b5a50eea6070a5232b27e428a555c82f3d35d9fa5c7ba8074a0a1497f784d
7
- data.tar.gz: 3e33d251e92a0c7b5bf1a45e9bbc33abc61d1c12c87230b34dfb7cae45d63077b6e2177246f9290135a1994868cbe722468b62597bfafb0d7e7f6c25fc30d525
6
+ metadata.gz: 031ed89722243b59d04c5cd789d45f53350dd99245a2eb73b9015a81da788f0751327ce8046250f3b4e81252cae29dad3adef0a1539d649f086681ae32257132
7
+ data.tar.gz: 53d17b8638ee5b37b33b33a89d40f9191d8bf9b507793be4f58be2d06f522e13195ce3a96bfee78a4f8bd1b107c0193398c8c122d216b74b530e76f6703fe890
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # LinkOracle
2
-
2
+ +[![Code Climate](https://codeclimate.com/github/socialchorus/link_oracle.png)](https://codeclimate.com/github/socialchorus/link_oracle)
3
3
  TODO: Write a gem description
4
4
 
5
5
  ## Installation
@@ -6,16 +6,16 @@ class LinkOracle
6
6
  end
7
7
 
8
8
  def title
9
- found = parsed_body.at_xpath("/html/head/title/text()")
9
+ found = parsed_body.at_xpath("//title/text()")
10
10
  found ? [found.content] : []
11
11
  end
12
12
 
13
13
  def image
14
- get_content("/html/head/meta[contains(@name, 'thumbnail')]")
14
+ get_content("//meta[contains(@name, 'thumbnail')]")
15
15
  end
16
16
 
17
17
  def description
18
- get_content("/html/head/meta[translate(
18
+ get_content("//meta[translate(
19
19
  @name,
20
20
  'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
21
21
  'abcdefghijklmnopqrstuvwxyz'
@@ -6,15 +6,15 @@ class LinkOracle
6
6
  end
7
7
 
8
8
  def title
9
- get_content("/html/head/meta[@property='og:title']")
9
+ get_content("//meta[@property='og:title']")
10
10
  end
11
11
 
12
12
  def image
13
- get_content("/html/head/meta[@property='og:image']")
13
+ get_content("//meta[@property='og:image']")
14
14
  end
15
15
 
16
16
  def description
17
- get_content("/html/head/meta[@property='og:description']")
17
+ get_content("//meta[@property='og:description']")
18
18
  end
19
19
  end
20
20
  end
@@ -1,4 +1,4 @@
1
1
  class LinkOracle
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link_oracle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Cooper
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-09-09 00:00:00.000000000 Z
14
+ date: 2013-10-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.0.7
136
+ rubygems_version: 2.0.2
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Scrapes pages for open graph, meta, and lastly, body preview data
@@ -145,3 +145,4 @@ test_files:
145
145
  - spec/link_oracle/request_spec.rb
146
146
  - spec/link_preview_spec.rb
147
147
  - spec/spec_helper.rb
148
+ has_rdoc: