wikipedia-client 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wikipedia/url.rb +1 -1
- data/lib/wikipedia/version.rb +1 -1
- data/spec/lib/client_spec.rb +16 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 718a9f989e3e18694e4e8fb8fce03059fb946f3ddc0ef840605ccd277719efad
|
4
|
+
data.tar.gz: f067e92c80d44a8e86de2c92b97b21b4b5a50b8a7eee1330c0506dd23b558ab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecdaba7629a485706d95b43e2c99496a0ad93e579f4be8cf528e756ffd96f9d1e29a0e9c274069bb5e35aad7cfb61ba33b5dff4e368f28aa8c60ec48789559c9
|
7
|
+
data.tar.gz: d6ffd55fd345ed1f0c52973125efcb14ec1913c29e6b5d046373d8c18bbe18b11220766ce3a6dffe32d2d0feab9248673de5f7566b6d7ad77362fd18cf3a8cba
|
data/Gemfile.lock
CHANGED
data/lib/wikipedia/url.rb
CHANGED
data/lib/wikipedia/version.rb
CHANGED
data/spec/lib/client_spec.rb
CHANGED
@@ -91,12 +91,27 @@ describe Wikipedia::Client, '.find page with one section (mocked)' do
|
|
91
91
|
end
|
92
92
|
|
93
93
|
describe Wikipedia::Client, '.find page with special characters in title' do
|
94
|
-
|
94
|
+
before(:each) do
|
95
95
|
@client = Wikipedia::Client.new
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'should properly escape all special characters' do
|
96
99
|
@page = @client.find('A +&%=?:/ B')
|
97
100
|
expect(@page.title).to eq('A +&%=?:/ B')
|
98
101
|
expect(@page.fullurl).to eq('https://en.wikipedia.org/wiki/A_%2B%26%25%3D%3F:/_B')
|
99
102
|
end
|
103
|
+
|
104
|
+
it 'should handle pluses in article titles' do
|
105
|
+
@page = @client.find('C++')
|
106
|
+
expect(@page.title).to eq('C++')
|
107
|
+
expect(@page.fullurl).to eq('https://en.wikipedia.org/wiki/C%2B%2B')
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'should handle slashes in article titles' do
|
111
|
+
@page = @client.find('PL/SQL')
|
112
|
+
expect(@page.title).to eq('PL/SQL')
|
113
|
+
expect(@page.fullurl).to eq('https://en.wikipedia.org/wiki/PL/SQL')
|
114
|
+
end
|
100
115
|
end
|
101
116
|
|
102
117
|
describe Wikipedia::Client, '.find image (mocked)' do
|
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.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril David
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2018-
|
16
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rake
|