governor 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ./
3
3
  specs:
4
- governor (0.5.2)
4
+ governor (0.5.3)
5
5
  rails (~> 3.0.5)
6
6
 
7
7
  GEM
@@ -89,7 +89,7 @@ GEM
89
89
  rspec-core (~> 2.5.0)
90
90
  rspec-expectations (~> 2.5.0)
91
91
  rspec-mocks (~> 2.5.0)
92
- rspec-core (2.5.1)
92
+ rspec-core (2.5.2)
93
93
  rspec-expectations (2.5.0)
94
94
  diff-lcs (~> 1.1.2)
95
95
  rspec-mocks (2.5.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{governor}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Liam Morley"]
12
- s.date = %q{2011-05-08}
12
+ s.date = %q{2011-05-12}
13
13
  s.description = %q{Because Blogojevich would be too tough to remember. It's a pluggable blogging system for Rails 3.}
14
14
  s.email = %q{liam@carpeliam.com}
15
15
  s.extra_rdoc_files = [
@@ -1,7 +1,11 @@
1
1
  module Governor
2
2
  module Controllers
3
3
  module Methods
4
-
4
+ def self.included(base) #:nodoc:
5
+ Governor::PluginManager.plugins.each do |plugin|
6
+ plugin.include_in_controller(base)
7
+ end
8
+ end
5
9
  end
6
10
  end
7
11
  end
@@ -54,6 +54,10 @@ module Governor
54
54
  instance_exec(base, &@model_callback) if @model_callback
55
55
  end
56
56
 
57
+ def include_in_controller(base) #:nodoc:
58
+ instance_exec(base, &@controller_callback) if @controller_callback
59
+ end
60
+
57
61
  # Evaluates the block in the scope of the model. This is the equivalent of
58
62
  # creating a mixin, including it within your article class and
59
63
  # implementing +self.included+.
@@ -74,6 +78,10 @@ module Governor
74
78
  @model_callback = block
75
79
  end
76
80
 
81
+ def register_controller_callback(&block)
82
+ @controller_callback = block
83
+ end
84
+
77
85
  # Defines mime types that this plugin responds to. These mime types will
78
86
  # be passed on to the controller.
79
87
  #
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- governor (0.5.2)
4
+ governor (0.5.3)
5
5
  rails (~> 3.0.5)
6
6
 
7
7
  GEM
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: governor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Liam Morley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-08 00:00:00 -04:00
18
+ date: 2011-05-12 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency