doodle 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == 0.1.1 / 2008-04-28
2
+ - changed name of #parent to #doodle_parent to avoid clash with
3
+ ActiveSupport (thanks to Ryan Garver for reporting this)
4
+
1
5
  == 0.1.0 / 2008-04-26
2
6
  - doodle's first beta version - the API should remain stable from now on
3
7
  - created a Google group: http://groups.google.com/group/ruby-doodle
@@ -15,13 +15,8 @@ class Child < Doodle
15
15
  # - can only be done in init block
16
16
  # - somewhat subtle difference (from programmer's point of
17
17
  # - view) between a proc and a block
18
-
19
- # Also note re: Doodle.parent - its value is only valid
20
- # during initialization - this is a way to capture that
21
- # value for ues later
22
-
23
18
  init do
24
- parent
19
+ doodle_parent
25
20
  end
26
21
  end
27
22
  end
@@ -235,7 +235,7 @@ class Doodle
235
235
  attr_accessor :validation_on
236
236
  attr_accessor :arg_order
237
237
  attr_accessor :errors
238
- attr_accessor :parent
238
+ attr_accessor :doodle_parent
239
239
 
240
240
  def initialize(object)
241
241
  @local_attributes = OrderedHash.new
@@ -244,7 +244,7 @@ class Doodle
244
244
  @local_conversions = {}
245
245
  @arg_order = []
246
246
  @errors = []
247
- @parent = nil
247
+ @doodle_parent = nil
248
248
  end
249
249
  real_inspect = Object.instance_method(:inspect)
250
250
  define_method :real_inspect do
@@ -831,8 +831,9 @@ class Doodle
831
831
  #private :initialize_from_hash
832
832
 
833
833
  # return containing object (set during initialization)
834
- def parent
835
- __doodle__.parent
834
+ # (named doodle_parent to avoid clash with ActiveSupport)
835
+ def doodle_parent
836
+ __doodle__.doodle_parent
836
837
  end
837
838
 
838
839
  # object can be initialized from a mixture of positional arguments,
@@ -843,7 +844,7 @@ class Doodle
843
844
  super
844
845
  end
845
846
  __doodle__.validation_on = true
846
- __doodle__.parent = Doodle.context[-1]
847
+ __doodle__.doodle_parent = Doodle.context[-1]
847
848
  Doodle.context.push(self)
848
849
  defer_validation do
849
850
  initialize_from_hash(*args)
@@ -2,7 +2,7 @@ class Doodle #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -20,7 +20,7 @@ describe Doodle, "doodle_context" do
20
20
  # during initialization - this is a way to capture that
21
21
  # value for ues later
22
22
 
23
- init { parent }
23
+ init { doodle_parent }
24
24
  end
25
25
  end
26
26
 
@@ -38,7 +38,7 @@ describe Doodle, "doodle_context" do
38
38
 
39
39
  sean = dad.children[0]
40
40
  sean.dad.name.should == 'Conn'
41
- sean.parent.name.should == 'Conn'
41
+ sean.doodle_parent.name.should == 'Conn'
42
42
  end
43
43
  end
44
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doodle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean O'Halpin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-26 00:00:00 +01:00
12
+ date: 2008-04-28 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15