Remove consecutive blank lines

This commit is contained in:
Javi Martín
2019-06-22 15:34:27 +02:00
parent 47b2c42a1d
commit 488461b8ac
36 changed files with 3 additions and 40 deletions

View File

@@ -26,6 +26,9 @@ Layout/IndentationConsistency:
Layout/IndentationWidth: Layout/IndentationWidth:
Enabled: true Enabled: true
Layout/EmptyLines:
Enabled: true
Layout/EndOfLine: Layout/EndOfLine:
EnforcedStyle: lf EnforcedStyle: lf

View File

@@ -22,7 +22,6 @@ class Admin::Poll::ActivePollsController < Admin::Poll::BaseController
end end
end end
private private
def load_active_poll def load_active_poll

View File

@@ -15,7 +15,6 @@ class Dashboard::SupportsController < Dashboard::BaseController
accumulate_supports(grouped_votes) accumulate_supports(grouped_votes)
end end
def supports def supports
@supports ||= Vote @supports ||= Vote
.where(votable: proposal, .where(votable: proposal,

View File

@@ -10,7 +10,6 @@ class Legislation::ProcessesController < Legislation::BaseController
before_action :set_random_seed, only: :proposals before_action :set_random_seed, only: :proposals
before_action :check_past, only: :resume before_action :check_past, only: :resume
def index def index
@current_filter ||= "open" @current_filter ||= "open"
@processes = ::Legislation::Process.send(@current_filter).published @processes = ::Legislation::Process.send(@current_filter).published

View File

@@ -18,7 +18,6 @@ class Poll::PairAnswer < ApplicationRecord
validates :answer_right, inclusion: { in: ->(a) { a.question.question_answers.visibles }}, validates :answer_right, inclusion: { in: ->(a) { a.question.question_answers.visibles }},
unless: ->(a) { a.question.blank? } unless: ->(a) { a.question.blank? }
scope :by_author, ->(author_id) { where(author_id: author_id) } scope :by_author, ->(author_id) { where(author_id: author_id) }
scope :by_question, ->(question_id) { where(question_id: question_id) } scope :by_question, ->(question_id) { where(question_id: question_id) }

View File

@@ -358,7 +358,6 @@ class User < ApplicationRecord
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
end end
def self.current_user def self.current_user
Thread.current[:user] Thread.current[:user]
end end

View File

@@ -110,7 +110,6 @@ class VotationType < ApplicationRecord
end end
end end
result result
end end

View File

@@ -49,7 +49,6 @@
<% end %> <% end %>
</div> </div>
<% if @account.email.present? %> <% if @account.email.present? %>
<h2><%= t("account.show.notifications")%></h2> <h2><%= t("account.show.notifications")%></h2>

View File

@@ -1,6 +1,5 @@
<a class="small float-right clear" data-open="download-modal"><%= t("admin.budget_investments.index.download_current_selection") %></a> <a class="small float-right clear" data-open="download-modal"><%= t("admin.budget_investments.index.download_current_selection") %></a>
<% if params[:advanced_filters].include?("winners") %> <% if params[:advanced_filters].include?("winners") %>
<% if display_calculate_winners_button?(@budget) %> <% if display_calculate_winners_button?(@budget) %>
<%= link_to calculate_winner_button_text(@budget), <%= link_to calculate_winner_button_text(@budget),

View File

@@ -127,7 +127,6 @@
label: t("admin.budget_investments.edit.milestone_tags") %> label: t("admin.budget_investments.edit.milestone_tags") %>
</div> </div>
<div class="small-12 column margin-top"> <div class="small-12 column margin-top">
<%= f.submit(class: "button", value: t("admin.budget_investments.edit.submit_button")) %> <%= f.submit(class: "button", value: t("admin.budget_investments.edit.submit_button")) %>
</div> </div>

View File

@@ -1,7 +1,6 @@
<h2><%= t("admin.hidden_comments.index.title") %></h2> <h2><%= t("admin.hidden_comments.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p> <p><%= t("admin.shared.moderated_content") %></p>
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_comments.index" %> <%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_comments.index" %>
<% if @comments.any? %> <% if @comments.any? %>

View File

@@ -1,7 +1,6 @@
<h2><%= t("admin.hidden_debates.index.title") %></h2> <h2><%= t("admin.hidden_debates.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p> <p><%= t("admin.shared.moderated_content") %></p>
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_debates.index" %> <%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_debates.index" %>
<% if @debates.any? %> <% if @debates.any? %>

View File

@@ -18,7 +18,6 @@
<%= simple_format @signature_sheet.required_fields_to_verify %> <%= simple_format @signature_sheet.required_fields_to_verify %>
</div> </div>
<div id="verified_signatures" class="callout success"> <div id="verified_signatures" class="callout success">
<strong> <strong>
<%= t("admin.signature_sheets.show.verified", <%= t("admin.signature_sheets.show.verified",

View File

@@ -11,7 +11,6 @@
<% end %> <% end %>
</div> </div>
<div id="users"> <div id="users">
<%= render "users" %> <%= render "users" %>
</div> </div>

View File

@@ -8,7 +8,6 @@
</h3> </h3>
</div> </div>
<div class="row"> <div class="row">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<table> <table>

View File

@@ -58,7 +58,6 @@
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -37,7 +37,6 @@
<% end %> <% end %>
</div> </div>
<div class="tabs-content" data-tabs-content="topics-tabs"> <div class="tabs-content" data-tabs-content="topics-tabs">
<%= render "topics/filter_subnav" %> <%= render "topics/filter_subnav" %>
<div class="tabs-panel is-active" id="tab-comments"> <div class="tabs-panel is-active" id="tab-comments">

View File

@@ -28,7 +28,6 @@
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %> <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>
<%= f.password_field :password, autocomplete: "off", <%= f.password_field :password, autocomplete: "off",
placeholder: t("devise_views.users.registrations.new.password_label") %> placeholder: t("devise_views.users.registrations.new.password_label") %>

View File

@@ -18,7 +18,6 @@
<main> <main>
<%= render "feeds" %> <%= render "feeds" %>
<div class="row"> <div class="row">
<% if @cards.any? %> <% if @cards.any? %>
<div class="small-12 column <%= "large-8" if feed_processes_enabled? %>"> <div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">

View File

@@ -52,7 +52,6 @@ namespace :deploy do
after :finishing, "deploy:cleanup" after :finishing, "deploy:cleanup"
desc "Deploys and runs the tasks needed to upgrade to a new release" desc "Deploys and runs the tasks needed to upgrade to a new release"
task :upgrade do task :upgrade do
after "add_new_settings", "execute_release_tasks" after "add_new_settings", "execute_release_tasks"

View File

@@ -48,7 +48,6 @@ Rails.application.configure do
# config.action_cable.url = 'wss://example.com/cable' # config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true config.force_ssl = true

View File

@@ -14,7 +14,6 @@ class EmailDigest
notifications.any? notifications.any?
end end
def deliver(run_at) def deliver(run_at)
if valid_email? && pending_notifications? if valid_email? && pending_notifications?
Mailer.delay(run_at: run_at).proposal_notification_digest(user, notifications.to_a) Mailer.delay(run_at: run_at).proposal_notification_digest(user, notifications.to_a)

View File

@@ -16,7 +16,6 @@ describe Legislation::AnnotationsController do
title: "Final version") } title: "Final version") }
let(:user) { create(:user, :level_two) } let(:user) { create(:user, :level_two) }
it "creates an ahoy event" do it "creates an ahoy event" do
sign_in user sign_in user

View File

@@ -98,7 +98,6 @@ describe "Admin Notifications" do
click_link "Edit" click_link "Edit"
end end
fill_in_admin_notification_form(segment_recipient: "All users", fill_in_admin_notification_form(segment_recipient: "All users",
title: "Other title", title: "Other title",
body: "Other body", body: "Other body",

View File

@@ -687,7 +687,6 @@ describe "Admin budget investments" do
administrator: administrator) administrator: administrator)
create(:budget_investment, budget: budget, title: "More hospitals") create(:budget_investment, budget: budget, title: "More hospitals")
visit admin_budget_budget_investments_path(budget_id: budget.id) visit admin_budget_budget_investments_path(budget_id: budget.id)
expect(page).to have_css(".budget_investment", count: 3) expect(page).to have_css(".budget_investment", count: 3)
@@ -767,7 +766,6 @@ describe "Admin budget investments" do
administrator: administrator) administrator: administrator)
create(:budget_investment, budget: budget, title: "More hostals") create(:budget_investment, budget: budget, title: "More hostals")
visit admin_budget_budget_investments_path(budget_id: budget.id) visit admin_budget_budget_investments_path(budget_id: budget.id)
expect(page).to have_css(".budget_investment", count: 4) expect(page).to have_css(".budget_investment", count: 4)
@@ -1884,7 +1882,6 @@ describe "Admin budget investments" do
expect(cookie_value).to eq("id,supports,admin,geozone," + expect(cookie_value).to eq("id,supports,admin,geozone," +
"feasibility,valuation_finished,visible_to_valuators,selected,incompatible,author") "feasibility,valuation_finished,visible_to_valuators,selected,incompatible,author")
visit admin_budget_budget_investments_path(budget) visit admin_budget_budget_investments_path(budget)
cookies = page.driver.browser.manage.all_cookies cookies = page.driver.browser.manage.all_cookies

View File

@@ -286,7 +286,6 @@ describe "Admin budgets" do
expect(page).not_to have_content unselected.title expect(page).not_to have_content unselected.title
expect(page).not_to have_content selected.title expect(page).not_to have_content selected.title
visit edit_admin_budget_path(budget) visit edit_admin_budget_path(budget)
expect(page).to have_content "See results" expect(page).to have_content "See results"
end end

View File

@@ -32,7 +32,6 @@ describe "Admin Budgets" do
name_en: "Budget for climate change", name_en: "Budget for climate change",
name_fr: "Budget pour le changement climatique") name_fr: "Budget pour le changement climatique")
visit admin_budgets_path visit admin_budgets_path
select("Français", from: "locale-switcher") select("Français", from: "locale-switcher")

View File

@@ -75,8 +75,6 @@ describe "Legislation" do
@debate = create(:legislation_question, process: @process, title: "Question 2") @debate = create(:legislation_question, process: @process, title: "Question 2")
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 3") create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 3")
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 4") create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 4")
end end
scenario "show debates list" do scenario "show debates list" do

View File

@@ -367,5 +367,4 @@ describe "Poll Votation Type" do
end end
end end
end end

View File

@@ -547,7 +547,6 @@ describe "Valuation budget investments" do
investment = create(:budget_investment, budget: budget) investment = create(:budget_investment, budget: budget)
investment.valuators << [valuator] investment.valuators << [valuator]
login_as(admin.user) login_as(admin.user)
visit valuation_budget_budget_investment_path(budget, investment) visit valuation_budget_budget_investment_path(budget, investment)
click_link "Edit dossier" click_link "Edit dossier"

View File

@@ -121,5 +121,4 @@ describe "Welcome screen" do
Setting["feature.user.skip_verification"] = nil Setting["feature.user.skip_verification"] = nil
end end
end end

View File

@@ -77,6 +77,4 @@ describe SignatureSheetsHelper do
end end
end end

View File

@@ -168,7 +168,6 @@ describe Budget::Heading do
end end
end end
describe "save longitude" do describe "save longitude" do
it "Doesn't allow longitude < -180" do it "Doesn't allow longitude < -180" do
@@ -267,7 +266,6 @@ describe Budget::Heading do
end end
end end
describe "heading" do describe "heading" do
it "can be deleted if no budget's investments associated" do it "can be deleted if no budget's investments associated" do
heading1 = create(:budget_heading, group: group, name: "name") heading1 = create(:budget_heading, group: group, name: "name")

View File

@@ -279,7 +279,6 @@ describe Dashboard::Action do
let!(:resource) { create(:dashboard_action, :resource, :active, day_offset: 0, let!(:resource) { create(:dashboard_action, :resource, :active, day_offset: 0,
published_proposal: true) } published_proposal: true) }
it "when proposal has been created today and day_offset is valid only for today" do it "when proposal has been created today and day_offset is valid only for today" do
expect(described_class.detect_new_actions_since(Date.yesterday, expect(described_class.detect_new_actions_since(Date.yesterday,
proposal)).to include(resource.id) proposal)).to include(resource.id)

View File

@@ -20,7 +20,6 @@ RSpec.describe Legislation::Process::Phase, type: :model do
expect(process.draft_phase.enabled?).to be false expect(process.draft_phase.enabled?).to be false
end end
it "checks allegations phase" do it "checks allegations phase" do
expect(process.allegations_phase.enabled?).to be true expect(process.allegations_phase.enabled?).to be true

View File

@@ -72,7 +72,6 @@ describe Poll::PairAnswer do
end end
describe "#generate_pair" do describe "#generate_pair" do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:question) { create(:poll_question) } let(:question) { create(:poll_question) }