rufus-doric 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = rufus-doric CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-doric - 0.1.6 released 2010/04/14
6
+
7
+ - property :sold, :default => false was not working. Fixed.
8
+
9
+
5
10
  == rufus-doric - 0.1.5 released 2010/04/12
6
11
 
7
12
  - implemented property :x, :default => 'y'
@@ -89,7 +89,7 @@ module Doric
89
89
 
90
90
  name = name.to_s
91
91
 
92
- (@defaults ||= {})[name] = default if default
92
+ (@defaults ||= {})[name] = default unless default.nil?
93
93
 
94
94
  define_method("#{name}=") do |v|
95
95
  @h[name] = v
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Rufus
3
3
  module Doric
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
6
6
  end
7
7
 
data/rufus-doric.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-doric}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux"]
12
- s.date = %q{2010-04-12}
12
+ s.date = %q{2010-04-14}
13
13
  s.description = %q{
14
14
  something at the intersection of Rails3, CouchDB and rufus-jig
15
15
  }
@@ -19,6 +19,7 @@ class Can < Rufus::Doric::Model
19
19
  h_accessor :serial
20
20
  h_accessor :content, :default => 'tuna'
21
21
  h_accessor :colour
22
+ property :sold, :default => false
22
23
  end
23
24
 
24
25
 
@@ -42,11 +43,12 @@ class UtModelDefaultTest < Test::Unit::TestCase
42
43
  Can.new(:serial => 'abcd', :content => 'anchovy').save!
43
44
  Can.new(:serial => 'efgh').save!
44
45
 
45
- assert_equal({ 'content' => 'tuna' }, Can.defaults)
46
+ assert_equal({ 'content' => 'tuna', 'sold' => false }, Can.defaults)
46
47
 
47
48
  assert_equal 'anchovy', Can.find('abcd').content
48
49
  assert_equal 'tuna', Can.find('efgh').content
49
50
  assert_equal nil, Can.find('abcd').colour
51
+ assert_equal false, Can.find('abcd').sold
50
52
  end
51
53
  end
52
54
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 5
9
- version: 0.1.5
8
+ - 6
9
+ version: 0.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-12 00:00:00 +09:00
17
+ date: 2010-04-14 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency