babosa 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -142,6 +142,7 @@ Please use Babosa's [Github issue tracker](http://github.com/norman/babosa/issue
142
142
 
143
143
  ## Changelog
144
144
 
145
+ * 0.2.2 - Fix for "smart" quote handling.
145
146
  * 0.2.1 - Implement #empty? for compatiblity with Active Support's #blank?.
146
147
  * 0.2.0 - Added support for Danish. Added method to generate Ruby identifiers. Improved performance.
147
148
  * 0.1.1 - Added support for Serbian.
@@ -72,7 +72,9 @@ module Babosa
72
72
  "Ū" => "U", "ū" => "u", "Ŭ" => "U", "ŭ" => "u", "Ů" => "U", "ů" => "u",
73
73
  "Ű" => "U", "ű" => "u", "Ų" => "U", "ų" => "u", "Ŵ" => "W", "ŵ" => "w",
74
74
  "Ŷ" => "Y", "ŷ" => "y", "Ÿ" => "Y", "Ź" => "Z", "ź" => "z", "Ż" => "Z",
75
- "ż" => "z", "Ž" => "Z", "ž" => "z", "×" => "x", "÷" => "/"
75
+ "ż" => "z", "Ž" => "Z", "ž" => "z", "×" => "x", "÷" => "/", "‘" => "'",
76
+ '’' => "'", "‛" => "'", "“" => '"', "”" => '"', "„" => '"', "‟" => '"',
77
+ "‐" => "-", "‑" => "-", "‒" => "-", "–" => "-", "—" => "-", "―" => "-"
76
78
  }
77
79
  end
78
80
  end
@@ -1,5 +1,5 @@
1
1
  module Babosa
2
2
  module Version
3
- STRING = "0.2.1"
3
+ STRING = "0.2.2"
4
4
  end
5
5
  end
@@ -190,4 +190,9 @@ class BabosaTest < Test::Unit::TestCase
190
190
  assert_equal "katakana_is_uber_cool!", "カタカナ: katakana is über cool!".to_slug.to_ruby_method!
191
191
  assert_equal "katakana_is_uber_cool", "カタカナ: katakana is über cool".to_slug.to_ruby_method!(false)
192
192
  end
193
+
194
+ test "should approximate 'smart' quotes" do
195
+ assert_equal "john's", "john’s".to_slug.approximate_ascii.to_s
196
+ assert_equal "johns", "john’s".to_slug.normalize.to_s
197
+ end
193
198
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Norman Clarke
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-12 00:00:00 -03:00
17
+ date: 2011-01-24 00:00:00 -03:00
18
18
  default_executable:
19
19
  dependencies: []
20
20