mediawiki-butt 0.10.2 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/mediawiki/query/lists/querypage.rb +1 -1
- data/lib/mediawiki/query/lists/recent_changes.rb +0 -1
- data/lib/mediawiki/utils.rb +19 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76590d42cd5826b880c92e0d98bbcc2fe43bfd3
|
4
|
+
data.tar.gz: 38c94f748647bf2a34854275e5f6fd55bc434020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aef8ba17d16a6fa67a6a2c617df2336bd40359d8d03df9bc15d0b2bc49c97eae87538f3e092d1c93ebfc43aa108e6257b9524e74c85a0fa9bd8568d01422eaf
|
7
|
+
data.tar.gz: a45cb96bffa3a92d81ef765649349fc5142f577f6a1bbca3309b78f3b0d9078ed9f56b52eaadcbaebaf82df7eff1e4c4cc5e658abfd7ca637d6e819115c3acf4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
## Version 0
|
3
|
+
### Version 0.11.0
|
4
|
+
* Fix get_mostcategories_page typo (Mostca**c**tegories) (#24).
|
5
|
+
* Significant rewrite of the README, arguably the most important part of this version.
|
6
|
+
* New Utils module for replicating some of MediaWiki's utilities. Right now this only includes the `#encode_url` method, a Ruby version of the JavaScript method `mw.util.rawurlencode` (#21).
|
7
|
+
* Recent Changes responses are no longer printed on every request (#19).
|
8
|
+
|
3
9
|
### Version 0.10.2
|
4
10
|
* Update to Ruby 2.3 and HTTPClient 2.7
|
5
11
|
* All values in Constants, including the keys and values in the NAMESPACES constant, are now frozen objects.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module MediaWiki
|
2
|
+
# Util class similar to MediaWiki's non-API util methods. This is not required automatically by
|
3
|
+
# requiring 'mediawiki-butt' or 'mediawiki/butt'; you must require it explicitly.
|
4
|
+
class Utils
|
5
|
+
# Encodes the URL like mw.util.rawurlencode JS.
|
6
|
+
# @todo Perhaps write a StringUtility method for better gsubs?
|
7
|
+
# @param str [String] The string to replace (typically a page title).
|
8
|
+
# @return [String] The encoded string.
|
9
|
+
def self.encode_url(str)
|
10
|
+
str.gsub!(/!/,'%21') || str
|
11
|
+
str.gsub!(/'/,'%27') || str
|
12
|
+
str.gsub!(/\(/,'%28') || str
|
13
|
+
str.gsub!(/\)/,'%29') || str
|
14
|
+
str.gsub!(/\*/,'%2A') || str
|
15
|
+
str.gsub!(/~/,'%7E') || str
|
16
|
+
return str
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
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: 0.
|
4
|
+
version: 0.11.0
|
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: 2016-
|
12
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/mediawiki/query/properties/pages.rb
|
71
71
|
- lib/mediawiki/query/properties/properties.rb
|
72
72
|
- lib/mediawiki/query/query.rb
|
73
|
+
- lib/mediawiki/utils.rb
|
73
74
|
homepage: https://github.com/ftb-gamepedia/mediawiki-butt-ruby
|
74
75
|
licenses:
|
75
76
|
- CC-BY-NC-ND-4.0
|