constantrecord 0.1.1 → 0.1.2

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/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('constantrecord', '0.1.1') do |p|
6
+ Echoe.new('constantrecord', '0.1.2') do |p|
7
7
  p.description = "A tiny ActiveRecord substitute for small, never changing database tables."
8
8
  p.url = "http://github.com/ChristophPetschnig/constantrecord"
9
9
  p.author = "Christoph Petschnig"
@@ -2,27 +2,26 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{constantrecord}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Christoph Petschnig"]
9
- s.date = %q{2009-10-21}
9
+ s.date = %q{2010-03-19}
10
10
  s.description = %q{A tiny ActiveRecord substitute for small, never changing database tables.}
11
11
  s.email = %q{info@purevirtual.de}
12
12
  s.extra_rdoc_files = ["lib/constantrecord.rb", "README.rdoc"]
13
13
  s.files = ["constantrecord.gemspec", "lib/constantrecord.rb", "test/constantrecord_test.rb", "Manifest", "Rakefile", "README.rdoc"]
14
- s.has_rdoc = true
15
14
  s.homepage = %q{http://github.com/ChristophPetschnig/constantrecord}
16
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Constantrecord", "--main", "README.rdoc"]
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = %q{constantrecord}
19
- s.rubygems_version = %q{1.3.1}
18
+ s.rubygems_version = %q{1.3.6}
20
19
  s.summary = %q{A tiny ActiveRecord substitute for small, never changing database tables.}
21
20
  s.test_files = ["test/constantrecord_test.rb"]
22
21
 
23
22
  if s.respond_to? :specification_version then
24
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 2
24
+ s.specification_version = 3
26
25
 
27
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
27
  else
@@ -143,6 +143,11 @@ module ConstantRecord #:nodoc:
143
143
  raise "#{self}.find failed!\nArguments: #{args.inspect}"
144
144
  end
145
145
 
146
+ # shortcut to #find(:all)
147
+ def self.all
148
+ find_all
149
+ end
150
+
146
151
  # Implement +count+. Warning: <tt>:conditions</tt> are not supported!
147
152
  def self.count(*args)
148
153
  selector = args[0] || :all
@@ -98,4 +98,8 @@ class TestConstantRecord < Test::Unit::TestCase
98
98
  assert_equal [['*Sgt. Pepper*', 1], ['*Magical Mystery Tour*', 2], ['*Abbey Road*', 3]],
99
99
  SimpleClass2.options_for_select(:display => Proc.new{|obj| "*#{obj.album}*"})
100
100
  end
101
+
102
+ def test_all_shortcut
103
+ assert_equal SimpleClass.find(:all).collect{|o| o.name}, SimpleClass.all.collect{|o| o.name}
104
+ end
101
105
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constantrecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Christoph Petschnig
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-10-21 00:00:00 +02:00
17
+ date: 2010-03-19 00:00:00 +01:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -31,6 +36,8 @@ files:
31
36
  - README.rdoc
32
37
  has_rdoc: true
33
38
  homepage: http://github.com/ChristophPetschnig/constantrecord
39
+ licenses: []
40
+
34
41
  post_install_message:
35
42
  rdoc_options:
36
43
  - --line-numbers
@@ -45,20 +52,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
52
  requirements:
46
53
  - - ">="
47
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
48
57
  version: "0"
49
- version:
50
58
  required_rubygems_version: !ruby/object:Gem::Requirement
51
59
  requirements:
52
60
  - - ">="
53
61
  - !ruby/object:Gem::Version
62
+ segments:
63
+ - 1
64
+ - 2
54
65
  version: "1.2"
55
- version:
56
66
  requirements: []
57
67
 
58
68
  rubyforge_project: constantrecord
59
- rubygems_version: 1.3.1
69
+ rubygems_version: 1.3.6
60
70
  signing_key:
61
- specification_version: 2
71
+ specification_version: 3
62
72
  summary: A tiny ActiveRecord substitute for small, never changing database tables.
63
73
  test_files:
64
74
  - test/constantrecord_test.rb