constantrecord 0.3.2 → 0.3.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.
@@ -2,7 +2,12 @@
2
2
 
3
3
  A tiny ActiveRecord substitute for small, never changing database tables.
4
4
 
5
- *** Works with Rails 2 and Rails 3! ***
5
+ *** Works with Rails 2 and Rails 3.0, but not with Rails 3.1 and above! ***
6
+
7
+ To get this gem working with the new versions of Rails (which means integration
8
+ into the ARel mechanism), a complete rewrite would be necessary. Apologies, but
9
+ please understand that I don't find the time for this. Thanks!
10
+
6
11
 
7
12
  == Usage
8
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{constantrecord}
8
- s.version = "0.3.2"
7
+ s.name = "constantrecord"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Petschnig"]
12
- s.date = %q{2011-01-24}
13
- s.description = %q{A tiny ActiveRecord substitute for small, never changing database tables.}
14
- s.email = %q{info@purevirtual.de}
12
+ s.date = "2012-09-02"
13
+ s.description = "A tiny ActiveRecord substitute for small, never changing database tables."
14
+ s.email = "info@purevirtual.de"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
@@ -29,14 +29,10 @@ Gem::Specification.new do |s|
29
29
  "test/helper.rb",
30
30
  "test/test_constantrecord.rb"
31
31
  ]
32
- s.homepage = %q{http://github.com/cpetschnig/constantrecord}
32
+ s.homepage = "http://github.com/cpetschnig/constantrecord"
33
33
  s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.4.2}
35
- s.summary = %q{A tiny ActiveRecord substitute for small, never changing database tables.}
36
- s.test_files = [
37
- "test/helper.rb",
38
- "test/test_constantrecord.rb"
39
- ]
34
+ s.rubygems_version = "1.8.24"
35
+ s.summary = "A tiny ActiveRecord substitute for small, never changing database tables."
40
36
 
41
37
  if s.respond_to? :specification_version then
42
38
  s.specification_version = 3
@@ -212,6 +212,19 @@ module ConstantRecord #:nodoc:
212
212
  result
213
213
  end
214
214
 
215
+ # Returns true if the +comparison_object+ is the same object, or is of the same type and has the same id.
216
+ def ==(comparison_object)
217
+ comparison_object.equal?(self) ||
218
+ (comparison_object.instance_of?(self.class) &&
219
+ comparison_object.id == id &&
220
+ !comparison_object.new_record?)
221
+ end
222
+
223
+ # Delegates to ==
224
+ def eql?(comparison_object)
225
+ self == (comparison_object)
226
+ end
227
+
215
228
  # Handle +find_by_xxx+ calls on the class
216
229
  def self.method_missing(symbol, *args) #:nodoc:
217
230
  if /^find_by_([_a-zA-Z]\w*)$/ =~ (symbol.to_s)
metadata CHANGED
@@ -1,34 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: constantrecord
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Christoph Petschnig
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-01-24 00:00:00 +01:00
19
- default_executable:
12
+ date: 2012-09-02 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
14
  description: A tiny ActiveRecord substitute for small, never changing database tables.
23
15
  email: info@purevirtual.de
24
16
  executables: []
25
-
26
17
  extensions: []
27
-
28
- extra_rdoc_files:
18
+ extra_rdoc_files:
29
19
  - LICENSE
30
20
  - README.rdoc
31
- files:
21
+ files:
32
22
  - LICENSE
33
23
  - README.rdoc
34
24
  - Rakefile
@@ -40,40 +30,28 @@ files:
40
30
  - samples/us_state.rb
41
31
  - test/helper.rb
42
32
  - test/test_constantrecord.rb
43
- has_rdoc: true
44
33
  homepage: http://github.com/cpetschnig/constantrecord
45
34
  licenses: []
46
-
47
35
  post_install_message:
48
36
  rdoc_options: []
49
-
50
- require_paths:
37
+ require_paths:
51
38
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
39
+ required_ruby_version: !ruby/object:Gem::Requirement
53
40
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
46
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
- version: "0"
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
70
51
  requirements: []
71
-
72
52
  rubyforge_project:
73
- rubygems_version: 1.4.2
53
+ rubygems_version: 1.8.24
74
54
  signing_key:
75
55
  specification_version: 3
76
56
  summary: A tiny ActiveRecord substitute for small, never changing database tables.
77
- test_files:
78
- - test/helper.rb
79
- - test/test_constantrecord.rb
57
+ test_files: []