Skip to content

Commit 2bfa3b4

Browse files
authored
Merge pull request #57 from jekyll/release/4.0
Release 💎 0.4.0
2 parents 3f4e002 + 2baac09 commit 2bfa3b4

8 files changed

+102
-183
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ spec/reports
1515
test/tmp
1616
test/version_tmp
1717
tmp
18+
vendor/bundle

.rubocop.yml

+7-169
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,10 @@
1-
---
1+
inherit_from: .rubocop_todo.yml
2+
3+
require: rubocop-jekyll
4+
inherit_gem:
5+
rubocop-jekyll: .rubocop.yml
6+
27
AllCops:
3-
TargetRubyVersion: 2.3
8+
TargetRubyVersion: 2.4
49
Exclude:
510
- vendor/**/*
6-
7-
Layout/AlignArray:
8-
Enabled: false
9-
Layout/AlignHash:
10-
EnforcedHashRocketStyle: table
11-
Layout/AlignParameters:
12-
Enabled: false
13-
Layout/EmptyLinesAroundAccessModifier:
14-
Enabled: false
15-
Layout/EmptyLinesAroundModuleBody:
16-
Enabled: false
17-
Layout/EndOfLine:
18-
EnforcedStyle: native
19-
Layout/ExtraSpacing:
20-
AllowForAlignment: true
21-
Layout/FirstParameterIndentation:
22-
EnforcedStyle: consistent
23-
Layout/IndentationWidth:
24-
Severity: error
25-
Layout/IndentArray:
26-
EnforcedStyle: consistent
27-
Layout/IndentHash:
28-
EnforcedStyle: consistent
29-
Layout/IndentHeredoc:
30-
Enabled: false
31-
Exclude:
32-
- spec/**/*
33-
Layout/MultilineMethodCallIndentation:
34-
EnforcedStyle: indented
35-
Layout/MultilineOperationIndentation:
36-
EnforcedStyle: indented
37-
Layout/SpaceAroundOperators:
38-
Enabled: true
39-
Lint/AssignmentInCondition:
40-
Exclude:
41-
- lib/mercenary/command.rb
42-
- lib/mercenary/option.rb
43-
- lib/mercenary/presenter.rb
44-
Lint/DuplicateMethods:
45-
Exclude:
46-
- lib/mercenary/command.rb
47-
Layout/EndAlignment:
48-
Severity: error
49-
Lint/HandleExceptions:
50-
Exclude:
51-
- lib/mercenary/option.rb
52-
Style/RescueStandardError:
53-
Exclude:
54-
- lib/mercenary/program.rb
55-
Lint/UselessAssignment:
56-
Exclude:
57-
- lib/mercenary/presenter.rb
58-
Lint/UnreachableCode:
59-
Severity: error
60-
Lint/UselessAccessModifier:
61-
Enabled: false
62-
Lint/Void:
63-
Enabled: false
64-
Metrics/AbcSize:
65-
Max: 21
66-
Exclude:
67-
- lib/mercenary/program.rb
68-
Metrics/BlockLength:
69-
Exclude:
70-
- examples/**/*
71-
- spec/**/*
72-
Metrics/ClassLength:
73-
Max: 300
74-
Metrics/CyclomaticComplexity:
75-
Max: 9
76-
Metrics/LineLength:
77-
Exclude:
78-
- lib/mercenary/command.rb
79-
- lib/mercenary/presenter.rb
80-
- lib/mercenary/program.rb
81-
- examples/**/*
82-
- spec/**/*
83-
- mercenary.gemspec
84-
Max: 90
85-
Severity: warning
86-
Metrics/MethodLength:
87-
Exclude:
88-
- lib/mercenary/program.rb
89-
CountComments: false
90-
Max: 20
91-
Severity: error
92-
Metrics/ModuleLength:
93-
Max: 240
94-
Metrics/ParameterLists:
95-
Max: 4
96-
Metrics/PerceivedComplexity:
97-
Max: 8
98-
Naming/FileName:
99-
Enabled: false
100-
Naming/HeredocDelimiterNaming:
101-
Enabled: false
102-
Naming/PredicateName:
103-
Exclude:
104-
- lib/mercenary/command.rb
105-
Style/Alias:
106-
Enabled: false
107-
Style/AndOr:
108-
Severity: error
109-
Style/Attr:
110-
Enabled: false
111-
Style/BracesAroundHashParameters:
112-
Enabled: false
113-
Style/ClassAndModuleChildren:
114-
Enabled: false
115-
Style/FrozenStringLiteralComment:
116-
Exclude:
117-
- lib/mercenary/command.rb
118-
Enabled: true
119-
EnforcedStyle: always
120-
Style/Documentation:
121-
Enabled: false
122-
Style/DoubleNegation:
123-
Enabled: false
124-
Style/GuardClause:
125-
Enabled: false
126-
Style/HashSyntax:
127-
EnforcedStyle: hash_rockets
128-
Severity: error
129-
Style/IfUnlessModifier:
130-
Enabled: false
131-
Style/InverseMethods:
132-
Enabled: false
133-
Style/MissingRespondToMissing:
134-
Exclude:
135-
- lib/mercenary/presenter.rb
136-
Style/ModuleFunction:
137-
Enabled: false
138-
Style/MultilineTernaryOperator:
139-
Severity: error
140-
Style/PercentLiteralDelimiters:
141-
PreferredDelimiters:
142-
"%q": "{}"
143-
"%Q": "{}"
144-
"%r": "!!"
145-
"%s": "()"
146-
"%w": "()"
147-
"%W": "()"
148-
"%x": "()"
149-
Style/RedundantReturn:
150-
Enabled: false
151-
Style/RedundantSelf:
152-
Enabled: false
153-
Style/RegexpLiteral:
154-
EnforcedStyle: percent_r
155-
Style/RescueModifier:
156-
Enabled: false
157-
Style/SignalException:
158-
EnforcedStyle: only_raise
159-
Style/SingleLineMethods:
160-
Enabled: false
161-
Style/StringLiterals:
162-
EnforcedStyle: double_quotes
163-
Style/StringLiteralsInInterpolation:
164-
EnforcedStyle: double_quotes
165-
Style/SymbolArray:
166-
Enabled: false
167-
Style/TrailingCommaInArrayLiteral:
168-
EnforcedStyleForMultiline: consistent_comma
169-
Style/TrailingCommaInHashLiteral:
170-
EnforcedStyleForMultiline: consistent_comma
171-
Style/UnneededCapitalW:
172-
Enabled: false

.rubocop_todo.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2020-01-18 15:09:24 +0100 using RuboCop version 0.71.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 2
10+
Jekyll/NoPAllowed:
11+
Exclude:
12+
- 'examples/help_dialogue.rb'
13+
14+
# Offense count: 2
15+
Jekyll/NoPutsAllowed:
16+
Exclude:
17+
- 'lib/mercenary/command.rb'
18+
19+
# Offense count: 4
20+
# Configuration parameters: AllowSafeAssignment.
21+
Lint/AssignmentInCondition:
22+
Exclude:
23+
- 'lib/mercenary/command.rb'
24+
- 'lib/mercenary/option.rb'
25+
- 'lib/mercenary/presenter.rb'
26+
27+
# Offense count: 2
28+
Lint/DuplicateMethods:
29+
Exclude:
30+
- 'lib/mercenary/command.rb'
31+
32+
# Offense count: 1
33+
# Configuration parameters: AllowComments.
34+
Lint/HandleExceptions:
35+
Exclude:
36+
- 'lib/mercenary/option.rb'
37+
38+
# Offense count: 1
39+
Lint/UselessAssignment:
40+
Exclude:
41+
- 'lib/mercenary/presenter.rb'
42+
43+
# Offense count: 1
44+
Metrics/AbcSize:
45+
Max: 25
46+
47+
# Offense count: 1
48+
# Configuration parameters: CountComments, ExcludedMethods.
49+
# ExcludedMethods: refine
50+
Metrics/BlockLength:
51+
Max: 28
52+
53+
# Offense count: 6
54+
# Cop supports --auto-correct.
55+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
56+
# URISchemes: http, https
57+
Metrics/LineLength:
58+
Max: 319
59+
60+
# Offense count: 1
61+
# Configuration parameters: CountComments, ExcludedMethods.
62+
Metrics/MethodLength:
63+
Max: 24
64+
65+
# Offense count: 1
66+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
67+
# NamePrefix: is_, has_, have_
68+
# NamePrefixBlacklist: is_, has_, have_
69+
# NameWhitelist: is_a?
70+
# MethodDefinitionMacros: define_method, define_singleton_method
71+
Naming/PredicateName:
72+
Exclude:
73+
- 'spec/**/*'
74+
- 'lib/mercenary/command.rb'
75+
76+
# Offense count: 1
77+
Style/MissingRespondToMissing:
78+
Exclude:
79+
- 'lib/mercenary/presenter.rb'

History.markdown

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
## HEAD
1+
## 0.4.0 / 2020-01-18
2+
3+
### Major Enhancements
4+
5+
* Drop Ruby 2.3 support
6+
7+
### Minor Enhancements
8+
9+
* Remove parent command's flags from subcommand usage (#44)
210

311
### Development Fixes
412

5-
* Adopt Jekyll's rubocop config for consistency (#51)
6-
* Bump Rubocop (#56)
13+
* Adopt Jekyll's rubocop config for consistency
714

815
### Documentation
916

1017
* fixes the readme (#52)
1118

12-
### Minor Enhancements
13-
14-
* Remove parent command's flags from subcommand usage (#44)
15-
1619
## 0.3.6 / 2016-04-07
1720

1821
### Bug Fixes

lib/mercenary/command.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def version(version = nil)
4949
def syntax(syntax = nil)
5050
@syntax = syntax if syntax
5151
syntax_list = []
52-
if parent
53-
syntax_list << parent.syntax.to_s.gsub(%r!<[\w\s-]+>!, "").gsub(%r!\[[\w\s-]+\]!, "").strip
54-
end
52+
syntax_list << parent.syntax.to_s.gsub(%r!<[\w\s-]+>!, "").gsub(%r!\[[\w\s-]+\]!, "").strip if parent
5553
syntax_list << (@syntax || name.to_s)
5654
syntax_list.join(" ")
5755
end

lib/mercenary/program.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def go(argv)
4242

4343
begin
4444
cmd.execute(argv, @config)
45-
rescue => e
45+
rescue StandardError => e
4646
if cmd.trace
4747
raise e
4848
else

lib/mercenary/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Mercenary
4-
VERSION = "0.3.6"
4+
VERSION = "0.4.0"
55
end

mercenary.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
1919
spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
2020
spec.require_paths = ["lib"]
2121

22-
spec.required_ruby_version = ">= 2.3.0"
22+
spec.required_ruby_version = ">= 2.4.0"
2323

2424
spec.add_development_dependency "bundler"
2525
spec.add_development_dependency "rake"
2626
spec.add_development_dependency "rspec", "~> 3.0"
27-
spec.add_development_dependency "rubocop", "~> 0.58"
27+
spec.add_development_dependency "rubocop-jekyll", "~> 0.10.0"
2828
end

0 commit comments

Comments
 (0)