pivotal-erector 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 6
4
- :patch: 6
5
-
4
+ :patch: 7
@@ -128,11 +128,10 @@ module Erector
128
128
  protected
129
129
  def self.get_needs
130
130
  @needs ||= []
131
- parent = self.ancestors[1]
132
- if parent.respond_to? :get_needs
133
- parent.get_needs + @needs
134
- else
135
- @needs
131
+
132
+ ancestors[1..-1].inject(@needs.dup) do |needs, ancestor|
133
+ needs.push(*ancestor.get_needs) if ancestor.respond_to?(:get_needs)
134
+ needs
136
135
  end
137
136
  end
138
137
 
@@ -711,7 +711,7 @@ module WidgetSpec
711
711
  end
712
712
 
713
713
 
714
- describe "when declaring parameters with the 'needs' macro" do
714
+ context "when declaring parameters with the 'needs' macro" do
715
715
  it "doesn't complain if there aren't any needs declared" do
716
716
  class Thing1 < Erector::Widget
717
717
  end
@@ -796,12 +796,16 @@ module WidgetSpec
796
796
  }.should_not raise_error
797
797
  end
798
798
 
799
- it "accumulates needs across the inheritance chain" do
799
+ it "accumulates needs across the inheritance chain even with modules mixed in" do
800
+ module Something
801
+ end
802
+
800
803
  class Vehicle < Erector::Widget
801
804
  needs :wheels
802
805
  end
803
806
 
804
807
  class Car < Vehicle
808
+ include Something
805
809
  needs :engine
806
810
  end
807
811
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-erector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Chaffee
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-05-25 00:00:00 -07:00
15
+ date: 2009-06-17 00:00:00 -07:00
16
16
  default_executable: erector
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -72,7 +72,7 @@ files:
72
72
  - spec/spec.opts
73
73
  - spec/spec_helper.rb
74
74
  - spec/spec_suite.rb
75
- has_rdoc: false
75
+ has_rdoc: true
76
76
  homepage: http://erector.rubyforge.org/
77
77
  post_install_message:
78
78
  rdoc_options:
@@ -96,23 +96,23 @@ requirements: []
96
96
  rubyforge_project:
97
97
  rubygems_version: 1.2.0
98
98
  signing_key:
99
- specification_version: 3
99
+ specification_version: 2
100
100
  summary: Html Builder library.
101
101
  test_files:
102
- - spec/core_spec_suite.rb
103
- - spec/erect
104
- - spec/erect/erect_rails_spec.rb
105
- - spec/erect/erect_spec.rb
106
- - spec/erect/erected_spec.rb
107
- - spec/erect/rhtml_parser_spec.rb
102
+ - spec/rails_spec_suite.rb
103
+ - spec/spec_suite.rb
108
104
  - spec/erector
109
105
  - spec/erector/indentation_spec.rb
110
- - spec/erector/mixin_spec.rb
111
106
  - spec/erector/unicode_builder_spec.rb
112
- - spec/erector/widget_spec.rb
113
107
  - spec/erector/widgets
114
108
  - spec/erector/widgets/table_spec.rb
115
- - spec/rails_spec_suite.rb
109
+ - spec/erector/mixin_spec.rb
110
+ - spec/erector/widget_spec.rb
111
+ - spec/erect
112
+ - spec/erect/erected_spec.rb
113
+ - spec/erect/erect_rails_spec.rb
114
+ - spec/erect/rhtml_parser_spec.rb
115
+ - spec/erect/erect_spec.rb
116
116
  - spec/spec.opts
117
117
  - spec/spec_helper.rb
118
- - spec/spec_suite.rb
118
+ - spec/core_spec_suite.rb