-
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
Add rubocop spacing rules #3631
Conversation
end | ||
end | ||
|
||
it "does not register vote for archived proposals" do | ||
user = create(:user, verified_at: Time.current) | ||
archived_proposal = create(:proposal, :archived) | ||
|
||
expect {archived_proposal.register_vote(user, "yes")}.to change{proposal.reload.votes_for.size}.by(0) | ||
expect { archived_proposal.register_vote(user, "yes") }.to change { proposal.reload.votes_for.size }.by(0) |
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.
Metrics/LineLength: Line is too long. [112/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -63,7 +63,7 @@ | |||
booth_assignment1 = create(:poll_booth_assignment, poll: poll, booth: booth) | |||
booth_assignment2 = create(:poll_booth_assignment, poll: poll2, booth: booth) | |||
|
|||
expect { create(:poll_shift, booth: booth, officer: officer, date: Date.current) }.to change {Poll::OfficerAssignment.all.count}.by(2) | |||
expect { create(:poll_shift, booth: booth, officer: officer, date: Date.current) }.to change { Poll::OfficerAssignment.all.count }.by(2) |
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.
Metrics/LineLength: Line is too long. [142/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
end | ||
|
||
it "does not increase anonymous votes counter " do | ||
user = create(:user) | ||
expect {debate.register_vote(user, "yes")}.not_to change {debate.reload.cached_anonymous_votes_total} | ||
expect { debate.register_vote(user, "yes") }.not_to change { debate.reload.cached_anonymous_votes_total } |
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.
Metrics/LineLength: Line is too long. [113/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
end | ||
|
||
it "increases anonymous votes counter" do | ||
user = create(:user) | ||
expect {debate.register_vote(user, "yes")}.to change {debate.reload.cached_anonymous_votes_total}.by(1) | ||
expect { debate.register_vote(user, "yes") }.to change { debate.reload.cached_anonymous_votes_total }.by(1) |
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.
Metrics/LineLength: Line is too long. [115/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
end | ||
|
||
it "does not increase anonymous votes counter " do | ||
user = create(:user, verified_at: Time.current) | ||
expect {debate.register_vote(user, "yes")}.not_to change{debate.reload.cached_anonymous_votes_total} | ||
expect { debate.register_vote(user, "yes") }.not_to change { debate.reload.cached_anonymous_votes_total } |
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.
Metrics/LineLength: Line is too long. [113/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -1,27 +1,27 @@ | |||
class ManagerAuthenticator | |||
|
|||
def initialize(data = {}) | |||
@manager = {login: data[:login], user_key: data[:clave_usuario], date: data[:fecha_conexion]}.with_indifferent_access | |||
@manager = { login: data[:login], user_key: data[:clave_usuario], date: data[:fecha_conexion] }.with_indifferent_access |
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.
Metrics/LineLength: Line is too long. [123/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
allow(authenticator).to receive(:application_authorized?).and_return(true) | ||
allow(authenticator.send(:client)).to receive(:call).with(:get_status_user_data, message: message) | ||
authenticator.auth | ||
end | ||
|
||
it "calls the permissions check method" do | ||
allow(authenticator).to receive(:manager_exists?).and_return(true) | ||
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: {user_key: "31415926"} }) | ||
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: { user_key: "31415926" }}) |
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.
Metrics/LineLength: Line is too long. [134/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
let(:twitter_hash){ {provider: "twitter", uid: "12345", info: {name: "manuela"}} } | ||
let(:twitter_hash_with_email){ {provider: "twitter", uid: "12345", info: {name: "manuela", email: "manuelacarmena@example.com"}} } | ||
let(:twitter_hash) { { provider: "twitter", uid: "12345", info: { name: "manuela" }} } | ||
let(:twitter_hash_with_email) { { provider: "twitter", uid: "12345", info: { name: "manuela", email: "manuelacarmena@example.com" }} } |
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.
Metrics/LineLength: Line is too long. [140/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
annotation2 = create(:legislation_annotation, | ||
draft_version: draft_version_2, | ||
ranges: [{"start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19}]) | ||
ranges: [{ "start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19 }]) |
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.
Metrics/LineLength: Line is too long. [118/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
annotation1 = create(:legislation_annotation, | ||
draft_version: draft_version_2, text: "hola", | ||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}]) | ||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }]) |
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.
Metrics/LineLength: Line is too long. [117/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
caa769b
to
92d44c4
Compare
end | ||
let!(:annotation2) do | ||
create(:legislation_annotation, draft_version: draft_version, text: "my other annotation", | ||
ranges: [{"start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 10}]) | ||
ranges: [{ "start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 10 }]) |
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.
Metrics/LineLength: Line is too long. [128/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -623,11 +623,11 @@ | |||
let!(:draft_version) { create(:legislation_draft_version, :published) } | |||
let!(:annotation1) do | |||
create(:legislation_annotation, draft_version: draft_version, text: "my annotation", | |||
ranges: [{"start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 5}]) | |||
ranges: [{ "start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 5 }]) |
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.
Metrics/LineLength: Line is too long. [127/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@annotation = create(:legislation_annotation, draft_version: @draft_version, text: "my other annotation", quote: "audiam", | ||
ranges: [{"start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11}]) | ||
ranges: [{ "start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }]) |
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.
Metrics/LineLength: Line is too long. [142/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -301,9 +301,9 @@ | |||
before do | |||
@draft_version = create(:legislation_draft_version, :published) | |||
create(:legislation_annotation, draft_version: @draft_version, text: "my annotation", quote: "ipsum", | |||
ranges: [{"start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11}]) | |||
ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11 }]) |
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.
Metrics/LineLength: Line is too long. [128/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@draft_version_2 = create(:legislation_draft_version, :published, process: @process, | ||
title: "Version 2", body: "Text with quote for version 2") | ||
create(:legislation_annotation, draft_version: @draft_version_2, text: "annotation for version 2", quote: "quote for version 2", | ||
ranges: [{"start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30}]) | ||
ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }]) |
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.
Metrics/LineLength: Line is too long. [131/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
create(:legislation_annotation, draft_version: draft_version, text: "my other annotation", | ||
ranges: [{"start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19}]) | ||
ranges: [{ "start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19 }]) |
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.
Metrics/LineLength: Line is too long. [129/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -184,9 +184,9 @@ | |||
scenario "View annotations and comments" do | |||
draft_version = create(:legislation_draft_version, :published) | |||
annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation", | |||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}]) | |||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }]) |
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.
Metrics/LineLength: Line is too long. [142/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -73,7 +73,7 @@ class Investment < ApplicationRecord | |||
scope :without_valuator, -> { valuation_open.without_valuator_group.where(valuator_assignments_count: 0) } | |||
scope :under_valuation, -> { valuation_open.valuating.where("administrator_id IS NOT ?", nil) } | |||
scope :managed, -> { valuation_open.where(valuator_assignments_count: 0).where("administrator_id IS NOT ?", nil) } | |||
scope :valuating, -> { valuation_open.where("valuator_assignments_count > 0 OR valuator_group_assignments_count > 0" ) } | |||
scope :valuating, -> { valuation_open.where("valuator_assignments_count > 0 OR valuator_group_assignments_count > 0") } |
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.
Metrics/LineLength: Line is too long. [141/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -180,13 +180,13 @@ | |||
status: "published") | |||
annotation0 = create(:legislation_annotation, | |||
draft_version: draft_version_1, text: "my annotation123", | |||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}]) | |||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }]) |
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.
Metrics/LineLength: Line is too long. [117/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
bdgt_invest3 = create(:budget_investment, heading: heading,title: "Save the forest") | ||
bdgt_invest1 = create(:budget_investment, heading: heading, title: "Get Schwifty", author: ana, created_at: 1.minute.ago) | ||
bdgt_invest2 = create(:budget_investment, heading: heading, title: "Hello Schwifty", author: john, created_at: 2.days.ago) | ||
bdgt_invest3 = create(:budget_investment, heading: heading, title: "Save the forest") |
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.
Lint/UselessAssignment: Useless assignment to variable - bdgt_invest3. Did you mean bdgt_invest1? (https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars)
92d44c4
to
0a1e7ef
Compare
396ad51
to
d862d79
Compare
0a1e7ef
to
577d85d
Compare
bdgt_invest2 = create(:budget_investment, heading: heading,title: "Hello Schwifty", author: john, created_at: 2.days.ago) | ||
bdgt_invest3 = create(:budget_investment, heading: heading,title: "Save the forest") | ||
bdgt_invest1 = create(:budget_investment, heading: heading, title: "Get Schwifty", author: ana, created_at: 1.minute.ago) | ||
bdgt_invest2 = create(:budget_investment, heading: heading, title: "Hello Schwifty", author: john, created_at: 2.days.ago) |
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.
Lint/UselessAssignment: Useless assignment to variable - bdgt_invest2. Did you mean bdgt_invest1? (https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars)
Metrics/LineLength: Line is too long. [132/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
bdgt_invest1 = create(:budget_investment, heading: heading,title: "Get Schwifty", author: ana, created_at: 1.minute.ago) | ||
bdgt_invest2 = create(:budget_investment, heading: heading,title: "Hello Schwifty", author: john, created_at: 2.days.ago) | ||
bdgt_invest3 = create(:budget_investment, heading: heading,title: "Save the forest") | ||
bdgt_invest1 = create(:budget_investment, heading: heading, title: "Get Schwifty", author: ana, created_at: 1.minute.ago) |
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.
Metrics/LineLength: Line is too long. [134/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
scope :by_date, ->(date){ where(date: date) } | ||
scope :by_officer, ->(officer) { where(officer_id: officer.id) } | ||
scope :by_poll, ->(poll) { joins(:booth_assignment).where("poll_booth_assignments.poll_id" => poll.id) } | ||
scope :by_booth, ->(booth) { joins(:booth_assignment).where("poll_booth_assignments.booth_id" => booth.id) } |
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.
Metrics/LineLength: Line is too long. [112/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
groups[:total][:percentage_participants_every_phase] = groups.collect {|_k, v| v[:percentage_participants_every_phase]}.sum | ||
groups[:total][:percentage_participants_support_phase] = groups.collect { |_k, v| v[:percentage_participants_support_phase] }.sum | ||
groups[:total][:percentage_participants_vote_phase] = groups.collect { |_k, v| v[:percentage_participants_vote_phase] }.sum | ||
groups[:total][:percentage_participants_every_phase] = groups.collect { |_k, v| v[:percentage_participants_every_phase] }.sum |
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.
Metrics/LineLength: Line is too long. [129/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
groups[:total][:percentage_participants_vote_phase] = groups.collect {|_k, v| v[:percentage_participants_vote_phase]}.sum | ||
groups[:total][:percentage_participants_every_phase] = groups.collect {|_k, v| v[:percentage_participants_every_phase]}.sum | ||
groups[:total][:percentage_participants_support_phase] = groups.collect { |_k, v| v[:percentage_participants_support_phase] }.sum | ||
groups[:total][:percentage_participants_vote_phase] = groups.collect { |_k, v| v[:percentage_participants_vote_phase] }.sum |
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.
Metrics/LineLength: Line is too long. [127/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -27,7 +27,7 @@ def render_destroy_document_link(builder, document) | |||
remote: true, | |||
class: "delete remove-cached-attachment" | |||
else | |||
link_to_remove_association document.new_record? ? t("documents.form.cancel_button") : t("documents.form.delete_button") , builder, class: "delete remove-document" | |||
link_to_remove_association document.new_record? ? t("documents.form.cancel_button") : t("documents.form.delete_button"), builder, class: "delete remove-document" |
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.
Metrics/LineLength: Line is too long. [167/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
|
||
@user_count_by_district = User.where.not(balloted_heading_id: nil).group(:balloted_heading_id).count.collect {|k,v| [Budget::Heading.find(k).name, v]}.sort | ||
@user_count_by_district = User.where.not(balloted_heading_id: nil).group(:balloted_heading_id).count.collect { |k, v| [Budget::Heading.find(k).name, v] }.sort |
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.
Metrics/LineLength: Line is too long. [162/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
|
||
@vote_count = @budget.lines.count | ||
|
||
@vote_count_by_heading = @budget.lines.group(:heading_id).count.collect {|k,v| [Budget::Heading.find(k).name, v]}.sort | ||
@vote_count_by_heading = @budget.lines.group(:heading_id).count.collect { |k, v| [Budget::Heading.find(k).name, v] }.sort |
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.
Metrics/LineLength: Line is too long. [125/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
else | ||
render json: {available: true, message: t("devise_views.users.registrations.new.username_is_available")} | ||
render json: { available: true, message: t("devise_views.users.registrations.new.username_is_available") } |
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.
Metrics/LineLength: Line is too long. [112/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -50,9 +50,9 @@ def do_finish_signup | |||
|
|||
def check_username | |||
if User.find_by username: params[:username] | |||
render json: {available: false, message: t("devise_views.users.registrations.new.username_is_not_available")} | |||
render json: { available: false, message: t("devise_views.users.registrations.new.username_is_not_available") } |
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.
Metrics/LineLength: Line is too long. [117/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
577d85d
to
423646b
Compare
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [184/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
path, documentable_path_arguments, | ||
fill_resource_method_name, submit_button, | ||
documentable_success_notice| | ||
shared_examples "nested documentable" do |login_as_name, documentable_factory_name, path, documentable_path_arguments, fill_resource_method_name, submit_button, documentable_success_notice| |
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.
Metrics/LineLength: Line is too long. [189/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
imageable_path_arguments, fill_resource_method_name, | ||
submit_button, imageable_success_notice, | ||
has_many_images = false| | ||
shared_examples "nested imageable" do |imageable_factory_name, path, imageable_path_arguments, fill_resource_method_name, submit_button, imageable_success_notice, has_many_images = false| |
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.
Metrics/LineLength: Line is too long. [187/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
423646b
to
c6faf08
Compare
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.
Some files could not be reviewed due to errors:
warning: parser/current is loading parser/ruby26, which recognizes
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.0-dev-compliant syntax, but you are running 2.6.1. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. 1 error(s) were found in ERB files Linting 1 files with 13 linters...String not translated: •
In file: app/views/admin/signature_sheets/show.html.erb:6
c6faf08
to
008b9c7
Compare
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.
Some files could not be reviewed due to errors:
warning: parser/current is loading parser/ruby26, which recognizes
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.0-dev-compliant syntax, but you are running 2.6.1. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. 1 error(s) were found in ERB files Linting 1 files with 13 linters...String not translated: •
In file: app/views/admin/signature_sheets/show.html.erb:6
008b9c7
to
b09d920
Compare
b09d920
to
987099c
Compare
@@ -38,7 +38,7 @@ | |||
resource.destroy | |||
resource.reload | |||
|
|||
expect{ resource.restore(recursive: true) }.to change { resource.translations.with_deleted.first.hidden_at } | |||
expect { resource.restore(recursive: true) }.to change { resource.translations.with_deleted.first.hidden_at } |
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.
Metrics/LineLength: Line is too long. [115/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
@@ -1,6 +1,6 @@ | |||
<%= render "shared/globalize_locales", resource: @draft_version %> | |||
|
|||
<%= translatable_form_for [:admin, @process, @draft_version], url: url, html: {data: {watch_changes: true}} do |f| %> | |||
<%= translatable_form_for [:admin, @process, @draft_version], url: url, html: { data: { watch_changes: true }} do |f| %> |
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/SpaceInsideHashLiteralBraces: Space inside } missing.
@@ -35,7 +35,7 @@ def verify_signatures | |||
end | |||
|
|||
def parsed_required_fields_to_verify_groups | |||
required_fields_to_verify.split(/[;]/).collect {|d| d.gsub(/\s+/, "") }.map { |group| group.split(/[,]/)} | |||
required_fields_to_verify.split(/[;]/).collect { |d| d.gsub(/\s+/, "") }.map { |group| group.split(/[,]/) } |
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.
Metrics/LineLength: Line is too long. [111/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
end | ||
|
||
if self.paranoid? && translation_class.attribute_names.include?("hidden_at") | ||
translation_class.send :acts_as_paranoid, column: :hidden_at | ||
end | ||
|
||
scope :with_translation, -> { joins("LEFT OUTER JOIN #{translations_table_name} ON #{table_name}.id = #{translations_table_name}.#{reflections["translations"].foreign_key} AND #{translations_table_name}.locale='#{I18n.locale }'") } | ||
scope :with_translation, -> { joins("LEFT OUTER JOIN #{translations_table_name} ON #{table_name}.id = #{translations_table_name}.#{reflections["translations"].foreign_key} AND #{translations_table_name}.locale='#{I18n.locale}'") } |
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.
Metrics/LineLength: Line is too long. [234/110] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
987099c
to
d0bd2b8
Compare
d0bd2b8
to
f0bb01b
Compare
0d49612
to
f976777
Compare
ffb1151
to
f749710
Compare
f0bb01b
to
c13e709
Compare
We were following these rules in most places; we just didn't define them anywhere.
c13e709
to
f9ed186
Compare
Add rubocop spacing rules
References
Objectives
Notes
In another pull request we'll make the code DRYer by removing the rules from the
.erb-lint.yml
file. We cannot do it yet because the option to do so in ERB Lint doesn't seem to work with Ruby 2.3.2.