diffbot 0.1.1 → 0.1.2
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 +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +26 -0
- data/Rakefile +1 -0
- data/diffbot.gemspec +5 -5
- data/lib/diffbot/article.rb +17 -0
- data/test/test_helper.rb +9 -3
- metadata +51 -32
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ffdaf63580cbe142861ae566176c1ae64540f3aa
|
4
|
+
data.tar.gz: 804948072bb5b6ab792ada3680c899938fde6d3a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1dfab96f3beb2a6e3c584760db87264c84da1161d8d73c9163fbe96e56e0cb81510561d971eb8753434881607890531453bc557af3873485a821fad9d918333d
|
7
|
+
data.tar.gz: 84e6cd2719109ddf3775ec860c22f3647124fc0f3bdde14093eb5a7e5b4e8636d5505b3f779298a0f1c7e88b0e00d8133cc1206e865ea175eac18780d711c115
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
diffbot (0.1.2)
|
5
|
+
excon
|
6
|
+
hashie
|
7
|
+
nokogiri (~> 1.5.0)
|
8
|
+
yajl-ruby
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
excon (0.20.1)
|
14
|
+
hashie (2.0.3)
|
15
|
+
minitest (4.7.0)
|
16
|
+
nokogiri (1.5.10)
|
17
|
+
rake (10.0.4)
|
18
|
+
yajl-ruby (1.1.0)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
ruby
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
diffbot!
|
25
|
+
minitest
|
26
|
+
rake
|
data/Rakefile
CHANGED
data/diffbot.gemspec
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "diffbot"
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.2"
|
4
4
|
s.description = "Diffbot provides a concise API for analyzing and extracting semantic information from web pages using Diffbot (http://www.diffbot.com)."
|
5
5
|
s.summary = "Ruby interface to the Diffbot API "
|
6
|
-
s.authors = ["Nicolas Sanguinetti"]
|
7
|
-
s.email = "hi@nicolassanguinetti.info"
|
8
|
-
s.homepage = "http://github.com/
|
6
|
+
s.authors = ["Nicolas Sanguinetti", "Roman Greshny"]
|
7
|
+
s.email = ["hi@nicolassanguinetti.info", "greshny@gmail.com"]
|
8
|
+
s.homepage = "http://github.com/greshny/diffbot"
|
9
9
|
s.has_rdoc = false
|
10
10
|
s.files = `git ls-files`.split "\n"
|
11
11
|
s.platform = Gem::Platform::RUBY
|
12
12
|
|
13
13
|
s.add_dependency("excon")
|
14
14
|
s.add_dependency("yajl-ruby")
|
15
|
-
s.add_dependency("nokogiri")
|
15
|
+
s.add_dependency("nokogiri", "~> 1.5.0")
|
16
16
|
s.add_dependency("hashie")
|
17
17
|
|
18
18
|
s.add_development_dependency("minitest")
|
data/lib/diffbot/article.rb
CHANGED
@@ -54,6 +54,9 @@ module Diffbot
|
|
54
54
|
# Public: Title of the article.
|
55
55
|
property :title
|
56
56
|
|
57
|
+
# Public: Number of pages of the article.
|
58
|
+
property :numPages
|
59
|
+
|
57
60
|
# Public: Author (or Authors) ofthe article.
|
58
61
|
property :author
|
59
62
|
|
@@ -64,6 +67,7 @@ module Diffbot
|
|
64
67
|
property :type
|
65
68
|
property :link
|
66
69
|
property :primary, default: false
|
70
|
+
property :caption
|
67
71
|
end
|
68
72
|
|
69
73
|
# Public: List of media items related to the articles. Each item is an
|
@@ -99,6 +103,14 @@ module Diffbot
|
|
99
103
|
# Public: The favicon of the page where this article was extracted from.
|
100
104
|
property :icon
|
101
105
|
|
106
|
+
property :date_created
|
107
|
+
|
108
|
+
property :cid
|
109
|
+
|
110
|
+
property :categories
|
111
|
+
|
112
|
+
property :supertags
|
113
|
+
|
102
114
|
class Stats < Hashie::Trash
|
103
115
|
property :fetch_time, from: :fetchTime
|
104
116
|
property :confidence
|
@@ -144,6 +156,11 @@ module Diffbot
|
|
144
156
|
# Diffbot::Article.fetch(url, token) do |req|
|
145
157
|
# req.summary = true
|
146
158
|
# end
|
159
|
+
|
160
|
+
property :nextPage
|
161
|
+
property :resolved_url
|
162
|
+
property :type
|
163
|
+
|
147
164
|
class RequestParams < Hashie::Trash
|
148
165
|
# Public: Set to true to return HTML instead of plain-text.
|
149
166
|
#
|
data/test/test_helper.rb
CHANGED
@@ -9,7 +9,13 @@ rescue LoadError
|
|
9
9
|
# you want :P
|
10
10
|
end
|
11
11
|
|
12
|
-
MiniTest::
|
13
|
-
|
14
|
-
|
12
|
+
module MiniTest::DiffbotPlugin
|
13
|
+
def before_setup
|
14
|
+
Diffbot::Request.testing = true
|
15
|
+
Diffbot.reset!
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class MiniTest::Unit::TestCase
|
20
|
+
include MiniTest::DiffbotPlugin
|
15
21
|
end
|
metadata
CHANGED
@@ -1,79 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diffbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nicolas Sanguinetti
|
8
|
+
- Roman Greshny
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|
16
|
-
requirement:
|
17
|
-
none: false
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
|
-
- -
|
18
|
+
- - '>='
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: '0'
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
version_requirements:
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
25
28
|
- !ruby/object:Gem::Dependency
|
26
29
|
name: yajl-ruby
|
27
|
-
requirement:
|
28
|
-
none: false
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
29
31
|
requirements:
|
30
|
-
- -
|
32
|
+
- - '>='
|
31
33
|
- !ruby/object:Gem::Version
|
32
34
|
version: '0'
|
33
35
|
type: :runtime
|
34
36
|
prerelease: false
|
35
|
-
version_requirements:
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
36
42
|
- !ruby/object:Gem::Dependency
|
37
43
|
name: nokogiri
|
38
|
-
requirement:
|
39
|
-
none: false
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
40
45
|
requirements:
|
41
|
-
- -
|
46
|
+
- - ~>
|
42
47
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
48
|
+
version: 1.5.0
|
44
49
|
type: :runtime
|
45
50
|
prerelease: false
|
46
|
-
version_requirements:
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.5.0
|
47
56
|
- !ruby/object:Gem::Dependency
|
48
57
|
name: hashie
|
49
|
-
requirement:
|
50
|
-
none: false
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
51
59
|
requirements:
|
52
|
-
- -
|
60
|
+
- - '>='
|
53
61
|
- !ruby/object:Gem::Version
|
54
62
|
version: '0'
|
55
63
|
type: :runtime
|
56
64
|
prerelease: false
|
57
|
-
version_requirements:
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
58
70
|
- !ruby/object:Gem::Dependency
|
59
71
|
name: minitest
|
60
|
-
requirement:
|
61
|
-
none: false
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
62
73
|
requirements:
|
63
|
-
- -
|
74
|
+
- - '>='
|
64
75
|
- !ruby/object:Gem::Version
|
65
76
|
version: '0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
69
84
|
description: Diffbot provides a concise API for analyzing and extracting semantic
|
70
85
|
information from web pages using Diffbot (http://www.diffbot.com).
|
71
|
-
email:
|
86
|
+
email:
|
87
|
+
- hi@nicolassanguinetti.info
|
88
|
+
- greshny@gmail.com
|
72
89
|
executables: []
|
73
90
|
extensions: []
|
74
91
|
extra_rdoc_files: []
|
75
92
|
files:
|
76
93
|
- .gitignore
|
94
|
+
- .travis.yml
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
77
97
|
- LICENSE
|
78
98
|
- README.md
|
79
99
|
- Rakefile
|
@@ -89,28 +109,27 @@ files:
|
|
89
109
|
- test/coercible_hash_test.rb
|
90
110
|
- test/request_test.rb
|
91
111
|
- test/test_helper.rb
|
92
|
-
homepage: http://github.com/
|
112
|
+
homepage: http://github.com/greshny/diffbot
|
93
113
|
licenses: []
|
114
|
+
metadata: {}
|
94
115
|
post_install_message:
|
95
116
|
rdoc_options: []
|
96
117
|
require_paths:
|
97
118
|
- lib
|
98
119
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
120
|
requirements:
|
101
|
-
- -
|
121
|
+
- - '>='
|
102
122
|
- !ruby/object:Gem::Version
|
103
123
|
version: '0'
|
104
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
125
|
requirements:
|
107
|
-
- -
|
126
|
+
- - '>='
|
108
127
|
- !ruby/object:Gem::Version
|
109
128
|
version: '0'
|
110
129
|
requirements: []
|
111
130
|
rubyforge_project:
|
112
|
-
rubygems_version: 1.
|
131
|
+
rubygems_version: 2.1.11
|
113
132
|
signing_key:
|
114
|
-
specification_version:
|
133
|
+
specification_version: 4
|
115
134
|
summary: Ruby interface to the Diffbot API
|
116
135
|
test_files: []
|