Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating ActiveSupport patching to use #on_load; moved gem dependencies to gemspec. #31

Merged
merged 5 commits into from
Nov 24, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 12 additions & 1 deletion has_scope.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = [
"README.md"
]
end

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
2 changes: 1 addition & 1 deletion lib/has_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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