Processed a total of 26964 significant (62490 raw) lines in 390 files
Found 2512 duplicate lines in 434 blocks in 155 files
Found 3 duplicate lines in the following files:
Between lines 1328 and 1331 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 1312 and 1315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 1212 and 1215 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 1195 and 1198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 1120 and 1123 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
val[0].push val[2]
val[0]
end
.,.,
Found 3 duplicate lines in the following files:
Between lines 8 and 11 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/transactions.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/layout.rb
Between lines 360 and 362 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/integration.rb
Between lines 196 and 198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
Between lines 66 and 68 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
Between lines 7 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
def self.included(base)
base.extend(ClassMethods)
base.class_eval do
Found 3 duplicate lines in the following files:
Between lines 71 and 77 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 37 and 43 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
)
end
def advance(options)
d = to_date.advance(options)
Found 3 duplicate lines in the following files:
Between lines 31 and 35 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
Between lines 62 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
merge_options_from_reflection!(options)
args << options
@reflection.klass.find(*args)
Found 3 duplicate lines in the following files:
Between lines 3 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/reflection.rb
Between lines 4 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/calculations.rb
Between lines 3 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/verification.rb
Between lines 605 and 609 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
Between lines 3 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
Found 3 duplicate lines in the following files:
Between lines 27 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/flash.rb
Between lines 38 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/components.rb
def self.included(base)
base.class_eval do
include InstanceMethods
Found 3 duplicate lines in the following files:
Between lines 545 and 548 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
Between lines 534 and 538 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
filter_chain.each_with_index do |f,i|
return i if f.after?
end
end
return -1
Found 3 duplicate lines in the following files:
Between lines 85 and 91 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 51 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
def ago(seconds)
self.since(-seconds)
end
def since(seconds)
Found 3 duplicate lines in the following files:
Between lines 212 and 216 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
Between lines 584 and 589 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
def rename_table(name, new_name)
execute "ALTER TABLE #{name} RENAME TO #{new_name}"
end
def add_column(table_name, column_name, type, options = {})
Found 3 duplicate lines in the following files:
Between lines 464 and 466 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
Between lines 458 and 460 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
create_action_options = action_options_for("create", resource)
map.connect(resource.path, create_action_options)
map.connect("#{resource.path}.:format", create_action_options)
Found 3 duplicate lines in the following files:
Between lines 8 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
Between lines 6 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/observer.rb
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
Found 3 duplicate lines in the following files:
Between lines 174 and 179 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 155 and 159 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
alias :at_beginning_of_month :beginning_of_month
def end_of_month
last_day = ::Time.days_in_month( self.month, self.year )
Found 3 duplicate lines in the following files:
Between lines 1355 and 1358 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 1295 and 1299 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
add_joins!(sql, options, scope)
end
add_conditions!(sql, options[:conditions], scope)
add_group!(sql, options[:group], scope)
Found 3 duplicate lines in the following files:
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb
module ActiveSupport
module CoreExtensions
module Integer
Found 3 duplicate lines in the following files:
Between lines 64 and 70 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
Between lines 52 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
def to_date
::Date.new(year, month, day)
end
def to_time
Found 3 duplicate lines in the following files:
Between lines 242 and 244 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Between lines 176 and 178 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Found 3 duplicate lines in the following files:
Between lines 625 and 629 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 593 and 597 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
else
puts "failed: #{uri.ljust(50)}"
end
end
Repositories.instance.save
Found 3 duplicate lines in the following files:
Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session_management.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
def self.included(base)
base.class_eval do
extend ClassMethods
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb
module ActiveSupport
module CoreExtensions
module String
Found 3 duplicate lines in the following files:
Between lines 135 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
Between lines 1189 and 1191 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 150 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/components.rb
Between lines 28 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
Found 3 duplicate lines in the following files:
Between lines 26 and 28 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
Between lines 15 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
target.class_eval <<-'end_eval'
def all_hashes
rows = []
Found 3 duplicate lines in the following files:
Between lines 14 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/query_cache.rb
Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/query_cache.rb
if ActiveRecord::Base.configurations.blank?
yield
else
Found 3 duplicate lines in the following files:
Between lines 31 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/simple_logger.rb
Between lines 20 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/simple_logger.rb
if block_given?
begin
block.call
ensure
Found 3 duplicate lines in the following files:
Between lines 568 and 570 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 154 and 156 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
if attributes.is_a?(Array)
attributes.collect { |attr| create(attr) }
else
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
module ActiveSupport
module CoreExtensions
module DateTime
Found 3 duplicate lines in the following files:
Between lines 1692 and 1694 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 1625 and 1627 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
klass.quote_value(parent.active_record.base_class.name)
]
else
Found 3 duplicate lines in the following files:
Between lines 393 and 398 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 369 and 376 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
matched = false
break
end
end
end
if matched
Found 3 duplicate lines in the following files:
Between lines 1229 and 1231 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
Between lines 1188 and 1190 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
protected :
end_eval
helpers << selector
Found 3 duplicate lines in the following files:
Between lines 72 and 74 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
Between lines 167 and 169 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
def construct_scope
create_scoping = {}
set_belongs_to_association_for(create_scoping)
Found 3 duplicate lines in the following files:
Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/scripts.rb
Between lines 85 and 90 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/base.rb
class Base
include Options
default_options :collision => :ask, :quiet => false
Found 3 duplicate lines in the following files:
Between lines 84 and 86 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
Between lines 68 and 70 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
[
/\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n,
/\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n,
Found 3 duplicate lines in the following files:
Between lines 122 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
Between lines 100 and 102 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
clean_backtrace do
opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first
tag = find_tag(opts)
Found 3 duplicate lines in the following files:
Between lines 313 and 315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/test_process.rb
Between lines 79 and 84 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb
Between lines 22 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb
def close
update
end
def delete
Found 3 duplicate lines in the following files:
Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/webrick.rb
Between lines 24 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
opts.on("-e", "--environment=name", String,
"Specifies the environment to run this server under (test/development/production).",
"Default: development") { |v| OPTIONS[:environment] = v }
Found 3 duplicate lines in the following files:
Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
Between lines 18 and 20 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
respond_to do |format|
format.html
format.xml { render :xml => @<%= file_name %> }
Found 3 duplicate lines in the following files:
Between lines 1 and 4 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
Between lines 6 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
class Object
def to_param
to_s
Found 3 duplicate lines in the following files:
Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Between lines 62 and 64 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
Between lines 35 and 37 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
Between lines 114 and 116 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
Found 3 duplicate lines in the following files:
Between lines 28 and 32 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
Between lines 43 and 47 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
Between lines 199 and 203 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
Between lines 142 and 146 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/reaper.rb
Between lines 61 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/inspector.rb
opts.separator ""
opts.on("-h", "--help", "Show this help message.") { puts opts; exit }
opts.parse!
Found 3 duplicate lines in the following files:
Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 7 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
module Calculations
def self.included(base)
base.extend ClassMethods
Found 3 duplicate lines in the following files:
Between lines 320 and 323 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
Between lines 223 and 226 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
options = sources.extract_options!.stringify_keys
cache = options.delete("cache")
if ActionController::Base.perform_caching && cache
Found 3 duplicate lines in the following files:
Between lines 78 and 576 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 9 and 111 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/aggregations.rb
instance_variable_set "@#{assoc.name}", nil
end unless self.new_record?
end
module ClassMethods
Found 3 duplicate lines in the following files:
Between lines 1986 and 1988 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 268 and 270 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
DELETE FROM
WHERE
end_sql
Found 3 duplicate lines in the following files:
Between lines 27 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
names.each do |name|
class_eval <<-EOS
def self.#{name}
Found 3 duplicate lines in the following files:
Between lines 78 and 80 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb
Between lines 258 and 260 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
Found 3 duplicate lines in the following files:
Between lines 669 and 671 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 665 and 667 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
17, 20, 22, nil, 23, 25, nil, 32, 29, 31,
nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
32, 29, 31, nil, nil, 16, 17, 20, 22, nil,
Found 3 duplicate lines in the following files:
Between lines 1705 and 1707 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 1605 and 1607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
" #{join_type} %s ON %s.%s = %s.%s " % [
table_name_and_alias,
connection.quote_table_name(aliased_table_name),
Found 3 duplicate lines in the following files:
Between lines 23 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
Between lines 139 and 142 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
Between lines 108 and 111 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/reaper.rb
Between lines 43 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/inspector.rb
opts.separator ""
opts.on <<-EOF
Description:
Found 3 duplicate lines in the following files:
Between lines 6 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 275 and 277 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
def self.included(base)
base.extend ClassMethods
base.class_eval do
Found 3 duplicate lines in the following files:
Between lines 361 and 363 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/integration.rb
Between lines 12 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
Between lines 9 and 13 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
base.extend(ClassMethods)
base.class_eval do
class << self
Found 3 duplicate lines in the following files:
Between lines 150 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
Between lines 137 and 139 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
Between lines 127 and 129 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
true
rescue LoadError
false
Found 3 duplicate lines in the following files:
Between lines 803 and 805 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 259 and 261 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
if alternates = second.instance_variable_get(:@alternates)
second.instance_variable_set(:@alternates, [])
@alternates.concat alternates
Found 3 duplicate lines in the following files:
Between lines 69 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
Between lines 52 and 55 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
Between lines 35 and 38 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
self.class.
end
" unless options[:instance_writer] == false }
EOS
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb
module ActiveSupport
module CoreExtensions
module Array
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb
module ActiveSupport
module CoreExtensions
module Date
Found 3 duplicate lines in the following files:
Between lines 315 and 317 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 296 and 298 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 277 and 279 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
second = next_selector(statement, values)
@depends = lambda do |element, first|
matches = []
Found 3 duplicate lines in the following files:
Between lines 605 and 607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
Between lines 576 and 578 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
value = x[key]
return array if value.instance_of?(Hash) || value.instance_of?(Array)
value = normalise_space(value) if @options['normalisespace'] == 1
Found 3 duplicate lines in the following files:
Between lines 86 and 88 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
self.class.module_eval do
define_method(:binary_to_string) do |value|
if value =~ /\\\d{3}/
Found 3 duplicate lines in the following files:
Between lines 849 and 852 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 844 and 847 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
" unless #{reflection.name}.nil?'"
)
module_eval(
Found 3 duplicate lines in the following files:
Between lines 187 and 189 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/deprecation.rb
Between lines 832 and 834 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/fixtures.rb
Between lines 514 and 516 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/test_process.rb
Between lines 63 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions.rb
Between lines 61 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb
module Test
module Unit
class TestCase
Found 3 duplicate lines in the following files:
Between lines 1027 and 1029 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 986 and 988 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
define_method(reflection.name) do |*params|
force_reload = params.first unless params.empty?
association = instance_variable_get("@#{reflection.name}")
Found 3 duplicate lines in the following files:
Between lines 4 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb
Between lines 6 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb
def self.line_offset
2
end
def compile(template)
Found 3 duplicate lines in the following files:
Between lines 837 and 839 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 815 and 817 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 780 and 782 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 715 and 717 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 642 and 644 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 608 and 610 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 578 and 580 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 551 and 553 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 505 and 507 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 414 and 416 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
def options
OptionParser.new do |o|
o.set_summary_indent(' ')
Found 3 duplicate lines in the following files:
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb
Between lines 90 and 92 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb
Between lines 28 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb
module ActiveSupport
module CoreExtensions
module Hash
Found 3 duplicate lines in the following files:
Between lines 604 and 606 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 454 and 456 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 285 and 287 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 231 and 233 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
if first
first = false
else
Found 3 duplicate lines in the following files:
Between lines 46 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb
Between lines 62 and 64 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb
class Numeric
def blank?
false
Found 3 duplicate lines in the following files:
Between lines 389 and 391 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Between lines 377 and 379 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Found 3 duplicate lines in the following files:
Between lines 21 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
Between lines 61 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/connection.rb
class << self
def requests
@@requests ||= []
Found 3 duplicate lines in the following files:
Between lines 80 and 85 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Between lines 220 and 223 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/attribute_methods.rb
Found 3 duplicate lines in the following files:
Between lines 202 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
Between lines 75 and 79 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
@closed = true
end
def closed?
@closed
Found 3 duplicate lines in the following files:
Between lines 820 and 822 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 800 and 802 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
module_eval do
before_save <<-EOF
association = instance_variable_get("@#{reflection.name}")
Found 3 duplicate lines in the following files:
Between lines 383 and 385 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Between lines 371 and 373 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Between lines 362 and 364 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Between lines 354 and 356 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Found 3 duplicate lines in the following files:
Between lines 349 and 351 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
Between lines 180 and 182 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/cgi_process.rb
Found 3 duplicate lines in the following files:
Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
Between lines 12 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
clean_backtrace do
expected_dom = HTML::Document.new(expected).root
actual_dom = HTML::Document.new(actual).root
Found 3 duplicate lines in the following files:
Between lines 1125 and 1127 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb
Between lines 1105 and 1107 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb
rescue
errno = Error::CR_SERVER_LOST
raise Error::new(errno, Error::err(errno))
Found 3 duplicate lines in the following files:
Between lines 344 and 348 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb
Between lines 69 and 73 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb
def inspect
"#<#{self.class} #{@dirname}>"
end
def close
Found 3 duplicate lines in the following files:
Between lines 157 and 167 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
Between lines 77 and 87 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
end_eval
end
end
def helper_attr(*attrs)
attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
Found 3 duplicate lines in the following files:
Between lines 193 and 196 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
Between lines 83 and 86 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
def marshal(data) Base64.encode64(Marshal.dump(data)) if data end
def unmarshal(data) Marshal.load(Base64.decode64(data)) if data end
def create_table!
Found 3 duplicate lines in the following files:
Between lines 19 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
Between lines 11 and 13 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
yield
ensure
$VERBOSE = old_verbose
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb
module ActiveSupport
module CoreExtensions
module Range
Found 3 duplicate lines in the following files:
Between lines 280 and 285 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
Between lines 973 and 978 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
errors.empty?
end
def errors
@errors ||= Errors.new(self)
Found 3 duplicate lines in the following files:
Between lines 823 and 825 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 791 and 793 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
def parse!(args)
options.parse!(args)
root = @base_command.environment.root
Found 3 duplicate lines in the following files:
Between lines 487 and 490 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/commands.rb
Between lines 343 and 345 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/commands.rb
def migration_template(relative_source, relative_destination, template_options = {})
migration_directory relative_destination
migration_file_name = template_options[:migration_file_name] || file_name
Found 3 duplicate lines in the following files:
Between lines 147 and 149 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb
Between lines 140 and 142 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb
_css_block(block) if block
_unify_block
self
Found 3 duplicate lines in the following files:
Between lines 180 and 183 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/calculations.rb
Between lines 1251 and 1254 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
add_joins!(sql, options, scope)
add_conditions!(sql, options[:conditions], scope)
Found 3 duplicate lines in the following files:
Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
def initialize(owner, reflection)
super
construct_sql
Found 3 duplicate lines in the following files:
Between lines 231 and 233 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/lookup.rb
Between lines 208 and 210 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/lookup.rb
hem = latest[gem.name]
latest[gem.name] = gem if hem.nil? or gem.version > hem.version
latest
Found 3 duplicate lines in the following files:
Between lines 4 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
Between lines 2 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
Between lines 4 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
def manifest
record do |m|
m.class_collisions class_path, class_name, "#{class_name}Test"
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb
module ActiveSupport
module CoreExtensions
module Time
Found 3 duplicate lines in the following files:
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb
Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb
module ActiveSupport
module CoreExtensions
module Numeric
Found 3 duplicate lines in the following files:
Between lines 113 and 115 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
Between lines 108 and 110 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
Between lines 103 and 105 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
alias new_mail new_port
alias each_mail each_port
alias each_newmail each_new_port
Found 3 duplicate lines in the following files:
Between lines 647 and 649 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 556 and 558 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 510 and 512 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
o.separator ""
o.separator "Options:"
o.separator ""
Found 4 duplicate lines in the following files:
Between lines 1482 and 1486 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 1505 and 1509 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
attribute_names = extract_attribute_names_from_match(match)
super unless all_attributes_exists?(attribute_names)
self.class_eval %{
def self.#{method_id}(*args)
Found 4 duplicate lines in the following files:
Between lines 134 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 186 and 189 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
unless tok
@racc_t = 0
else
@racc_t = (token_table[tok] or 1)
Found 4 duplicate lines in the following files:
Between lines 54 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
Between lines 80 and 83 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
klass = through.klass
klass.transaction do
flatten_deeper(records).each do |associate|
raise_on_type_mismatch(associate)
Found 4 duplicate lines in the following files:
Between lines 238 and 241 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Between lines 373 and 376 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
Between lines 171 and 174 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Found 4 duplicate lines in the following files:
Between lines 260 and 265 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
Between lines 260 and 267 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
disconnect!
connect
end
end
def disconnect!
@connection.close rescue nil
Found 4 duplicate lines in the following files:
Between lines 6 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/plugin/loader.rb
Between lines 10 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/plugin/locator.rb
attr_reader :initializer
def initialize(initializer)
@initializer = initializer
end
def plugins
Found 4 duplicate lines in the following files:
Between lines 106 and 109 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
Between lines 182 and 185 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
:float => { :name => "float" },
:decimal => { :name => "decimal" },
:datetime => { :name => "datetime" },
:timestamp => { :name => "datetime" },
Found 4 duplicate lines in the following files:
Between lines 2 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
Between lines 4 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
def manifest
record do |m|
m.class_collisions class_path, class_name, "#{class_name}Test"
m.directory File.join('app/models', class_path)
Found 4 duplicate lines in the following files:
Between lines 26 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
Between lines 43 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
Between lines 60 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
options = syms.extract_options!
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}=(obj)
Found 4 duplicate lines in the following files:
Between lines 26 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
Between lines 34 and 39 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
def find(*args)
options = args.extract_options!
if @reflection.options[:finder_sql]
expects_array = args.first.kind_of?(Array)
Found 4 duplicate lines in the following files:
Between lines 45 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
Between lines 32 and 35 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
@owner[@reflection.primary_key_name],
:conditions => conditions,
:include => @reflection.options[:include]
)
Found 4 duplicate lines in the following files:
Between lines 145 and 148 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 62 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
when @reflection.options[:as]
@finder_sql =
"#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " +
"#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote_value(@owner.class.base_class.name.to_s)}"
Found 4 duplicate lines in the following files:
Between lines 64 and 73 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
Between lines 140 and 153 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
master_helper_module.module_eval(&block) if block_given?
end
def helper_method(*methods)
methods.flatten.each do |method|
master_helper_module.module_eval <<-end_eval
Found 4 duplicate lines in the following files:
Between lines 62 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/response.rb
Between lines 59 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/response.rb
if content_type = headers.delete("Content-Type")
self.headers["type"] = content_type
end
if content_type = headers.delete("Content-type")
self.headers["type"] = content_type
Found 4 duplicate lines in the following files:
Between lines 274 and 277 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Between lines 104 and 107 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
:text => { :name => "text" },
:integer => { :name => "integer" },
:float => { :name => "float" },
:decimal => { :name => "decimal" },
Found 4 duplicate lines in the following files:
Between lines 45 and 50 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
Between lines 66 and 71 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
Between lines 160 and 165 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
alias :midnight :beginning_of_day
alias :at_midnight :beginning_of_day
alias :at_beginning_of_day :beginning_of_day
def end_of_day
Found 4 duplicate lines in the following files:
Between lines 474 and 477 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Between lines 504 and 507 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Found 4 duplicate lines in the following files:
Between lines 125 and 128 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
Between lines 270 and 273 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
e = encoding(nil)
if e and not /\A(?:7bit|8bit|binary)\z/i === e
raise ArgumentError,
'using C.T.Encoding with multipart mail is not permitted'
Found 4 duplicate lines in the following files:
Between lines 87 and 90 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
Between lines 95 and 98 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
quoted_without_iso2022,
domlit_without_iso2022,
comment_without_iso2022
]
Found 4 duplicate lines in the following files:
Between lines 141 and 146 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
Between lines 147 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
alias :monday :beginning_of_week
alias :at_beginning_of_week :beginning_of_week
def next_week(day = :monday)
days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6}
Found 4 duplicate lines in the following files:
Between lines 17 and 22 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
Between lines 9 and 15 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
alias_method :to_s, :to_formatted_s
alias_method :default_inspect, :inspect
alias_method :inspect, :readable_inspect
remove_method :to_time if base.instance_methods.include?(:to_time)
Found 4 duplicate lines in the following files:
Between lines 804 and 809 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 824 and 829 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
if association.new_record?
association.save(true)
end
if association.updated?
self["#{reflection.primary_key_name}"] = association.id
Found 4 duplicate lines in the following files:
Between lines 893 and 896 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 924 and 927 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
'via',
'with',
'id',
'for',
Found 4 duplicate lines in the following files:
Between lines 60 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb
Between lines 78 and 84 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb
class << self
alias_method :blank_slate_method_added, :method_added
def method_added(name)
result = blank_slate_method_added(name)
Found 4 duplicate lines in the following files:
Between lines 108 and 113 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 275 and 280 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
def has_cached_counter?
@owner.attribute_present?(cached_counter_attribute_name)
end
def cached_counter_attribute_name
"#{@reflection.name}_count"
Found 4 duplicate lines in the following files:
Between lines 119 and 122 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 168 and 171 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 226 and 229 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 321 and 324 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
action_table, action_check, action_default, action_pointer,
goto_table, goto_check, goto_default, goto_pointer,
nt_base, reduce_table, token_table, shift_n,
reduce_n, use_result, * = arg
Found 4 duplicate lines in the following files:
Between lines 91 and 95 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
Between lines 185 and 190 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
def inherited_with_helper(child)
inherited_without_helper(child)
begin
child.master_helper_module = Module.new
child.master_helper_module.send! :include, master_helper_module
Found 4 duplicate lines in the following files:
Between lines 489 and 492 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/dependencies.rb
Between lines 496 and 499 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/dependencies.rb
Dependencies.new_constants_in(Object) { super(file, *extras) }
rescue Exception => exception
exception.blame_file! file
raise
Found 4 duplicate lines in the following files:
Between lines 586 and 589 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 618 and 621 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
def parse!(args)
options.parse!(args)
count = 0
args.each do |uri|
Found 4 duplicate lines in the following files:
Between lines 11 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
Between lines 5 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/webrick.rb
OPTIONS = {
:port => 3000,
:ip => "0.0.0.0",
:environment => (ENV['RAILS_ENV'] || "development").dup,
Found 4 duplicate lines in the following files:
Between lines 1177 and 1181 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
Between lines 1215 and 1219 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
:before_add, :after_add, :before_remove, :after_remove,
:extend
)
options[:extend] = create_extension_modules(association_id, extension, options[:extend]) if block_given?
Found 4 duplicate lines in the following files:
Between lines 140 and 143 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 244 and 247 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
def construct_sql
case
when @reflection.options[:finder_sql]
@finder_sql = interpolate_sql(@reflection.options[:finder_sql])
Found 4 duplicate lines in the following files:
Between lines 4 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
Between lines 4 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
def initialize(owner, reflection)
super
construct_sql
end
def build(attributes = {})
Found 4 duplicate lines in the following files:
Between lines 170 and 173 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
Between lines 1004 and 1007 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
if @options.has_key?('cache')
@options['cache'].each { |scheme|
case(scheme)
when 'storable'
Found 4 duplicate lines in the following files:
Between lines 99 and 102 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
Between lines 18 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/server.rb
ARGV.shift
else
if defined?(Mongrel)
"mongrel"
Found 4 duplicate lines in the following files:
Between lines 231 and 234 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
Between lines 285 and 288 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 604 and 607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
[]
Found 4 duplicate lines in the following files:
Between lines 750 and 756 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
Between lines 782 and 788 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
configuration.update(attr_names.extract_options!)
enum = configuration[:in] || configuration[:within]
raise(ArgumentError, "An object with the method include? is required must be supplied as the :in option of the configuration hash") unless enum.respond_to?("include?")
validates_each(attr_names, configuration) do |record, attr_name, value|
Found 4 duplicate lines in the following files:
Between lines 196 and 200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 209 and 213 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
act = action_table[i] and
action_check[i] == @racc_state[-1]
act = action_default[@racc_state[-1]]
end
while act = _racc_evalact(act, arg)
Found 4 duplicate lines in the following files:
Between lines 83 and 87 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
Between lines 114 and 118 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
html_options = args.extract_options!
function = args[0] || ''
html_options.symbolize_keys!
function = update_page(&block) if block_given?
Found 4 duplicate lines in the following files:
Between lines 72 and 75 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
Between lines 172 and 175 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
NOSEND_FIELDS = %w(
received
bcc
)
Found 4 duplicate lines in the following files:
Between lines 710 and 714 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
Between lines 742 and 746 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
while chain[index]
filter, index = skip_excluded_filters(chain, index)
break unless filter
case filter.type
Found 5 duplicate lines in the following files:
Between lines 833 and 839 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 811 and 817 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 776 and 782 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 604 and 610 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 574 and 580 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
Between lines 547 and 553 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
def initialize(base_command)
@base_command = base_command
end
def options
OptionParser.new do |o|
o.set_summary_indent(' ')
Found 5 duplicate lines in the following files:
Between lines 160 and 166 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 66 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
alias :midnight :beginning_of_day
alias :at_midnight :beginning_of_day
alias :at_beginning_of_day :beginning_of_day
def end_of_day
change(:hour => 23, :min => 59, :sec => 59)
Found 5 duplicate lines in the following files:
Between lines 1325 and 1331 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 1309 and 1315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
val[1].times do
val[0].push ''
end
val[0].push val[2]
val[0]
end
.,.,
Found 5 duplicate lines in the following files:
Between lines 15 and 38 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
Between lines 10 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb
Between lines 41 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb
def self.included(base)
base.class_eval do
alias_method :to_default_s, :to_s
alias_method :to_s, :to_formatted_s
end
end
def to_formatted_s(format = :default)
Found 5 duplicate lines in the following files:
Between lines 60 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
Between lines 50 and 56 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
module_eval <<-EOE
def #{method}(path, body, headers)
request = ActiveResource::Request.new(:#{method}, path, body, headers)
self.class.requests << request
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request.inspect}"))
end
EOE
Found 5 duplicate lines in the following files:
Between lines 458 and 464 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
Between lines 303 and 311 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
in_scope, @selected = @selected, matches
yield matches
ensure
@selected = in_scope
end
end
matches
Found 5 duplicate lines in the following files:
Between lines 36 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
Between lines 40 and 45 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
Between lines 46 and 51 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
if formatter.respond_to?(:call)
formatter.call(self).to_s
else
strftime(formatter)
end
else
Found 5 duplicate lines in the following files:
Between lines 10 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 10 and 18 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
alias_method :plus_without_duration, :+
alias_method :+, :plus_with_duration
alias_method :minus_without_duration, :-
alias_method :-, :minus_with_duration
end
end
module ClassMethods
Found 5 duplicate lines in the following files:
Between lines 56 and 62 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 52 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
if options[:order] && @reflection.options[:order]
options[:order] = "#{options[:order]}, #{@reflection.options[:order]}"
elsif @reflection.options[:order]
options[:order] = @reflection.options[:order]
end
merge_options_from_reflection!(options)
Found 5 duplicate lines in the following files:
Between lines 182 and 191 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 162 and 171 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
alias :at_end_of_month :end_of_month
def beginning_of_quarter
beginning_of_month.change(:month => [10, 7, 4, 1].detect { |m| m <= self.month })
end
alias :at_beginning_of_quarter :beginning_of_quarter
def beginning_of_year
Found 5 duplicate lines in the following files:
Between lines 231 and 236 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Between lines 164 and 170 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Found 5 duplicate lines in the following files:
Between lines 383 and 387 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Between lines 371 and 375 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
Found 5 duplicate lines in the following files:
Between lines 322 and 326 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 301 and 305 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 282 and 286 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
if first && !subset.empty?
matches << subset.first
break
else
matches.concat subset
Found 5 duplicate lines in the following files:
Between lines 232 and 238 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb
Between lines 152 and 158 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb
def puts( str = nil )
@f << str if str
@f << @eol
end
def write( str )
@f << str
Found 5 duplicate lines in the following files:
Between lines 198 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
Between lines 88 and 96 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
CREATE TABLE
id INTEGER PRIMARY KEY,
)
end_sql
end
def drop_table!
Found 5 duplicate lines in the following files:
Between lines 285 and 289 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 231 and 236 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
if first
first = false
else
strategy.meta ','
end
strategy.space
Found 5 duplicate lines in the following files:
Between lines 14 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Between lines 13 and 20 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
alias_method :controller_table_name, :controller_plural_name
def initialize(runtime_args, runtime_options = {})
super
@controller_name = @name.pluralize
base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)
Found 5 duplicate lines in the following files:
Between lines 131 and 135 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
Between lines 160 and 164 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb
def method_missing(method, *args, &block)
if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method))
super
else
@reflection.klass.send(:with_scope, construct_scope) { @reflection.klass.send(method, *args, &block) }
Found 5 duplicate lines in the following files:
Between lines 110 and 114 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
Between lines 40 and 44 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
def helper(*args, &block)
args.flatten.each do |arg|
case arg
when Module
add_template_helper(arg)
Found 5 duplicate lines in the following files:
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/version.rb
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/version.rb
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/version.rb
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/version.rb
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_pack/version.rb
Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/version.rb
module VERSION
MAJOR = 2
MINOR = 0
TINY = 2
STRING = [MAJOR, MINOR, TINY].join('.')
Found 5 duplicate lines in the following files:
Between lines 629 and 633 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 628 and 632 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,
Found 5 duplicate lines in the following files:
Between lines 5 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/server.rb
Between lines 86 and 97 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
require_library_or_gem 'fcgi'
rescue Exception
end
begin
require_library_or_gem 'mongrel'
rescue Exception
end
server = case ARGV.first
Found 5 duplicate lines in the following files:
Between lines 168 and 173 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 119 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
action_table, action_check, action_default, action_pointer,
goto_table, goto_check, goto_default, goto_pointer,
nt_base, reduce_table, token_table, shift_n,
reduce_n, use_result, * = arg
_racc_init_sysvars
Found 5 duplicate lines in the following files:
Between lines 413 and 419 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
Between lines 396 and 402 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
map_new_actions(map, resource)
map_member_actions(map, resource)
map_associations(resource, options)
if block_given?
with_options(:path_prefix => resource.nesting_path_prefix, :name_prefix => resource.nesting_name_prefix, :namespace => options[:namespace], &block)
Found 5 duplicate lines in the following files:
Between lines 13 and 18 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Between lines 76 and 81 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
password = config[:password].to_s
if config.has_key?(:database)
database = config[:database]
else
raise ArgumentError, "No database specified. Missing argument: database."
Found 6 duplicate lines in the following files:
Between lines 45 and 52 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
Between lines 117 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
when String, Symbol
file_name = arg.to_s.underscore + '_helper'
class_name = file_name.camelize
begin
require_dependency(file_name)
rescue LoadError => load_error
requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]
Found 6 duplicate lines in the following files:
Between lines 22 and 27 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb
Between lines 29 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
md5 = Digest::MD5.new
now = Time.now
md5 << now.to_s
md5 << String(now.usec)
md5 << String(rand(0))
md5 << String($$)
Found 6 duplicate lines in the following files:
Between lines 291 and 298 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 351 and 356 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
[]
Found 6 duplicate lines in the following files:
Between lines 365 and 372 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 505 and 512 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
[]
Found 6 duplicate lines in the following files:
Between lines 29 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
Between lines 64 and 69 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
options[:year] || self.year,
options[:month] || self.month,
options[:day] || self.day,
options[:hour] || self.hour,
options[:min] || (options[:hour] ? 0 : self.min),
options[:sec] || ((options[:hour] || options[:min]) ? 0 : self.sec),
Found 6 duplicate lines in the following files:
Between lines 282 and 290 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
Between lines 301 and 309 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
if first && !subset.empty?
matches << subset.first
break
else
matches.concat subset
end
end
end
matches.empty? ? nil : matches
Found 6 duplicate lines in the following files:
Between lines 192 and 202 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
Between lines 178 and 200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
def clear
@errors = {}
end
def size
@errors.values.inject(0) { |error_count, attribute| error_count + attribute.size }
end
alias_method :count, :size
alias_method :length, :size
Found 6 duplicate lines in the following files:
Between lines 760 and 766 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
Between lines 800 and 806 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
Found 6 duplicate lines in the following files:
Between lines 31 and 43 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
Between lines 15 and 27 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
@updated = true
end
loaded
record
end
def updated?
@updated
end
private
def find_target
Found 6 duplicate lines in the following files:
Between lines 140 and 147 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
Between lines 192 and 198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
@racc_read_next = false
i += @racc_t
unless i >= 0 and
act = action_table[i] and
action_check[i] == @racc_state[-1]
act = action_default[@racc_state[-1]]
Found 6 duplicate lines in the following files:
Between lines 355 and 360 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
Between lines 1007 and 1012 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
else
raise(
ActiveRecordError,
"Validations need to be either a symbol, string (to be eval'ed), proc/method, or " +
"class implementing a static validation method"
)
Found 7 duplicate lines in the following files:
Between lines 2 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Between lines 2 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
default_options :skip_timestamps => false, :skip_migration => false
attr_reader :controller_name,
:controller_class_path,
:controller_file_path,
:controller_class_nesting,
:controller_class_nesting_depth,
:controller_class_name,
Found 7 duplicate lines in the following files:
Between lines 525 and 537 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 228 and 240 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
[]
Found 7 duplicate lines in the following files:
Between lines 195 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
Between lines 72 and 79 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
arg = args.shift
if arg.is_a?(HTML::Node)
root = arg
arg = args.shift
elsif arg == nil
raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?"
elsif @selected
Found 7 duplicate lines in the following files:
Between lines 315 and 322 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/db2.rb
Between lines 297 and 304 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/db2.rb
cols = get_col_desc
rc = SQLFetch(@handle)
if rc == SQL_NO_DATA_FOUND
SQLFreeStmt(@handle, SQL_CLOSE)
SQLFreeStmt(@handle, SQL_RESET_PARAMS)
return nil
end
raise "ERROR" unless rc == SQL_SUCCESS
Found 7 duplicate lines in the following files:
Between lines 6 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
Between lines 3 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
def self.included(base)
base.class_inheritable_accessor :master_helper_module
base.master_helper_module = Module.new
base.extend(ClassMethods)
base.class_eval do
class << self
alias_method_chain :inherited, :helper
Found 7 duplicate lines in the following files:
Between lines 76 and 82 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Between lines 62 and 68 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
Between lines 35 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
opt.on("--skip-timestamps",
"Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v }
opt.on("--skip-migration",
"Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
Found 7 duplicate lines in the following files:
Between lines 130 and 139 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb
Between lines 148 and 157 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb
def recognized_request_for(path, request_method = nil)
path = "/#{path}" unless path.first == '/'
request = ActionController::TestRequest.new({}, {}, nil)
request.env["REQUEST_METHOD"] = request_method.to_s.upcase if request_method
request.path = path
ActionController::Routing::Routes.recognize(request)
request
Found 7 duplicate lines in the following files:
Between lines 76 and 82 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
Between lines 68 and 74 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
[
/\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n,
/\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n,
quoted_with_iso2022,
domlit_with_iso2022,
comment_with_iso2022
]
Found 7 duplicate lines in the following files:
Between lines 23 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/clean_logger.rb
Between lines 22 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/buffered_logger.rb
if silencer
begin
old_logger_level, self.level = level, temporary_level
yield self
ensure
self.level = old_logger_level
end
else
yield self
Found 7 duplicate lines in the following files:
Between lines 206 and 215 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
Between lines 54 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
def plus_with_duration(other)
if ActiveSupport::Duration === other
other.since(self)
else
plus_without_duration(other)
end
end
def minus_with_duration(other)
if ActiveSupport::Duration === other
Found 8 duplicate lines in the following files:
Between lines 26 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
Between lines 26 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
class_eval(<<-EOS, __FILE__, __LINE__)
unless defined? @@#{sym}
@@#{sym} = nil
end
def self.#{sym}=(obj)
@@#{sym} = obj
end
#{"
def #{sym}=(obj)
@@#{sym} = obj
end
" unless options[:instance_writer] == false }
EOS
Found 8 duplicate lines in the following files:
Between lines 44 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
Between lines 57 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
m.dependency 'model', [name] + @args, :collision => :skip
m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
)
m.template('functional_test.rb', File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb"))
m.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
m.route_resources controller_file_name
end
end
protected
def banner
Found 8 duplicate lines in the following files:
Between lines 39 and 51 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
Between lines 180 and 192 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
if block_given?
begin
f = super
yield f
ensure
f.close if f
end
else
super
end
end
alias open new
Found 8 duplicate lines in the following files:
Between lines 50 and 59 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 14 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
conditions = "#{@finder_sql}"
if sanitized_conditions = sanitize_sql(options[:conditions])
conditions << " AND (#{sanitized_conditions})"
end
options[:conditions] = conditions
if options[:order] && @reflection.options[:order]
options[:order] = "#{options[:order]}, #{@reflection.options[:order]}"
elsif @reflection.options[:order]
options[:order] = @reflection.options[:order]
Found 8 duplicate lines in the following files:
Between lines 6 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
Between lines 6 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
next if sym.is_a?(Hash)
class_eval(<<-EOS, __FILE__, __LINE__)
unless defined? @@#{sym}
@@#{sym} = nil
end
def self.#{sym}
@@#{sym}
end
def #{sym}
@@#{sym}
end
EOS
Found 8 duplicate lines in the following files:
Between lines 44 and 52 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
Between lines 38 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
def to_formatted_s(format = :default)
if formatter = DATE_FORMATS[format]
if formatter.respond_to?(:call)
formatter.call(self).to_s
else
strftime(formatter)
end
else
to_default_s
Found 9 duplicate lines in the following files:
Between lines 44 and 54 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
Between lines 36 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
record = load_target.detect { |record| id == record.id }
expects_array ? [record] : record
else
load_target.select { |record| ids.include?(record.id) }
end
else
conditions = "#{@finder_sql}"
if sanitized_conditions = sanitize_sql(options[:conditions])
conditions << " AND (#{sanitized_conditions})"
end
options[:conditions] = conditions
Found 9 duplicate lines in the following files:
Between lines 3 and 11 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
Between lines 6 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
Between lines 4 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb
def daemonize
exit if fork
Process.setsid
exit if fork
Dir.chdir "/"
File.umask 0000
STDIN.reopen "/dev/null"
STDOUT.reopen "/dev/null", "a"
STDERR.reopen STDOUT
Found 9 duplicate lines in the following files:
Between lines 249 and 260 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
Between lines 152 and 163 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
@finder_sql = "#{@reflection.klass.table_name}.#{@reflection.primary_key_name} = #{@owner.quoted_id}"
@finder_sql << " AND (#{conditions})" if conditions
end
if @reflection.options[:counter_sql]
@counter_sql = interpolate_sql(@reflection.options[:counter_sql])
elsif @reflection.options[:finder_sql]
@reflection.options[:counter_sql] = @reflection.options[:finder_sql].sub(/SELECT (\/\*.*?\*\/ )?(.*)\bFROM\b/im) { "SELECT #{$1}COUNT(*) FROM" }
@counter_sql = interpolate_sql(@reflection.options[:counter_sql])
else
@counter_sql = @finder_sql
Found 10 duplicate lines in the following files:
Between lines 90 and 101 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
Between lines 209 and 224 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
else
root = response_from_page_or_rjs
end
case arg
when String
selector = HTML::Selector.new(arg, args)
when Array
selector = HTML::Selector.new(*arg)
when HTML::Selector
selector = arg
else raise ArgumentError, "Expecting a selector as the first argument"
Found 11 duplicate lines in the following files:
Between lines 166 and 177 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
Between lines 368 and 379 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
options = args.extract_options!
case record_or_name_or_array
when String, Symbol
object_name = record_or_name_or_array
when Array
object = record_or_name_or_array.last
object_name = ActionController::RecordIdentifier.singular_class_name(object)
apply_form_for_options!(record_or_name_or_array, options)
args.unshift object
else
object = record_or_name_or_array
Found 12 duplicate lines in the following files:
Between lines 23 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
Between lines 24 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
if @controller_class_nesting.empty?
@controller_class_name = @controller_class_name_without_nesting
else
@controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
end
end
def manifest
record do |m|
m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
m.class_collisions(class_path, "#{class_name}")
m.directory(File.join('app/models', class_path))
m.directory(File.join('app/controllers', controller_class_path))
m.directory(File.join('app/helpers', controller_class_path))
m.directory(File.join('app/views', controller_class_path, controller_file_name))
Found 13 duplicate lines in the following files:
Between lines 1184 and 1200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
Between lines 23 and 39 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
def benchmark(title, log_level = Logger::DEBUG, use_silence = true)
if logger && logger.level == log_level
result = nil
seconds = Benchmark.realtime { result = use_silence ? silence { yield } : yield }
logger.add(log_level, "#{title} (#{'%.5f' % seconds})")
result
else
yield
end
end
def silence
old_logger_level, logger.level = logger.level, Logger::ERROR if logger
yield
ensure
logger.level = old_logger_level if logger
Found 13 duplicate lines in the following files:
Between lines 848 and 870 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
Between lines 747 and 769 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
[]
Found 15 duplicate lines in the following files:
Between lines 14 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb
Between lines 30 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb
class NilClass
def blank?
true
end
end
class FalseClass
def blank?
true
end
end
class TrueClass
def blank?
false
end
end
class Array
alias_method :blank?, :empty?
end
class Hash
alias_method :blank?, :empty?
end
class String
def blank?
Found 18 duplicate lines in the following files:
Between lines 96 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
Between lines 102 and 144 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
def months_ago(months)
advance(:months => -months)
end
def months_since(months)
advance(:months => months)
end
def years_ago(years)
advance(:years => -years)
end
def years_since(years)
advance(:years => years)
end
def last_year
years_ago(1)
end
def next_year
years_since(1)
end
def last_month
months_ago(1)
end
def next_month
months_since(1)
end
def beginning_of_week
days_to_monday = self.wday!=0 ? self.wday-1 : 6
Found 21 duplicate lines in the following files:
Between lines 67 and 170 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
Between lines 96 and 178 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
def invalid?(attribute)
!@errors[attribute.to_s].nil?
end
def on(attribute)
errors = @errors[attribute.to_s]
return nil if errors.nil?
errors.size == 1 ? errors.first : errors
end
alias :[] :on
def on_base
on(:base)
end
def each
@errors.each_key { |attr| @errors[attr].each { |msg| yield attr, msg } }
end
def each_full
full_messages.each { |msg| yield msg }
end
def full_messages
full_messages = []
@errors.each_key do |attr|
@errors[attr].each do |msg|
next if msg.nil?
if attr == "base"
full_messages << msg
else
Found 296 duplicate lines in the following files:
Between lines 33 and 547 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb
Between lines 34 and 535 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb
module TMail
class Mail
def header_string( name, default = nil )
h = @header[name.downcase] or return default
h.to_s
end
include TextUtils
def set_string_array_attr( key, strs )
strs.flatten!
if strs.empty?
@header.delete key.downcase
else
store key, strs.join(', ')
end
strs
end
private :set_string_array_attr
def set_string_attr( key, str )
if str
store key, str
else
@header.delete key.downcase
end
str
end
private :set_string_attr
def set_addrfield( name, arg )
if arg
h = HeaderField.internal_new(name, @config)
h.addrs.replace [arg].flatten
@header[name] = h
else
@header.delete name
end
arg
end
private :set_addrfield
def addrs2specs( addrs )
return nil unless addrs
list = addrs.map {|addr|
if addr.address_group?
then addr.map {|a| a.spec }
else addr.spec
end
}.flatten
return nil if list.empty?
list
end
private :addrs2specs
def date( default = nil )
if h = @header['date']
h.date
else
default
end
end
def date=( time )
if time
store 'Date', time2str(time)
else
@header.delete 'date'
end
time
end
def strftime( fmt, default = nil )
if t = date
t.strftime(fmt)
else
default
end
end
def to_addrs( default = nil )
if h = @header['to']
h.addrs
else
default
end
end
def cc_addrs( default = nil )
if h = @header['cc']
h.addrs
else
default
end
end
def bcc_addrs( default = nil )
if h = @header['bcc']
h.addrs
else
default
end
end
def to_addrs=( arg )
set_addrfield 'to', arg
end
def cc_addrs=( arg )
set_addrfield 'cc', arg
end
def bcc_addrs=( arg )
set_addrfield 'bcc', arg
end
def to( default = nil )
addrs2specs(to_addrs(nil)) || default
end
def cc( default = nil )
addrs2specs(cc_addrs(nil)) || default
end
def bcc( default = nil )
addrs2specs(bcc_addrs(nil)) || default
end
def to=( *strs )
set_string_array_attr 'To', strs
end
def cc=( *strs )
set_string_array_attr 'Cc', strs
end
def bcc=( *strs )
set_string_array_attr 'Bcc', strs
end
def from_addrs( default = nil )
if h = @header['from']
h.addrs
else
default
end
end
def from_addrs=( arg )
set_addrfield 'from', arg
end
def from( default = nil )
addrs2specs(from_addrs(nil)) || default
end
def from=( *strs )
set_string_array_attr 'From', strs
end
def friendly_from( default = nil )
h = @header['from']
a, = h.addrs
return default unless a
return a.phrase if a.phrase
return h.comments.join(' ') unless h.comments.empty?
a.spec
end
def reply_to_addrs( default = nil )
if h = @header['reply-to']
h.addrs
else
default
end
end
def reply_to_addrs=( arg )
set_addrfield 'reply-to', arg
end
def reply_to( default = nil )
addrs2specs(reply_to_addrs(nil)) || default
end
def reply_to=( *strs )
set_string_array_attr 'Reply-To', strs
end
def sender_addr( default = nil )
f = @header['sender'] or return default
f.addr or return default
end
def sender_addr=( addr )
if addr
h = HeaderField.internal_new('sender', @config)
h.addr = addr
@header['sender'] = h
else
@header.delete 'sender'
end
addr
end
def sender( default )
f = @header['sender'] or return default
a = f.addr or return default
a.spec
end
def sender=( str )
set_string_attr 'Sender', str
end
def subject( default = nil )
if h = @header['subject']
h.body
else
default
end
end
alias quoted_subject subject
def subject=( str )
set_string_attr 'Subject', str
end
def message_id( default = nil )
if h = @header['message-id']
h.id || default
else
default
end
end
def message_id=( str )
set_string_attr 'Message-Id', str
end
def in_reply_to( default = nil )
if h = @header['in-reply-to']
h.ids
else
default
end
end
def in_reply_to=( *idstrs )
set_string_array_attr 'In-Reply-To', idstrs
end
def references( default = nil )
if h = @header['references']
h.refs
else
default
end
end
def references=( *strs )
set_string_array_attr 'References', strs
end
def mime_version( default = nil )
if h = @header['mime-version']
h.version || default
else
default
end
end
def mime_version=( m, opt = nil )
if opt
if h = @header['mime-version']
h.major = m
h.minor = opt
else
store 'Mime-Version', "#{m}.#{opt}"
end
else
store 'Mime-Version', m
end
m
end
def content_type( default = nil )
if h = @header['content-type']
h.content_type || default
else
default
end
end
def main_type( default = nil )
if h = @header['content-type']
h.main_type || default
else
default
end
end
def sub_type( default = nil )
if h = @header['content-type']
h.sub_type || default
else
default
end
end
def set_content_type( str, sub = nil, param = nil )
if sub
main, sub = str, sub
else
main, sub = str.split(%r</>, 2)
raise ArgumentError, "sub type missing: #{str.inspect}" unless sub
end
if h = @header['content-type']
h.main_type = main
h.sub_type = sub
h.params.clear
else
store 'Content-Type', "#{main}/#{sub}"
end
@header['content-type'].params.replace param if param
str
end
alias content_type= set_content_type
def type_param( name, default = nil )
if h = @header['content-type']
h[name] || default
else
default
end
end
def charset( default = nil )
if h = @header['content-type']
h['charset'] or default
else
default
end
end
def charset=( str )
if str
if h = @header[ 'content-type' ]
h['charset'] = str
else
store 'Content-Type', "text/plain; charset=#{str}"
end
end
str
end
def transfer_encoding( default = nil )
if h = @header['content-transfer-encoding']
h.encoding || default
else
default
end
end
def transfer_encoding=( str )
set_string_attr 'Content-Transfer-Encoding', str
end
alias encoding transfer_encoding
alias encoding= transfer_encoding=
alias content_transfer_encoding transfer_encoding
alias content_transfer_encoding= transfer_encoding=
def disposition( default = nil )
if h = @header['content-disposition']
h.disposition || default
else
default
end
end
alias content_disposition disposition
def set_disposition( str, params = nil )
if h = @header['content-disposition']
h.disposition = str
h.params.clear
else
store('Content-Disposition', str)
h = @header['content-disposition']
end
h.params.replace params if params
end
alias disposition= set_disposition
alias set_content_disposition set_disposition
alias content_disposition= set_disposition
def disposition_param( name, default = nil )
if h = @header['content-disposition']
h[name] || default
else
default
end
end
def create_reply
mail = TMail::Mail.parse('')
mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '')
mail.to_addrs = reply_addresses([])
mail.in_reply_to = [message_id(nil)].compact
mail.references = references([]) + [message_id(nil)].compact
mail.mime_version = '1.0'
mail
end
def base64_encode
store 'Content-Transfer-Encoding', 'Base64'
self.body = Base64.folding_encode(self.body)
end
def base64_decode
if /base64/i === self.transfer_encoding('')
store 'Content-Transfer-Encoding', '8bit'
self.body = Base64.decode(self.body, @config.strict_base64decode?)
end
end
def destinations( default = nil )
ret = []
%w( to cc bcc ).each do |nm|
if h = @header[nm]
h.addrs.each {|i| ret.push i.address }
end
end
ret.empty? ? default : ret
end
def each_destination( &block )
destinations([]).each do |i|
if Address === i
yield i
else
i.each(&block)
end
end
end
alias each_dest each_destination
def reply_addresses( default = nil )
reply_to_addrs(nil) or from_addrs(nil) or default
end
def error_reply_addresses( default = nil )
if s = sender(nil)
[s]
else
from_addrs(default)
end
end
def multipart?
main_type('').downcase == 'multipart'