Skip to content

Commit 741e83d

Browse files
committed
style: auto-gen-only-exclude
1 parent a7088ab commit 741e83d

File tree

5 files changed

+37
-24
lines changed

5 files changed

+37
-24
lines changed

.rubocop_todo.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2018-10-26 17:05:15 +0200 using RuboCop version 0.60.0.
3+
# on 2018-12-06 10:04:35 +0100 using RuboCop version 0.61.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -13,7 +13,20 @@ Lint/AmbiguousOperator:
1313
- 'lib/jekyll/commands/page.rb'
1414
- 'lib/jekyll/commands/post.rb'
1515

16-
# Offense count: 5
16+
# Offense count: 13
17+
# Configuration parameters: CountComments, Max, ExcludedMethods.
18+
# ExcludedMethods: refine
19+
Metrics/BlockLength:
20+
Exclude:
21+
- 'spec/draft_spec.rb'
22+
- 'spec/file_info_spec.rb'
23+
- 'spec/page_spec.rb'
24+
- 'spec/post_spec.rb'
25+
- 'spec/publish_spec.rb'
26+
- 'spec/spec_helper.rb'
27+
- 'spec/unpublish_spec.rb'
28+
29+
# Offense count: 7
1730
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
1831
# URISchemes: http, https
1932
Metrics/LineLength:
@@ -22,3 +35,5 @@ Metrics/LineLength:
2235
- 'lib/jekyll-compose/file_mover.rb'
2336
- 'lib/jekyll/commands/publish.rb'
2437
- 'lib/jekyll/commands/unpublish.rb'
38+
- 'spec/post_spec.rb'
39+
- 'spec/publish_spec.rb'

spec/file_info_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
context "with a title of only words" do
1111
let(:expected_result) do
1212
<<~CONTENT
13-
---
14-
layout: post
15-
title: A test arg parser
16-
---
13+
---
14+
layout: post
15+
title: A test arg parser
16+
---
1717
CONTENT
1818
end
1919

@@ -33,10 +33,10 @@
3333
context "with a title that includes a colon" do
3434
let(:expected_result) do
3535
<<~CONTENT
36-
---
37-
layout: post
38-
title: 'A test: arg parser'
39-
---
36+
---
37+
layout: post
38+
title: 'A test: arg parser'
39+
---
4040
CONTENT
4141
end
4242

@@ -56,11 +56,11 @@
5656
context "with custom values" do
5757
let(:expected_result) do
5858
<<~CONTENT
59-
---
60-
layout: post
61-
title: A test
62-
foo: bar
63-
---
59+
---
60+
layout: post
61+
title: A test
62+
foo: bar
63+
---
6464
CONTENT
6565
end
6666

spec/post_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
it "creates a post with a specified date" do
3333
path = posts_dir.join "2012-03-04-a-test-post.md"
3434
expect(path).not_to exist
35-
capture_stdout { described_class.process(args, { "date" => "2012-3-4" }) }
35+
capture_stdout { described_class.process(args, "date" => "2012-3-4") }
3636
expect(path).to exist
3737
expect(File.read(path)).to match(%r!date: 2012-03-04 00:00 \+0000!)
3838
end

spec/publish_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
it "publishes with a specified date" do
4040
path = posts_dir.join "2012-03-04-#{draft_to_publish}"
4141
expect(path).not_to exist
42-
capture_stdout { described_class.process(args, { "date"=>"2012-3-4" }) }
42+
capture_stdout { described_class.process(args, "date"=>"2012-3-4") }
4343
expect(path).to exist
4444
end
4545

@@ -51,7 +51,7 @@
5151

5252
it "publishes a draft on the specified date" do
5353
path = posts_dir.join "2012-03-04-a-test-post.md"
54-
capture_stdout { described_class.process(args, { "date" => "2012-3-4" }) }
54+
capture_stdout { described_class.process(args, "date" => "2012-3-4") }
5555
expect(path).to exist
5656
end
5757

spec/spec_helper.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
config.warnings = true
2020

21-
if config.files_to_run.one?
22-
config.default_formatter = "doc"
23-
end
21+
config.default_formatter = "doc" if config.files_to_run.one?
2422

2523
config.profile_examples = 3
2624

@@ -44,9 +42,9 @@ def source_dir(*files)
4442

4543
def fixture_site
4644
Jekyll::Site.new(Jekyll::Utils.deep_merge_hashes(
47-
Jekyll::Configuration::DEFAULTS,
48-
{ "source" => source_dir, "destination" => test_dir("dest") }
49-
))
45+
Jekyll::Configuration::DEFAULTS,
46+
"source" => source_dir, "destination" => test_dir("dest")
47+
))
5048
end
5149

5250
def capture_stdout(level = :debug)

0 commit comments

Comments
 (0)