From a8e82ba99adf1a2a34b136388b088dcfe60d9593 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Fri, 26 Jan 2018 00:53:22 +0100 Subject: Prepare project structure --- spec/.rubocop.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ spec/spec_helper.rb | 20 ++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 spec/.rubocop.yml create mode 100644 spec/spec_helper.rb (limited to 'spec') diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml new file mode 100644 index 0000000..752f917 --- /dev/null +++ b/spec/.rubocop.yml @@ -0,0 +1,59 @@ +inherit_from: ../.rubocop.yml + +Layout/ClosingParenthesisIndentation: + Enabled: false + +Layout/EmptyLines: + Enabled: false + +Layout/EmptyLinesAroundBlockBody: + Enabled: false + +Layout/LeadingCommentSpace: + Enabled: false + +Layout/MultilineBlockLayout: + Enabled: false + +Layout/SpaceBeforeComma: + Enabled: false + +Layout/SpaceBeforeComment: + Enabled: false + +Layout/SpaceInsideBlockBraces: + Enabled: false + +Layout/SpaceInsideBrackets: + Enabled: false + +Layout/SpaceInsideParens: + Enabled: false + +Lint/AmbiguousRegexpLiteral: + Enabled: false + +Metrics/ModuleLength: + Enabled: false + +Metrics/BlockLength: + Enabled: false + +Style/BlockDelimiters: + IgnoredMethods: [ expect, let ] + +# I use it for purpose with Corefines, e.g. `using Corefines::String::unindent`. +Style/ColonMethodCall: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Style/NestedParenthesizedCalls: + Enabled: false + +Style/SymbolArray: + Enabled: false + +Style/WordArray: + Enabled: false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..80e5bc6 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,20 @@ +require 'rspec' + +RSpec.configure do |config| + config.color = true +end + +unless RUBY_ENGINE == 'jruby' + require 'simplecov' + + formatters = [SimpleCov::Formatter::HTMLFormatter] + if ENV['CODACY_PROJECT_TOKEN'] + require 'codacy-coverage' + formatters << Codacy::Formatter + end + + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters) + SimpleCov.start do + add_filter '/spec/' + end +end -- cgit v1.2.3