Skip to content

Commit

Permalink
Merge pull request #57 from jekyll/release/4.0
Browse files Browse the repository at this point in the history
Release 💎 0.4.0
  • Loading branch information
DirtyF authored Jan 18, 2020
2 parents 3f4e002 + 2baac09 commit 2bfa3b4
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
vendor/bundle
176 changes: 7 additions & 169 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,172 +1,10 @@
---
inherit_from: .rubocop_todo.yml

require: rubocop-jekyll
inherit_gem:
rubocop-jekyll: .rubocop.yml

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
Exclude:
- vendor/**/*

Layout/AlignArray:
Enabled: false
Layout/AlignHash:
EnforcedHashRocketStyle: table
Layout/AlignParameters:
Enabled: false
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EndOfLine:
EnforcedStyle: native
Layout/ExtraSpacing:
AllowForAlignment: true
Layout/FirstParameterIndentation:
EnforcedStyle: consistent
Layout/IndentationWidth:
Severity: error
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
Layout/IndentHeredoc:
Enabled: false
Exclude:
- spec/**/*
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/SpaceAroundOperators:
Enabled: true
Lint/AssignmentInCondition:
Exclude:
- lib/mercenary/command.rb
- lib/mercenary/option.rb
- lib/mercenary/presenter.rb
Lint/DuplicateMethods:
Exclude:
- lib/mercenary/command.rb
Layout/EndAlignment:
Severity: error
Lint/HandleExceptions:
Exclude:
- lib/mercenary/option.rb
Style/RescueStandardError:
Exclude:
- lib/mercenary/program.rb
Lint/UselessAssignment:
Exclude:
- lib/mercenary/presenter.rb
Lint/UnreachableCode:
Severity: error
Lint/UselessAccessModifier:
Enabled: false
Lint/Void:
Enabled: false
Metrics/AbcSize:
Max: 21
Exclude:
- lib/mercenary/program.rb
Metrics/BlockLength:
Exclude:
- examples/**/*
- spec/**/*
Metrics/ClassLength:
Max: 300
Metrics/CyclomaticComplexity:
Max: 9
Metrics/LineLength:
Exclude:
- lib/mercenary/command.rb
- lib/mercenary/presenter.rb
- lib/mercenary/program.rb
- examples/**/*
- spec/**/*
- mercenary.gemspec
Max: 90
Severity: warning
Metrics/MethodLength:
Exclude:
- lib/mercenary/program.rb
CountComments: false
Max: 20
Severity: error
Metrics/ModuleLength:
Max: 240
Metrics/ParameterLists:
Max: 4
Metrics/PerceivedComplexity:
Max: 8
Naming/FileName:
Enabled: false
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/PredicateName:
Exclude:
- lib/mercenary/command.rb
Style/Alias:
Enabled: false
Style/AndOr:
Severity: error
Style/Attr:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/FrozenStringLiteralComment:
Exclude:
- lib/mercenary/command.rb
Enabled: true
EnforcedStyle: always
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedStyle: hash_rockets
Severity: error
Style/IfUnlessModifier:
Enabled: false
Style/InverseMethods:
Enabled: false
Style/MissingRespondToMissing:
Exclude:
- lib/mercenary/presenter.rb
Style/ModuleFunction:
Enabled: false
Style/MultilineTernaryOperator:
Severity: error
Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%q": "{}"
"%Q": "{}"
"%r": "!!"
"%s": "()"
"%w": "()"
"%W": "()"
"%x": "()"
Style/RedundantReturn:
Enabled: false
Style/RedundantSelf:
Enabled: false
Style/RegexpLiteral:
EnforcedStyle: percent_r
Style/RescueModifier:
Enabled: false
Style/SignalException:
EnforcedStyle: only_raise
Style/SingleLineMethods:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/UnneededCapitalW:
Enabled: false
79 changes: 79 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-01-18 15:09:24 +0100 using RuboCop version 0.71.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
Jekyll/NoPAllowed:
Exclude:
- 'examples/help_dialogue.rb'

# Offense count: 2
Jekyll/NoPutsAllowed:
Exclude:
- 'lib/mercenary/command.rb'

# Offense count: 4
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'lib/mercenary/command.rb'
- 'lib/mercenary/option.rb'
- 'lib/mercenary/presenter.rb'

# Offense count: 2
Lint/DuplicateMethods:
Exclude:
- 'lib/mercenary/command.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
Lint/HandleExceptions:
Exclude:
- 'lib/mercenary/option.rb'

# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'lib/mercenary/presenter.rb'

# Offense count: 1
Metrics/AbcSize:
Max: 25

# Offense count: 1
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 28

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 319

# Offense count: 1
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 24

# Offense count: 1
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'lib/mercenary/command.rb'

# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/mercenary/presenter.rb'
17 changes: 10 additions & 7 deletions History.markdown
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
## HEAD
## 0.4.0 / 2020-01-18

### Major Enhancements

* Drop Ruby 2.3 support

### Minor Enhancements

* Remove parent command's flags from subcommand usage (#44)

### Development Fixes

* Adopt Jekyll's rubocop config for consistency (#51)
* Bump Rubocop (#56)
* Adopt Jekyll's rubocop config for consistency

### Documentation

* fixes the readme (#52)

### Minor Enhancements

* Remove parent command's flags from subcommand usage (#44)

## 0.3.6 / 2016-04-07

### Bug Fixes
Expand Down
4 changes: 1 addition & 3 deletions lib/mercenary/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ def version(version = nil)
def syntax(syntax = nil)
@syntax = syntax if syntax
syntax_list = []
if parent
syntax_list << parent.syntax.to_s.gsub(%r!<[\w\s-]+>!, "").gsub(%r!\[[\w\s-]+\]!, "").strip
end
syntax_list << parent.syntax.to_s.gsub(%r!<[\w\s-]+>!, "").gsub(%r!\[[\w\s-]+\]!, "").strip if parent
syntax_list << (@syntax || name.to_s)
syntax_list.join(" ")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/mercenary/program.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def go(argv)

begin
cmd.execute(argv, @config)
rescue => e
rescue StandardError => e
if cmd.trace
raise e
else
Expand Down
2 changes: 1 addition & 1 deletion lib/mercenary/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Mercenary
VERSION = "0.3.6"
VERSION = "0.4.0"
end
4 changes: 2 additions & 2 deletions mercenary.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.3.0"
spec.required_ruby_version = ">= 2.4.0"

spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rubocop", "~> 0.58"
spec.add_development_dependency "rubocop-jekyll", "~> 0.10.0"
end

0 comments on commit 2bfa3b4

Please sign in to comment.