-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RuboCop for code style enforcement
- Loading branch information
1 parent
cb036b6
commit 6b97279
Showing
14 changed files
with
112 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require: | ||
- rubocop-performance | ||
- rubocop-minitest | ||
|
||
AllCops: | ||
NewCops: enable | ||
|
||
Layout/EmptyLineAfterGuardClause: | ||
Enabled: false | ||
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Metrics: | ||
Enabled: false | ||
|
||
Style/FormatStringToken: | ||
EnforcedStyle: template | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: no_mixed_keys | ||
|
||
Style/SymbolArray: | ||
EnforcedStyle: brackets | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Style/IfUnlessModifier: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
source "https://rubygems.org" | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
gem 'gettext', '>= 3.1.3', '< 4.0.0' | ||
gem 'rake', '~> 13.0' | ||
|
||
group :test do | ||
gem 'thor' | ||
gem 'minitest', '~> 5.18' | ||
gem 'minitest-spec-context' | ||
gem 'simplecov' | ||
gem 'mocha' | ||
gem 'ci_reporter', '>= 1.6.3', "< 2.0.0", :require => false | ||
gem 'rubocop', '~> 1.57.0' | ||
gem 'rubocop-minitest', '~> 0.9.0' | ||
gem 'rubocop-performance', '~> 1.5.2' | ||
gem 'simplecov' | ||
gem 'thor' | ||
end | ||
|
||
# load local gemfile | ||
local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local') | ||
self.instance_eval(Bundler.read_file(local_gemfile)) if File.exist?(local_gemfile) | ||
instance_eval(Bundler.read_file(local_gemfile)) if File.exist?(local_gemfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
$:.unshift(File.expand_path('../lib', __FILE__)) | ||
$LOAD_PATH.unshift(File.expand_path('lib', __dir__)) | ||
|
||
# Maintain your gem's version: | ||
require "hammer_cli_foreman_discovery/version" | ||
|
@@ -13,9 +12,9 @@ Gem::Specification.new do |s| | |
s.email = ["[email protected]"] | ||
s.homepage = "https://github.com/theforeman/hammer-cli-foreman-discovery" | ||
s.summary = "Foreman CLI plugin for managing discovery hosts in foreman" | ||
s.description = <<DESC | ||
Contains the code for managing host discovery in foreman(results and progress) in the Hammer CLI. | ||
DESC | ||
s.description = <<~DESC | ||
Contains the code for managing host discovery in foreman(results and progress) in the Hammer CLI. | ||
DESC | ||
|
||
s.files = Dir['{lib,locale,config}/**/*', 'LICENSE', 'README*'] | ||
s.extra_rdoc_files = Dir['LICENSE', 'README*'] | ||
|
@@ -24,4 +23,5 @@ DESC | |
s.add_dependency 'hammer_cli_foreman', '~> 3.10' | ||
|
||
s.required_ruby_version = '>= 2.7', '< 4' | ||
s.metadata['rubygems_mfa_required'] = 'true' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.