mediawiki-butt 2.0.0 → 2.0.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/mediawiki/query/properties/pages.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f656d4e90befce4bfef592c187829a7d713f882
|
4
|
+
data.tar.gz: 53d0bdd862b94dd38e9f37c977e0da4b0df728ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0bfa18ec1ab7865eb3100ff54e73a729805cf6f06e2cd51c7c04775bea35283ee3501960ea7b848727a7f4e39f95637e1a91096b64c12e92052e374406a5d79
|
7
|
+
data.tar.gz: 42615b44eb28fcca27d8b4ee274af367a5bf7a263a92ab3690b9d4838c8b8885522e1bd4eb0939eda12bb3393efda12f4203c026953ae2e3f8b64c7d942dc9df
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
## Version 2
|
3
|
+
### Version 2.0.1
|
4
|
+
* Fix NoMethodError in `get_templates_in_page` when called for pages with no templates (#61)
|
5
|
+
* Fix NoMethodError in `get_all_links_in_page` when called for pages with no links
|
6
|
+
* Fix NoMethodError in `get_other_langs_of_page` when called for pages with only 1 language (#33)
|
7
|
+
|
3
8
|
### Version 2.0.0
|
4
9
|
**Breaking changes!**
|
5
10
|
* Logical reversal of the redirect param for move (#58)
|
@@ -222,7 +222,8 @@ module MediaWiki
|
|
222
222
|
query(params) do |return_val, query|
|
223
223
|
pageid = query['pages'].keys.find { |id| id != '-1' }
|
224
224
|
return unless pageid
|
225
|
-
|
225
|
+
templates = query['pages'][pageid].fetch('templates', [])
|
226
|
+
return_val.concat(templates.collect { |template| template['title'] })
|
226
227
|
end
|
227
228
|
end
|
228
229
|
|
@@ -265,7 +266,8 @@ module MediaWiki
|
|
265
266
|
query(params) do |return_val, query|
|
266
267
|
pageid = query['pages'].keys.find { |id| id != '-1' }
|
267
268
|
return unless pageid
|
268
|
-
query['pages'][pageid]
|
269
|
+
langlinks = query['pages'][pageid].fetch('langlinks', [])
|
270
|
+
langlinks.each do |l|
|
269
271
|
return_val[l['lang'].to_sym] = {
|
270
272
|
url: l['url'],
|
271
273
|
langname: l['langname'],
|
@@ -292,7 +294,8 @@ module MediaWiki
|
|
292
294
|
query(params) do |return_val, query|
|
293
295
|
pageid = query['pages'].keys.find { |id| id != '-1' }
|
294
296
|
return unless pageid
|
295
|
-
|
297
|
+
links = query['pages'][pageid].fetch('links', [])
|
298
|
+
return_val.concat(links.collect { |l| l['title'] })
|
296
299
|
end
|
297
300
|
end
|
298
301
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediawiki-butt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eli Foster
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|