Commit 0caccf14 by Cuong Tran

Merge pull request #303 from amatsuda/wanings

Fix ruby wanings
parents 056fd421 2a073c8f
...@@ -7,7 +7,7 @@ begin ...@@ -7,7 +7,7 @@ begin
# ActiveSupport 3.x... # ActiveSupport 3.x...
require 'active_support/hash_with_indifferent_access' require 'active_support/hash_with_indifferent_access'
require 'active_support/core_ext/object/blank' require 'active_support/core_ext/object/blank'
rescue Exception => e rescue Exception
# ActiveSupport 2.x... # ActiveSupport 2.x...
require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/blank' require 'active_support/core_ext/blank'
...@@ -140,7 +140,7 @@ module Annotate ...@@ -140,7 +140,7 @@ module Annotate
def self.bootstrap_rake def self.bootstrap_rake
begin begin
require 'rake/dsl_definition' require 'rake/dsl_definition'
rescue Exception => e rescue Exception
# We might just be on an old version of Rake... # We might just be on an old version of Rake...
end end
require 'rake' require 'rake'
......
...@@ -418,8 +418,8 @@ module AnnotateModels ...@@ -418,8 +418,8 @@ module AnnotateModels
unless options[exclusion_key] unless options[exclusion_key]
did_annotate = self.get_patterns(key). did_annotate = self.get_patterns(key).
map { |file| resolve_filename(file, model_name, table_name) }. map { |f| resolve_filename(f, model_name, table_name) }.
map { |file| annotate_one_file(file, info, position_key, options_with_position(options, position_key)) }. map { |f| annotate_one_file(f, info, position_key, options_with_position(options, position_key)) }.
detect { |result| result } || did_annotate detect { |result| result } || did_annotate
end end
end end
...@@ -567,10 +567,10 @@ module AnnotateModels ...@@ -567,10 +567,10 @@ module AnnotateModels
deannotated_klass = true if(remove_annotation_of_file(model_file_name)) deannotated_klass = true if(remove_annotation_of_file(model_file_name))
get_patterns. get_patterns.
map { |file| resolve_filename(file, model_name, table_name) }. map { |f| resolve_filename(f, model_name, table_name) }.
each do |file| each do |f|
if File.exist?(file) if File.exist?(f)
remove_annotation_of_file(file) remove_annotation_of_file(f)
deannotated_klass = true deannotated_klass = true
end end
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