Commit 0caccf14 by Cuong Tran

Merge pull request #303 from amatsuda/wanings

Fix ruby wanings
parents 056fd421 2a073c8f
......@@ -7,7 +7,7 @@ begin
# ActiveSupport 3.x...
require 'active_support/hash_with_indifferent_access'
require 'active_support/core_ext/object/blank'
rescue Exception => e
rescue Exception
# ActiveSupport 2.x...
require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/blank'
......@@ -140,7 +140,7 @@ module Annotate
def self.bootstrap_rake
begin
require 'rake/dsl_definition'
rescue Exception => e
rescue Exception
# We might just be on an old version of Rake...
end
require 'rake'
......
......@@ -418,8 +418,8 @@ module AnnotateModels
unless options[exclusion_key]
did_annotate = self.get_patterns(key).
map { |file| resolve_filename(file, model_name, table_name) }.
map { |file| annotate_one_file(file, info, position_key, options_with_position(options, position_key)) }.
map { |f| resolve_filename(f, model_name, table_name) }.
map { |f| annotate_one_file(f, info, position_key, options_with_position(options, position_key)) }.
detect { |result| result } || did_annotate
end
end
......@@ -567,10 +567,10 @@ module AnnotateModels
deannotated_klass = true if(remove_annotation_of_file(model_file_name))
get_patterns.
map { |file| resolve_filename(file, model_name, table_name) }.
each do |file|
if File.exist?(file)
remove_annotation_of_file(file)
map { |f| resolve_filename(f, model_name, table_name) }.
each do |f|
if File.exist?(f)
remove_annotation_of_file(f)
deannotated_klass = true
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment