mongoid-elasticsearch 0.3.6 → 0.3.7

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: 553691b47f099f7ce35b48bab9f8f15f7e969624
4
- data.tar.gz: bfba44469d169221d85748cd32a0c4537472fb4c
3
+ metadata.gz: 4bea59bb96cabe5491604d6bbd967796ffa73b4b
4
+ data.tar.gz: c0e4c00756854f3d35482aed7f7f4e50b9b33855
5
5
  SHA512:
6
- metadata.gz: e693de712fb4029acfa93b3a9dd94a320f8759d15dc650d2cf681cfdb6014001aa6b789e4e9481467b00300e50485e8afba1419c368ea34dc3bce0ec52f55d89
7
- data.tar.gz: 5ec5511e85bdb60ddec9d570a7d8b5dc096ad94921d45005ce87c505de554903be0e31f92f93c1defdb82c07ab84b3acd2d144b52bd9f075edcd78d1a8769ed9
6
+ metadata.gz: 95f93dc55fac59b9e2dd7f42414030c02e308a0b740014046cf53e7e7edc40ef835e46e31bb7bdc613e0efd3a1a3f8e6ad13fc86d9e5093c0ce689319a7904a6
7
+ data.tar.gz: f110ba05a8665ebb988c4c3f0832af0bfc0f4ed15d76e3cd14dfaa8c93fd4755fd7e0b4e6b3ef048ca375ff2978b6edb30243c9c143312dec7e9808d07958682
@@ -6,7 +6,7 @@ module Mongoid
6
6
  module Elasticsearch
7
7
  module Utils
8
8
  def clean(s)
9
- s.to_s.gsub(/\P{Word}+/, ' ').gsub(/ +/, '').strip
9
+ s.to_s.gsub(/\P{Word}+/, ' ').gsub(/ +/, ' ').strip
10
10
  end
11
11
 
12
12
  extend self
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Elasticsearch
3
- VERSION = "0.3.6"
3
+ VERSION = "0.3.7"
4
4
  end
5
5
  end
@@ -359,4 +359,10 @@ describe 'utils' do
359
359
  it 'doesnt strip non-ascii text' do
360
360
  Mongoid::Elasticsearch::Utils.clean('тест {{').should eq 'тест'
361
361
  end
362
+ it 'doesnt strip good white space' do
363
+ Mongoid::Elasticsearch::Utils.clean('test test').should eq 'test test'
364
+ end
365
+ it 'strip extra white space' do
366
+ Mongoid::Elasticsearch::Utils.clean(' test test ').should eq 'test test'
367
+ end
362
368
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-11 00:00:00.000000000 Z
11
+ date: 2013-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid