lunar 0.2.2 → 0.2.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/lib/lunar/words.rb CHANGED
@@ -15,7 +15,7 @@ module Lunar
15
15
  private
16
16
  def sanitize(str)
17
17
  Iconv.iconv('UTF-8//IGNORE', 'UTF-8', str)[0].to_s.
18
- gsub(/[^a-zA-Z0-9\-_]/, '')
18
+ gsub(/[^a-zA-Z0-9\-_]/, '').downcase
19
19
  end
20
20
  end
21
21
  end
data/lunar.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lunar}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Cyril David"]
@@ -115,6 +115,13 @@ class LunarSearchTest < Test::Unit::TestCase
115
115
  assert items.map(&:id).include?('1003')
116
116
  end
117
117
 
118
+ should "be able to search by name: 'IPHONE'" do
119
+ items = Lunar.search(Item, 'IPHONE')
120
+
121
+ assert items.map(&:id).include?('1001')
122
+ assert items.map(&:id).include?('1002')
123
+ assert items.map(&:id).include?('1003')
124
+ end
118
125
 
119
126
  should "be able to search by name: 'iphone' desc: 'iphone'" do
120
127
  items = Lunar.search(Item, :name => 'iphone', :desc => 'iphone')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Cyril David