diff --git a/.rubocop.yml b/.rubocop.yml index 78c60ea..0f943f7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -108,11 +108,6 @@ SelfAssignment: SignalException: Enabled: false -# Offense count: 53 -# Cop supports --auto-correct. -SingleSpaceBeforeFirstArg: - Enabled: false - SpaceAroundOperators: Enabled: false @@ -304,10 +299,6 @@ Style/NumericLiterals: Metrics/ParameterLists: Enabled: false -Style/TrailingComma: - # EnforcedStyleForMultiline: comma - Enabled: false - Metrics/CyclomaticComplexity: Enabled: false diff --git a/Gemfile b/Gemfile index 7051e25..69bef0f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,6 @@ group :development, :test do gem "rake", "~> 10.4" gem "rspec", "~> 3.0" gem "rspec-mocks", "~> 3.0" - gem "rubocop", "~> 0.24" + gem "rubocop", "~> 0.36" gem "rubygems-tasks", "~> 0.2" end diff --git a/lib/lowered/expectations.rb b/lib/lowered/expectations.rb index e071928..cf7c16f 100644 --- a/lib/lowered/expectations.rb +++ b/lib/lowered/expectations.rb @@ -5,7 +5,7 @@ require 'pty' class LoweredExpectations - VERSION = '1.0.0' + VERSION = '1.0.1'.freeze class VersionPatternError < StandardError end @@ -54,7 +54,7 @@ def self.run!(*args, quiet: false) while !r.eof? c = r.getc stdout << c - $stdout.write "#{c}" + $stdout.write c.to_s end Process.wait(pid) end diff --git a/spec/integration/lowered/expectations_integration_spec.rb b/spec/integration/lowered/expectations_integration_spec.rb index 54c3741..97332ad 100644 --- a/spec/integration/lowered/expectations_integration_spec.rb +++ b/spec/integration/lowered/expectations_integration_spec.rb @@ -19,7 +19,7 @@ describe '.which' do it 'returns true when the executable is on the PATH' do - expect(LoweredExpectations.which tool).to be_truthy + expect(LoweredExpectations.which(tool)).to be_truthy end it 'raises an error when the executable is not on the PATH' do diff --git a/spec/lowered/expectations_spec.rb b/spec/lowered/expectations_spec.rb index 6588a7c..45405a5 100644 --- a/spec/lowered/expectations_spec.rb +++ b/spec/lowered/expectations_spec.rb @@ -44,7 +44,7 @@ describe '.which' do it 'returns true when the executable is on the PATH' do - expect(LoweredExpectations.which tool).to be_truthy + expect(LoweredExpectations.which(tool)).to be_truthy end it 'raises an error when the executable is not on the PATH' do @@ -54,12 +54,12 @@ describe '.verify_version' do it 'returns true when the version string matches the version pattern' do - expect(LoweredExpectations.verify_version version, '~> 0.1').to be_truthy - expect(LoweredExpectations.verify_version version, '~> 0').to be_truthy - expect(LoweredExpectations.verify_version version, '> 0.1.1').to be_truthy - expect(LoweredExpectations.verify_version version, '< 1').to be_truthy - expect(LoweredExpectations.verify_version version, '> 0').to be_truthy - expect(LoweredExpectations.verify_version version, "= #{version}").to be_truthy + expect(LoweredExpectations.verify_version(version, '~> 0.1')).to be_truthy + expect(LoweredExpectations.verify_version(version, '~> 0')).to be_truthy + expect(LoweredExpectations.verify_version(version, '> 0.1.1')).to be_truthy + expect(LoweredExpectations.verify_version(version, '< 1')).to be_truthy + expect(LoweredExpectations.verify_version(version, '> 0')).to be_truthy + expect(LoweredExpectations.verify_version(version, "= #{version}")).to be_truthy end it 'raise an error when the version string does not match the version pattern' do