plucky 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require 'set'
2
3
  require 'mongo'
3
4
  require 'plucky/extensions'
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module Plucky
2
3
  class CriteriaHash
3
4
  attr_reader :source
@@ -1,9 +1,24 @@
1
+ # encoding: UTF-8
1
2
  class SymbolOperator
3
+ include Comparable
4
+
2
5
  attr_reader :field, :operator
3
6
 
4
7
  def initialize(field, operator, options={})
5
8
  @field, @operator = field, operator
6
9
  end unless method_defined?(:initialize)
10
+
11
+ def <=>(other)
12
+ if field == other.field
13
+ operator <=> other.operator
14
+ else
15
+ field.to_s <=> other.field.to_s
16
+ end
17
+ end
18
+
19
+ def ==(other)
20
+ field == other.field && operator == other.operator
21
+ end
7
22
  end
8
23
 
9
24
  class Symbol
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module Plucky
2
3
  class OptionsHash
3
4
  attr_reader :source
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module Plucky
2
3
  class Query
3
4
  OptionKeys = [
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module Plucky
2
- Version = '0.1.1'
3
+ Version = '0.1.2'
3
4
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Nunemaker
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-18 00:00:00 -04:00
17
+ date: 2010-05-19 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -27,7 +27,8 @@ dependencies:
27
27
  segments:
28
28
  - 1
29
29
  - 0
30
- version: "1.0"
30
+ - 1
31
+ version: 1.0.1
31
32
  type: :runtime
32
33
  version_requirements: *id001
33
34
  - !ruby/object:Gem::Dependency