baptist 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,13 +86,13 @@ protected
86
86
  s = encode(s, options[:encoding])
87
87
  regexp = case
88
88
  when RUBY_VERSION >= "1.9" && s.encoding === Encoding.find('UTF-8')
89
- /([^ a-zA-Z0-9_\.\-!~*'()]+)/u
89
+ /([^ a-zA-Z0-9_\.\-!~*'()\/]+)/u
90
90
  else
91
- /([^ a-zA-Z0-9_\.\-!~*'()]+)/n
91
+ /([^ a-zA-Z0-9_\.\-!~*'()\/]+)/n
92
92
  end
93
93
  s.to_s.gsub(regexp) {
94
94
  '%'+$1.unpack('H2'*bytesize($1)).join('%').upcase
95
- }.tr(' ', options[:space])
95
+ }.tr(' ', options[:space]).tr('/', options[:space])
96
96
  end
97
97
  module_function :escape
98
98
 
@@ -1,3 +1,3 @@
1
1
  module Baptist
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -18,7 +18,7 @@ class BaptistTest < Test::Unit::TestCase
18
18
  end
19
19
 
20
20
  def test_strange_characters
21
- assert_equal "-_.!~*'()", Baptist.generate("-_.!~*'()")
21
+ assert_equal "-_.!~*'()-", Baptist.generate("-_.!~*'()/")
22
22
  assert_equal 'Tr%C3%A4d%2C-Gr%C3%A4s-och-Stenar', Baptist.generate('Träd, Gräs och Stenar')
23
23
  end
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baptist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
12
+ date: 2012-05-29 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Baptist creates well-formed relative URIs from a set of strings.
15
15
  email: