turkish_support 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/turkish_support/string/titleize.rb +7 -1
- data/lib/turkish_support/version.rb +1 -1
- data/spec/turkish_support_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fca0c909e2f017060fdc3fa3a79c5aca0fc425e
|
4
|
+
data.tar.gz: 1f41fea0a325f42eeb75e951ea30612700739a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
@@ -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.
|
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
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|