diff --git a/Gemfile b/Gemfile index 533c2e6..a1b93f3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,3 @@ source :rubygems gemspec - -gem "actionpack", "~> 3.2.0" -gem "activesupport", "~> 3.2.0" - -if RUBY_VERSION < "1.9" - gem "ruby-debug" -else - gem "test-unit" -end - -gem "mocha" \ No newline at end of file diff --git a/has_scope.gemspec b/has_scope.gemspec index 96ac2c1..34241a1 100644 --- a/has_scope.gemspec +++ b/has_scope.gemspec @@ -24,4 +24,15 @@ Gem::Specification.new do |s| s.extra_rdoc_files = [ "README.md" ] -end \ No newline at end of file + + s.add_runtime_dependency "actionpack", "~> 3.2.0" + s.add_runtime_dependency "activesupport", "~> 3.2.0" + s.add_development_dependency "mocha", "~> 0.12.0" + s.add_development_dependency "rake" + if RUBY_VERSION < "1.9" + s.add_development_dependency "rdoc" + s.add_development_dependency "ruby-debug" + else + s.add_development_dependency "test-unit" + end +end diff --git a/lib/has_scope.rb b/lib/has_scope.rb index 167dadc..a0be299 100644 --- a/lib/has_scope.rb +++ b/lib/has_scope.rb @@ -181,7 +181,7 @@ def current_scopes end end -ActionController::Base.instance_eval do +ActiveSupport.on_load :action_controller do include HasScope helper_method :current_scopes end