wikipedia-client 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +5 -0
- data/VERSION +1 -1
- data/lib/wikipedia/client.rb +2 -2
- data/lib/wikipedia/page.rb +4 -0
- data/wikipedia-client.gemspec +2 -2
- metadata +2 -2
data/README.textile
CHANGED
@@ -34,6 +34,10 @@ page.links
|
|
34
34
|
|
35
35
|
=> [..., "Business", "Cult following", ...]
|
36
36
|
|
37
|
+
page.extlinks
|
38
|
+
|
39
|
+
=> [..., "http://www.example.com/", ...]
|
40
|
+
|
37
41
|
page.images
|
38
42
|
|
39
43
|
=> ["File:Getting Things Done.jpg", ...]
|
@@ -43,6 +47,7 @@ page.image_urls
|
|
43
47
|
=> ["http://upload.wikimedia.org/wikipedia/en/e/e1/Getting_Things_Done.jpg"]
|
44
48
|
|
45
49
|
page.image_descriptionurls
|
50
|
+
|
46
51
|
=> ["http://en.wikipedia.org/wiki/File:Getting_Things_Done.jpg"]
|
47
52
|
|
48
53
|
page.coordinates
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/lib/wikipedia/client.rb
CHANGED
@@ -13,7 +13,7 @@ module Wikipedia
|
|
13
13
|
title = Url.new(title).title rescue title
|
14
14
|
page = Page.new( request_page( title, options ) )
|
15
15
|
while follow_redirects and page.redirect?
|
16
|
-
page = Page.new( request_page( page.redirect_title, options ))
|
16
|
+
page = Page.new( request_page( page.redirect_title, options ) )
|
17
17
|
end
|
18
18
|
page
|
19
19
|
end
|
@@ -27,7 +27,7 @@ module Wikipedia
|
|
27
27
|
def request_page( title, options = {} )
|
28
28
|
request( {
|
29
29
|
:action => "query",
|
30
|
-
:prop => %w{ revisions links images categories coordinates templates },
|
30
|
+
:prop => %w{ revisions links extlinks images categories coordinates templates },
|
31
31
|
:rvprop => "content",
|
32
32
|
:titles => title
|
33
33
|
}.merge( options ) )
|
data/lib/wikipedia/page.rb
CHANGED
data/wikipedia-client.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "wikipedia-client"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland"]
|
12
|
-
s.date = "2013-06-
|
12
|
+
s.date = "2013-06-30"
|
13
13
|
s.description = "Ruby client for the Wikipedia API"
|
14
14
|
s.email = "mike.haugland@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wikipedia-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-06-
|
14
|
+
date: 2013-06-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thoughtbot-shoulda
|