dm-predefined 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ### 0.2.3 / 2010-04-01
2
+
3
+ * Store the predefined attributes in an instance variable in the Model.
4
+
1
5
  ### 0.2.2 / 2010-03-20
2
6
 
3
7
  * Switched to Jeweler for the building and releasing of RubyGems.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-predefined}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Postmodern"]
12
- s.date = %q{2010-03-20}
12
+ s.date = %q{2010-04-01}
13
13
  s.description = %q{A DataMapper plugin for adding predefined resources to Models.}
14
14
  s.email = %q{postmodern.mod3@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -81,8 +81,6 @@ module DataMapper
81
81
 
82
82
  protected
83
83
 
84
- @@predefined_attributes = {}
85
-
86
84
  #
87
85
  # All pre-defined resources of the model.
88
86
  #
@@ -90,7 +88,7 @@ module DataMapper
90
88
  # The Hash of pre-defined resources and their attributes.
91
89
  #
92
90
  def predefined_attributes
93
- @@predefined_attributes
91
+ @predefined_attributes ||= {}
94
92
  end
95
93
 
96
94
  #
@@ -1,6 +1,6 @@
1
1
  module DataMapper
2
2
  module Predefined
3
3
  # The version of dm-predefined
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
6
6
  end
@@ -7,6 +7,10 @@ if (HAS_SQLITE3 || HAS_MYSQL || HAS_POSTGRES)
7
7
  TestModel.auto_migrate!
8
8
  end
9
9
 
10
+ it "should define the @predefined_attributes instance variable" do
11
+ TestModel.instance_variables.should include('@predefined_attributes')
12
+ end
13
+
10
14
  it "should provide the names of all predefined resources of a Model" do
11
15
  TestModel.predefined_names.should =~ [:test1, :test2]
12
16
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Postmodern
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-20 00:00:00 -07:00
17
+ date: 2010-04-01 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency