unicode_case_converter 0.3.0 → 0.4.0

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: 8147ac9237fe2a9342e9233920cd704de361b475
4
- data.tar.gz: 653128b15114cb8c6d76f40b669275542f59b768
3
+ metadata.gz: 6f0da6506aa19279d3428441d416550fbc6aa724
4
+ data.tar.gz: ce9a69dd5bc531912a724584f48391d66249ffd0
5
5
  SHA512:
6
- metadata.gz: 996aecfad4635f622695e573ca94e9c8813b185302e33032fa1ec238f94b15c25a24defad1d14a61313106fa439d778c5583d4fd5ec42216d7e393e85663b14e
7
- data.tar.gz: 37aea4013ee039d5a7cd55153a1997c88e5c170ad289a6145c36193ab296eafd0257ab828a7ef2f2620fb997ecbd8d621d2376cdf530120aad9eb2d1952ac0d6
6
+ metadata.gz: 37edef63b66062808532164522e3578397a09f235dffbd01e7d389d0342858528a89f7158a28f87422c95040f227fd9d1f7a796749775aa1e63590dd7aab994a
7
+ data.tar.gz: ad6cf449eacd402e51fabe8ab5a1611bbaefd2799bcbdb8ec61c6d5674208b335ae10dafa46f0e60c205a266b54042487c1ebeeac593874cf9307115655958bf
@@ -1,3 +1,3 @@
1
1
  module UnicodeCaseConverter
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -157,7 +157,7 @@ module UnicodeCaseConverter
157
157
  end
158
158
 
159
159
  def capitalize
160
- UnicodeCaseConverter::Converter.new(UnicodeCaseConverter::Converter.new(text).downcase.slice(0,1)).upcase + UnicodeCaseConverter::Converter.new(text).downcase.slice(1..-1)
160
+ UnicodeCaseConverter::Converter.new(text.slice(0,1)).upcase + UnicodeCaseConverter::Converter.new(text).downcase.slice(1..-1)
161
161
  end
162
162
  end
163
163
  end
@@ -43,6 +43,13 @@ describe UnicodeCaseConverter do
43
43
  expect(ucc.capitalize).to eq(unicode_result)
44
44
  end
45
45
 
46
+ it "capitalizes a string 3" do
47
+ text = "hello World".freeze
48
+ ucc = UnicodeCaseConverter::Converter.new(text)
49
+ unicode_result = Unicode.capitalize(text)
50
+ expect(ucc.capitalize).to eq(unicode_result)
51
+ end
52
+
46
53
  # (0..3).each do |first_digit|
47
54
  # [*'0'..'9', *'A'..'F'].sample(16).sort.each do |second_digit|
48
55
  # [*'0'..'9', *'A'..'F'].sample(16).sort.each do |third_digit|
@@ -142,6 +149,9 @@ describe UnicodeCaseConverter do
142
149
  5.times do
143
150
  UnicodeCaseConverter::Converter.new(string).upcase
144
151
  end
152
+ 5.times do
153
+ UnicodeCaseConverter::Converter.new(string).capitalize
154
+ end
145
155
  end
146
156
  end
147
157
 
@@ -155,6 +165,9 @@ describe UnicodeCaseConverter do
155
165
  5.times do
156
166
  Unicode::upcase(string)
157
167
  end
168
+ 5.times do
169
+ Unicode::capitalize(string)
170
+ end
158
171
  end
159
172
  end
160
173
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode_case_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias