origin 1.0.9 → 1.0.10

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.
@@ -6,6 +6,14 @@
6
6
 
7
7
  ### Resolved Issues
8
8
 
9
+ ## 1.0.10
10
+
11
+ ### Resolved Issues
12
+
13
+ * \#51 hash equality works corectly with `Origin::Key`s (Gerad Suyderhoud)
14
+
15
+ { :foo.all => [1, 2] } == { :foo.all => [1, 2] } #=> true
16
+
9
17
  ## 1.0.9
10
18
 
11
19
  ### Resolved Issues
@@ -16,6 +16,7 @@ module Origin
16
16
  #
17
17
  # @example Is the key equal to another?
18
18
  # key == other
19
+ # key.eql? other
19
20
  #
20
21
  # @param [ Object ] other The object to compare to.
21
22
  #
@@ -26,6 +27,16 @@ module Origin
26
27
  return false unless other.is_a?(Key)
27
28
  name == other.name && operator == other.operator && expanded == other.expanded
28
29
  end
30
+ alias :eql? :==
31
+
32
+ # Calculate the hash code for a key.
33
+ #
34
+ # @return [ Fixnum ] The hash code for the key.
35
+ #
36
+ # @since 1.1.0
37
+ def hash
38
+ [name, operator, expanded].hash
39
+ end
29
40
 
30
41
  # Instantiate the new key.
31
42
  #
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Origin
3
- VERSION = "1.0.9"
3
+ VERSION = "1.0.10"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
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-09-22 00:00:00.000000000 Z
12
+ date: 2012-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: 1767126872631308027
148
+ hash: 2691554022904402478
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements: