mediawiki-gateway 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/media_wiki.rb CHANGED
@@ -3,5 +3,5 @@ require File.dirname(__FILE__) + '/media_wiki/utils'
3
3
  require File.dirname(__FILE__) + '/media_wiki/gateway'
4
4
 
5
5
  module MediaWiki
6
- VERSION = "0.2.4"
6
+ VERSION = "0.2.6"
7
7
  end
@@ -33,10 +33,10 @@ module MediaWiki
33
33
  end
34
34
 
35
35
  # Convert a Wiki page name ("getting there & away") to URI-safe format ("getting_there_%26_away"),
36
- # taking care not to mangle slashes
36
+ # taking care not to mangle slashes or colons
37
37
  # [wiki] Page name string in Wiki format
38
38
  def wiki_to_uri(wiki)
39
- wiki.to_s.split('/').map {|chunk| CGI.escape(chunk.tr(' ', '_')) }.join('/') if wiki
39
+ wiki.to_s.split('/').map {|chunk| CGI.escape(chunk.tr(' ', '_')) }.join('/').gsub('%3A', ':') if wiki
40
40
  end
41
41
 
42
42
  # Return current version of MediaWiki::Gateway
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mediawiki-gateway}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jani Patokallio"]
12
- s.date = %q{2010-12-29}
12
+ s.date = %q{2010-12-30}
13
13
  s.description = %q{}
14
14
  s.email = %q{jpatokal@iki.fi}
15
15
  s.extra_rdoc_files = [
data/spec/utils_spec.rb CHANGED
@@ -44,8 +44,8 @@ describe MediaWiki do
44
44
  MediaWiki.wiki_to_uri('Phở').should == 'Ph%E1%BB%9F'
45
45
  end
46
46
 
47
- it "should escape each path component but leave slashes untouched" do
48
- MediaWiki.wiki_to_uri('Phở/B&r/B z').should == 'Ph%E1%BB%9F/B%26r/B_z'
47
+ it "should escape each path component but leave slashes and colons untouched" do
48
+ MediaWiki.wiki_to_uri('Zoo:Phở/B&r/B z').should == 'Zoo:Ph%E1%BB%9F/B%26r/B_z'
49
49
  end
50
50
 
51
51
  it "should pass through nil" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediawiki-gateway
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jani Patokallio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-29 00:00:00 +11:00
18
+ date: 2010-12-30 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency