diff --git a/.rubocop.yml b/.rubocop.yml index d3bc438c..44e520d4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -174,10 +174,6 @@ Style/StringLiteralsInInterpolation: Style/SymbolArray: EnforcedStyle: brackets -# Prefer consistent lines for multi-line hashes -Style/TrailingCommaInHashLiteral: - EnforcedStyleForMultiline: comma - # Allow small arrays of words with quotes Style/WordArray: MinSize: 4 diff --git a/app/models/archives_sidebar.rb b/app/models/archives_sidebar.rb index fbf2baa9..ce693fa1 100644 --- a/app/models/archives_sidebar.rb +++ b/app/models/archives_sidebar.rb @@ -36,7 +36,7 @@ def parse_request(_contents, _params) name: I18n.l(Date.new(year, month), format: "%B %Y"), month: month, year: year, - article_count: entry.count, + article_count: entry.count } end end diff --git a/spec/controllers/admin/articles_controller_spec.rb b/spec/controllers/admin/articles_controller_spec.rb index 3749a189..37341179 100644 --- a/spec/controllers/admin/articles_controller_spec.rb +++ b/spec/controllers/admin/articles_controller_spec.rb @@ -32,7 +32,7 @@ it "search query and limit on published_at" do get :index, params: { search: { searchstring: article.body[0..4], - published_at: article.published_at + 2.days, + published_at: article.published_at + 2.days } } expect(assigns(:articles)).to be_empty end @@ -404,7 +404,7 @@ def base_article(options = {}) it "allows updating body_and_extended" do put :update, params: { "id" => article.id, "article" => { - "body_and_extended" => "foobarbaz", + "body_and_extended" => "foobarbaz" } } expect(response).to redirect_to action: "index" article.reload @@ -414,7 +414,7 @@ def base_article(options = {}) it "allows updating password" do put :update, params: { "id" => article.id, "article" => { - "password" => "foobar", + "password" => "foobar" } } expect(response).to redirect_to action: "index" article.reload @@ -431,7 +431,7 @@ def base_article(options = {}) before do put(:update, params: { id: original.id, - article: { id: draft.id, body: "update" }, + article: { id: draft.id, body: "update" } }) end @@ -454,7 +454,7 @@ def base_article(options = {}) before do put(:update, params: { id: draft.id, - article: { id: draft.id, body: "update" }, + article: { id: draft.id, body: "update" } }) end @@ -477,7 +477,7 @@ def base_article(options = {}) before do put(:update, params: { id: draft.id, - article: { id: draft.id, body: "update", published_at: "2016-07-07" }, + article: { id: draft.id, body: "update", published_at: "2016-07-07" } }) end @@ -492,7 +492,7 @@ def base_article(options = {}) @orig = create(:article) put(:update, params: { id: @orig.id, - article: { title: @orig.title, draft: "draft", body: "update" }, + article: { title: @orig.title, draft: "draft", body: "update" } }) end diff --git a/spec/controllers/admin/pages_controller_spec.rb b/spec/controllers/admin/pages_controller_spec.rb index 71a91ddb..b93b7722 100644 --- a/spec/controllers/admin/pages_controller_spec.rb +++ b/spec/controllers/admin/pages_controller_spec.rb @@ -58,7 +58,7 @@ def base_page(options = {}) page: { name: "new_page", title: "New Page Title", body: "Emphasis _mine_, arguments *strong*" - }, + } } end diff --git a/spec/controllers/notes_controller_spec.rb b/spec/controllers/notes_controller_spec.rb index 9558b010..bc37d187 100644 --- a/spec/controllers/notes_controller_spec.rb +++ b/spec/controllers/notes_controller_spec.rb @@ -44,10 +44,10 @@ "screen_name" => "a screen name", "entities" => { "url" => { - "urls" => [{ "expanded_url" => "an url" }], - }, - }, - }, + "urls" => [{ "expanded_url" => "an url" }] + } + } + } } end let(:permalink) do diff --git a/spec/dummy/config/environments/development.rb b/spec/dummy/config/environments/development.rb index 2895183e..b1ad74f1 100644 --- a/spec/dummy/config/environments/development.rb +++ b/spec/dummy/config/environments/development.rb @@ -21,7 +21,7 @@ config.cache_store = :memory_store config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}", + "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb index f98f7779..0a826129 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/dummy/config/environments/test.rb @@ -17,7 +17,7 @@ # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}", + "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. diff --git a/spec/helpers/base_helper_spec.rb b/spec/helpers/base_helper_spec.rb index b02f61cd..7a1e2c32 100644 --- a/spec/helpers/base_helper_spec.rb +++ b/spec/helpers/base_helper_spec.rb @@ -97,8 +97,8 @@ def parse_request(_contents, _request_params) reply = { "user" => { "name" => "truc", - "entities" => { "url" => { "urls" => [{ "expanded_url" => "an url" }] } }, - }, + "entities" => { "url" => { "urls" => [{ "expanded_url" => "an url" }] } } + } } expect(get_reply_context_url(reply)).to eq 'truc' end @@ -116,7 +116,7 @@ def parse_request(_contents, _request_params) "created_at" => "Thu Jan 23 13:47:00 +0000 2014", "user" => { "screen_name" => "a_screen_name", - "entities" => { "url" => { "urls" => [{ "expanded_url" => "an url" }] } }, + "entities" => { "url" => { "urls" => [{ "expanded_url" => "an url" }] } } } } end