turkish_support 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43851942674f62fa0813b9b375fc7818e708b09c
4
- data.tar.gz: bff6392ac58857338f443ec026e0742d6d45553f
3
+ metadata.gz: 9fca0c909e2f017060fdc3fa3a79c5aca0fc425e
4
+ data.tar.gz: 1f41fea0a325f42eeb75e951ea30612700739a6e
5
5
  SHA512:
6
- metadata.gz: 88993b5f019d0ffe243951205287b29b5cd7d47ceb5d52fe99c45c3dbeed9504ea38b2c225901f21acd3a120c8a1877370dc3fd82b619ebea530ba7d65267e0e
7
- data.tar.gz: 7081eefa5a634acbf51569374e2e86952313dafb20bd6d2304933d4eac44d53aaf5750c2370ecf1a8dbbc8242764ca43f98e28e387b41165cf8bcd8a600e745e
6
+ metadata.gz: 9389a8ce7eaa989bae045a89bdbf91d8bb941e1b2b94c4b004288e2834529ba226f90393b0eeb9c0d2321a083f7dc980f5d59e6a47538460ba4404cbdf670ee9
7
+ data.tar.gz: 9d58c5361ceeabeb089c41958b843bfd9839f2205dea7935a1c15480d2f7ef1cb4a97b3ab06aae59b7efffbb2b9d160c184f4d055dde0aff62eb7d5ff0ca6a46
@@ -1,7 +1,13 @@
1
1
  module TurkishSupport
2
2
  refine String do
3
3
  def titleize
4
- words.map { |w| w.downcase.capitalize }.join(' ')
4
+ words.map do |w|
5
+ if w.start_with? '('
6
+ w[0] + w[1..-1].downcase.capitalize
7
+ else
8
+ w.downcase.capitalize
9
+ end
10
+ end.join(' ')
5
11
  end
6
12
  end
7
13
  end
@@ -1,3 +1,3 @@
1
1
  module TurkishSupport
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -126,6 +126,11 @@ module TurkishSupport
126
126
  titleized = "mERHABA çAMUR iSMETOĞULLARI".titleize
127
127
  expect(titleized).to eq("Merhaba Çamur İsmetoğulları")
128
128
  end
129
+
130
+ it "support strings that include paranthesis" do
131
+ titleized = "rUBY roCkS (really!)".titleize
132
+ expect(titleized).to eq("Ruby Rocks (Really!)")
133
+ end
129
134
  end
130
135
 
131
136
  context "with destructive version" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turkish_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sıtkı Bağdat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-11 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler