From f6efd8d3ce1642eca13906e1a744d6e37b8c0df6 Mon Sep 17 00:00:00 2001 From: Rada Bogdan Raul Date: Mon, 20 Jun 2016 11:28:41 +0300 Subject: [PATCH] remove useless method_source gem dependency --- lib/washout_builder.rb | 6 ++---- lib/washout_builder/version.rb | 2 +- washout_builder.gemspec | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/washout_builder.rb b/lib/washout_builder.rb index 042c02a..dc0484c 100644 --- a/lib/washout_builder.rb +++ b/lib/washout_builder.rb @@ -15,11 +15,9 @@ def wash_out(controller_name, options={}) options = options.symbolize_keys if options.is_a?(Hash) if @scope scope_frame = @scope.respond_to?(:frame) ? @scope.frame : @scope + # needed for backward compatibility with old version when this module name was camelized + options[:module] = options[:module].to_s.underscore if options[:module].present? options.each { |key, value| scope_frame[key] = value } - scope_frame[:module] = scope_frame[:module].blank? ? nil : scope_frame[:module].to_s.underscore - if self.class.instance_method(:original_wash_out).source.to_s.include?("scope_frame[:module]") - options.delete(:module) if options.has_key?(:module) # prevent setting the module again in original_wash_out since scope already has it - end controller_class_name = [scope_frame[:module], controller_name].compact.join("/").underscore else controller_class_name = controller_name.to_s.underscore diff --git a/lib/washout_builder/version.rb b/lib/washout_builder/version.rb index 6d266fe..597e74a 100644 --- a/lib/washout_builder/version.rb +++ b/lib/washout_builder/version.rb @@ -12,7 +12,7 @@ module VERSION # the minor version of the gem MINOR = 4 # the tiny version of the gem - TINY = 2 + TINY = 3 # if the version should be a e PRE = nil diff --git a/washout_builder.gemspec b/washout_builder.gemspec index 7e6d41e..58a329a 100644 --- a/washout_builder.gemspec +++ b/washout_builder.gemspec @@ -17,7 +17,6 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_runtime_dependency 'wash_out', '>= 0.9.1', '>= 0.9.1' s.add_runtime_dependency 'activesupport', '>= 4.0', '>= 4.0' - s.add_runtime_dependency 'method_source', '~> 0.8', '>= 0.8.2' s.add_development_dependency 'wasabi', '~> 3.5', '>= 3.5' s.add_development_dependency 'savon', '~> 2.11', '>= 2.11'