turkish_support 1.0.0 → 1.0.1

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: 3db72490d22a19efe175685b906ba391f2c28626
4
- data.tar.gz: a7ba6fd180cafe0459f1d803b9241377683c3884
3
+ metadata.gz: d85d74516dd024f7e3fb7af57cb829aa58544f08
4
+ data.tar.gz: 119a92cdc0abfad8b55d9b417dcdec8e29a7ff9f
5
5
  SHA512:
6
- metadata.gz: a14ce3c3e1b8387c25d8ad69cf7135e68b109c0d8141601b41c8b58aeb6b6785eed480512cc7c3e3133a6435bd18438f25564d84eeaa16b45292a4464e690796
7
- data.tar.gz: 8745d64b84236f06bdabae86c182f3f2c91d58f2fa71f7c11a3edef4c8f0279e4437fadef81a8fc4a92d61589120e00e1d0287e32253416b3099b0309cee44e0
6
+ metadata.gz: b09f209554bf162d08670188999a5ec1206aff3806aee412d6fb6a94187fa9699182b2dd7fdcbbfce2fff7161c0b06191c85404535c731c1476aaa0621be6ac4
7
+ data.tar.gz: bffcbb6600bd5416312276155ab93f00fcc28ae2dd99e85ff30f8ed0b59591cf0add903b208fb2bb225043c77be78bb73a1479c5e356bce98c4d0057b279abe6
@@ -25,9 +25,10 @@ module TurkishSupport
25
25
  split.map do |word|
26
26
  word.downcase!
27
27
  if conjuction?(word) && !conjuctions
28
+ puts "---DOWNCASED"
28
29
  word
29
30
  elsif start_with_a_special_char?(word)
30
- word.chr + word[1..-1].capitalize
31
+ word.size > 1 ? word.chr + word[1..-1].capitalize : word.chr
31
32
  else
32
33
  word.capitalize
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module TurkishSupport
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -354,6 +354,13 @@ module TurkishSupport
354
354
  .to eq('Merhaba Çamur İsmet')
355
355
  end
356
356
 
357
+ it 'no problem with words that consist of special chars only' do
358
+ titleized = '(( merhaba çamur ismet'.titleize
359
+
360
+ expect(titleized)
361
+ .to eq('(( Merhaba Çamur İsmet')
362
+ end
363
+
357
364
  it 'downcases characters other than first characters of all words' do
358
365
  titleized = 'mERHABA çAMUR iSMETOĞULLARI'.titleize
359
366
 
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: 1.0.0
4
+ version: 1.0.1
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: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.5
103
+ rubygems_version: 2.4.6
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Turkish character support for core ruby methods.
@@ -108,4 +108,3 @@ test_files:
108
108
  - spec/helpers_spec.rb
109
109
  - spec/spec_helper.rb
110
110
  - spec/turkish_support_spec.rb
111
- has_rdoc: