governor_comments 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ./
3
3
  specs:
4
- governor_comments (0.2.1)
4
+ governor_comments (0.2.2)
5
5
  governor (>= 0.5.0)
6
6
  rails (~> 3.0.5)
7
7
 
@@ -52,8 +52,8 @@ GEM
52
52
  factory_girl (~> 2.0.0.beta)
53
53
  rails (>= 3.0.0)
54
54
  git (1.2.5)
55
- governor (0.5.2)
56
- rails (~> 3.0.5)
55
+ governor (0.5.7)
56
+ rails (>= 3.0.5)
57
57
  i18n (0.5.0)
58
58
  jeweler (1.5.2)
59
59
  bundler (~> 1.0.0)
data/README.rdoc CHANGED
@@ -19,9 +19,9 @@ comment on your blog.
19
19
 
20
20
  == Setting Up
21
21
 
22
- First, install Governor[http://carpeliam.github.com/governor/]. Then, in
23
- your Gemfile, add the following:
22
+ In your Gemfile, add the following:
24
23
 
24
+ gem 'governor'
25
25
  gem 'governor_comments'
26
26
 
27
27
  Once you've installed the gem into your app, you need to run the generator:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{governor_comments}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
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-16}
13
13
  s.description = %q{Comments plugin for the Rails 3-based Governor blogging system.}
14
14
  s.email = %q{liam@carpeliam.com}
15
15
  s.extra_rdoc_files = [
@@ -43,9 +43,9 @@ Gem::Specification.new do |s|
43
43
  "lib/generators/governor/templates/migrations/create_comments.rb",
44
44
  "lib/generators/governor/templates/models/comment.rb",
45
45
  "lib/generators/governor/templates/models/guest.rb",
46
- "lib/governor/controllers/methods.rb",
47
46
  "lib/governor_comments.rb",
48
47
  "lib/governor_comments/comment.rb",
48
+ "lib/governor_comments/controllers/methods.rb",
49
49
  "lib/governor_comments/rails.rb",
50
50
  "script/rails",
51
51
  "spec/controllers/governor/articles_controller_spec.rb",
@@ -1,4 +1,4 @@
1
- require File.expand_path('../governor/controllers/methods.rb', __FILE__)
1
+ require 'governor_comments/controllers/methods'
2
2
  require 'governor_comments/comment'
3
3
  require 'governor_comments/rails'
4
4
 
@@ -15,6 +15,9 @@ comments.set_routes do
15
15
  end
16
16
  end
17
17
  end
18
+ comments.register_controller_callback do |controller|
19
+ controller.send :include, GovernorComments::Controllers::Methods
20
+ end
18
21
  comments.register_model_callback do |base|
19
22
  association = Comment.reflect_on_association(:resource)
20
23
  comment_args = (association.options[:polymorphic]) ? {:as => 'resource'} : {:foreign_key => 'resource_id'}
@@ -1,14 +1,14 @@
1
- module Governor
1
+ module GovernorComments
2
2
  module Controllers
3
3
  module Methods
4
4
  def edit_comments
5
- @comments = Comment.all(:include => [:resource, :commenter])
5
+ @comments = ::Comment.all(:include => [:resource, :commenter])
6
6
  end
7
7
  def update_comments
8
8
  action = params[:bulk_operation]
9
9
  ids = params[:comments].try(:keys) || []
10
10
  result = true
11
- Comment.all(:conditions => {:id => ids}).each do |comment|
11
+ ::Comment.all(:conditions => {:id => ids}).each do |comment|
12
12
  result &= comment.send(action)
13
13
  end
14
14
  redirect_to mapping.plural
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: ../..
10
10
  specs:
11
- governor_comments (0.2.1)
11
+ governor_comments (0.2.2)
12
12
  governor (>= 0.5.0)
13
13
  rails (~> 3.0.5)
14
14
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: governor_comments
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
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-16 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -275,9 +275,9 @@ files:
275
275
  - lib/generators/governor/templates/migrations/create_comments.rb
276
276
  - lib/generators/governor/templates/models/comment.rb
277
277
  - lib/generators/governor/templates/models/guest.rb
278
- - lib/governor/controllers/methods.rb
279
278
  - lib/governor_comments.rb
280
279
  - lib/governor_comments/comment.rb
280
+ - lib/governor_comments/controllers/methods.rb
281
281
  - lib/governor_comments/rails.rb
282
282
  - script/rails
283
283
  - spec/controllers/governor/articles_controller_spec.rb