-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warnings in Ruby 2.7 and Ruby 3.0 #5070
Changes from all commits
a75a289
dffe796
5c2ca27
3fe65ba
b341deb
023bc6e
5e7b3f7
e19205c
a4d6e23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,14 +95,14 @@ def tenant_data_folder | |
def data_output_files | ||
files = { tags: [], related_content: [], comments_summary: [] } | ||
|
||
files[:tags] << proposals_tags_filename if File.exists?(data_folder.join(proposals_tags_filename)) | ||
files[:tags] << proposals_taggings_filename if File.exists?(data_folder.join(proposals_taggings_filename)) | ||
files[:tags] << investments_tags_filename if File.exists?(data_folder.join(investments_tags_filename)) | ||
files[:tags] << investments_taggings_filename if File.exists?(data_folder.join(investments_taggings_filename)) | ||
files[:related_content] << proposals_related_filename if File.exists?(data_folder.join(proposals_related_filename)) | ||
files[:related_content] << investments_related_filename if File.exists?(data_folder.join(investments_related_filename)) | ||
files[:comments_summary] << proposals_comments_summary_filename if File.exists?(data_folder.join(proposals_comments_summary_filename)) | ||
files[:comments_summary] << investments_comments_summary_filename if File.exists?(data_folder.join(investments_comments_summary_filename)) | ||
files[:tags] << proposals_tags_filename if File.exist?(data_folder.join(proposals_tags_filename)) | ||
files[:tags] << proposals_taggings_filename if File.exist?(data_folder.join(proposals_taggings_filename)) | ||
files[:tags] << investments_tags_filename if File.exist?(data_folder.join(investments_tags_filename)) | ||
files[:tags] << investments_taggings_filename if File.exist?(data_folder.join(investments_taggings_filename)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [115/110] (https://rubystyle.guide#max-line-length) |
||
files[:related_content] << proposals_related_filename if File.exist?(data_folder.join(proposals_related_filename)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [120/110] (https://rubystyle.guide#max-line-length) |
||
files[:related_content] << investments_related_filename if File.exist?(data_folder.join(investments_related_filename)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [124/110] (https://rubystyle.guide#max-line-length) |
||
files[:comments_summary] << proposals_comments_summary_filename if File.exist?(data_folder.join(proposals_comments_summary_filename)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [139/110] (https://rubystyle.guide#max-line-length) |
||
files[:comments_summary] << investments_comments_summary_filename if File.exist?(data_folder.join(investments_comments_summary_filename)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [143/110] (https://rubystyle.guide#max-line-length) |
||
|
||
files | ||
end | ||
|
@@ -438,13 +438,13 @@ def set_previous_modified_date | |
end | ||
|
||
def last_modified_date_for(filename) | ||
return nil unless File.exists? data_folder.join(filename) | ||
return nil unless File.exist? data_folder.join(filename) | ||
|
||
File.mtime data_folder.join(filename) | ||
end | ||
|
||
def updated_file?(filename) | ||
return false unless File.exists? data_folder.join(filename) | ||
return false unless File.exist? data_folder.join(filename) | ||
return true unless previous_modified_date[filename].present? | ||
|
||
last_modified_date_for(filename) > previous_modified_date[filename] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
shared_examples "mappable" do |mappable_factory_name, mappable_association_name, mappable_new_path, mappable_edit_path, mappable_show_path, mappable_path_arguments, management: false| | ||
shared_examples "mappable" do |mappable_factory_name, mappable_association_name, mappable_new_path, mappable_edit_path, mappable_show_path, mappable_path_arguments: {}, management: false| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout/LineLength: Line is too long. [187/110] (https://rubystyle.guide#max-line-length) |
||
let!(:user) { create(:user, :level_two) } | ||
let!(:arguments) { {} } | ||
let!(:mappable) { create(mappable_factory_name.to_s.to_sym) } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/LineLength: Line is too long. [111/110] (https://rubystyle.guide#max-line-length)