Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from rafaelfranca/cleanup

Remove some unneeded files and dependencies
  • Loading branch information...
commit e427dce07b8bc10a3121ebabc6a7dcf786d425af 2 parents e84ff82 + ad89a7b
David Heinemeier Hansson dhh authored
15 Gemfile.lock
View
@@ -3,8 +3,6 @@ PATH
specs:
routing_concerns (0.1.0)
actionpack (>= 3.2.0)
- activemodel (>= 3.2.0)
- railties (>= 3.2.0)
GEM
remote: http://rubygems.org/
@@ -30,30 +28,17 @@ GEM
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
- json (1.7.3)
multi_json (1.3.6)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
- rack-ssl (1.3.2)
- rack
rack-test (0.6.1)
rack (>= 1.0)
- railties (3.2.6)
- actionpack (= 3.2.6)
- activesupport (= 3.2.6)
- rack-ssl (~> 1.3.2)
- rake (>= 0.8.7)
- rdoc (~> 3.4)
- thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
- rdoc (3.12)
- json (~> 1.4)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- thor (0.15.3)
tilt (1.3.3)
PLATFORMS
6 lib/action_dispatch/routing/concerns.rb
View
@@ -5,7 +5,7 @@ def concern(name, &block)
@concerns ||= {}
@concerns[name] = block
end
-
+
def concerns(*names)
Array(names).flatten.compact.each do |name|
if @concerns && concern = @concerns[name]
@@ -19,12 +19,12 @@ def concerns(*names)
module ActionDispatch::Routing::Mapper::ResourcesWithConcerns
extend ActiveSupport::Concern
-
+
included do
alias_method_chain :resource, :concerns
alias_method_chain :resources, :concerns
end
-
+
def resource_with_concerns(*resources, &block)
if (options_with_concerns = resources.last).is_a?(Hash)
named_concerns = options_with_concerns[:concerns]
16 lib/active_model/forbidden_attributes_protection.rb
View
@@ -1,16 +0,0 @@
-module ActiveModel
- class ForbiddenAttributes < StandardError
- end
-
- module ForbiddenAttributesProtection
- def sanitize_for_mass_assignment(new_attributes, options = {})
- if !new_attributes.respond_to?(:permitted?) || (new_attributes.respond_to?(:permitted?) && new_attributes.permitted?)
- super
- else
- raise ActiveModel::ForbiddenAttributes
- end
- end
- end
-end
-
-ActiveModel.autoload :ForbiddenAttributesProtection
1  lib/routing_concerns.rb
View
@@ -1,2 +1 @@
require 'action_dispatch/routing/concerns'
-require 'routing_concerns/railtie'
1  lib/routing_concerns/railtie.rb
View
@@ -1 +0,0 @@
-require 'rails/railtie'
2  routing_concerns.gemspec
View
@@ -15,8 +15,6 @@ Gem::Specification.new do |s|
s.test_files = Dir["test/**/*"]
s.add_dependency "actionpack", ">= 3.2.0"
- s.add_dependency "activemodel", ">= 3.2.0"
- s.add_dependency "railties", ">= 3.2.0"
s.add_development_dependency "rake"
end
Please sign in to comment.
Something went wrong with that request. Please try again.