r3_plugin_toolbox 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.11
1
+ 0.3.12
@@ -14,10 +14,10 @@ module Rails3
14
14
  end
15
15
  end
16
16
 
17
- def with_engine name, &block
18
- Rails3::Engine.new name do |e|
19
- yield e
20
- end
17
+ def with_configuration &block
18
+ if block
19
+ block.arity < 1 ? Rails.configuration.instance_eval(&block) : block.call(Rails.configuration)
20
+ end
21
21
  end
22
22
 
23
23
  def with_extension &block
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{r3_plugin_toolbox}
8
- s.version = "0.3.11"
8
+ s.version = "0.3.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
@@ -35,7 +35,7 @@ describe Rails3::Plugin::Extender do
35
35
  describe '#extend_rails' do
36
36
 
37
37
  before :each do
38
- with_extension do
38
+ with_extension do
39
39
  extend_rails :view do
40
40
  extend_from_module Helper::View, :panel, :window
41
41
  extend_with Helper::View::Button, Helper::View::Form
@@ -45,6 +45,15 @@ describe Rails3::Plugin::Extender do
45
45
  extend_from_module Helper::View, :panel
46
46
  end
47
47
  end
48
+
49
+ with_configuration do |c|
50
+ c.greeting = 'hello'
51
+ end
52
+
53
+ with_configuration do
54
+ greeting = 'hello'
55
+ say = 'max'
56
+ end
48
57
  end
49
58
 
50
59
  it "should extend Action View" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 11
9
- version: 0.3.11
8
+ - 12
9
+ version: 0.3.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup