elastic_record 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'elastic_record'
5
- s.version = '0.10.0'
5
+ s.version = '0.10.1'
6
6
  s.summary = 'Use Elastic Search with your objects'
7
7
  s.description = 'Find your records with elastic search'
8
8
 
@@ -51,12 +51,7 @@ module ElasticRecord
51
51
  end
52
52
 
53
53
  def ==(other)
54
- case other
55
- when Relation
56
- other.as_elastic == as_elastic
57
- when Array
58
- to_a == other
59
- end
54
+ to_a == other
60
55
  end
61
56
 
62
57
  def inspect
@@ -51,10 +51,10 @@ class ElasticRecord::RelationTest < MiniTest::Spec
51
51
  def test_equal
52
52
  create_widgets [Widget.new(id: 5, color: 'red'), Widget.new(id: 10, color: 'blue')]
53
53
 
54
- assert(Widget.elastic_relation.filter(color: 'green') == Widget.elastic_relation.filter(color: 'green'))
55
- assert(Widget.elastic_relation.filter(color: 'green') != Widget.elastic_relation.filter(color: 'blue'))
56
-
57
- assert(Widget.elastic_relation.filter(color: 'magenta') == [])
54
+ assert_equal Widget.elastic_relation.filter(color: 'red'), Widget.elastic_relation.filter(color: 'red')
55
+ refute_equal Widget.elastic_relation.filter(color: 'red'), Widget.elastic_relation.filter(color: 'blue')
56
+ assert_equal [], Widget.elastic_relation.filter(color: 'magenta')
57
+ assert_equal Widget.elastic_relation.filter(color: 'magenta'), []
58
58
  end
59
59
 
60
60
  def test_inspect
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-18 00:00:00.000000000 Z
12
+ date: 2012-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: arelastic