Skip to content

Commit

Permalink
Minor rubocop changes, using bundle exec for dev:quality
Browse files Browse the repository at this point in the history
  • Loading branch information
VidaZing committed Aug 26, 2018
1 parent a491646 commit 900d123
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 2.5.1

Metrics/BlockLength:
Exclude:
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: ruby

rvm:
- 2.5.1
- 2.2.0
before_install:
- gem install bundler -v 1.16.4

Expand Down
20 changes: 14 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ task :clean do
system 'rm -f *.gem Gemfile.lock'
end

desc "Build #{GEM_NAME_VERSION}"
task "build-dev": :clean do
puts "Building #{GEM_NAME_VERSION}".blue
system "gem build #{GEM_NAME}.gemspec"
end

desc "Build #{GEM_NAME_VERSION}"
task build: :clean do
puts "Building #{GEM_NAME_VERSION}".blue
Expand All @@ -53,6 +47,20 @@ task :uninstall do
system "gem uninstall -xq #{GEM_NAME}"
end

namespace :dev do
desc 'Analyze code quality (rubocop, flog, flay)'
task :quality do
puts 'Analyzing format with rubocop'.blue
system 'bundle exec rubocop'

puts 'Checking code quality. Lower is better'.blue
system 'bundle exec flog lib/'

puts 'Checking code duplication. Prime to refactor'.blue
system 'bundle exec flay lib/'
end
end

namespace :doc do
desc "Build documentation into 'doc/'"
task :build do
Expand Down
9 changes: 4 additions & 5 deletions vidazing_logger.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
s.executables << 'vidazing_logger'

s.rubygems_version = '2.7.7'

# rubocop:disable Gemspec/RequiredRubyVersion
s.required_ruby_version = '>= 2.2.0'
# rubocop:enable Gemspec/RequiredRubyVersion
s.required_ruby_version = '>= 2.5.1'

s.files = `git ls-files -z`.split("\x0").reject \
{ |f| f.match(%r{^(test|spec)/}) }
Expand All @@ -28,10 +25,12 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength

s.add_development_dependency 'byebug', '10.0.2'
s.add_development_dependency 'coveralls', '0.8.22'
s.add_development_dependency 'flay', '2.12.0'
s.add_development_dependency 'flog', '4.6.2'
s.add_development_dependency 'pry', '0.10.4'
s.add_development_dependency 'pry-byebug', '3.6.0'
s.add_development_dependency 'rainbow', '3.0.0'
s.add_development_dependency 'rake', '~> 0'
s.add_development_dependency 'rake', '12.3.1'
s.add_development_dependency 'rspec', '3.8.0'
s.add_development_dependency 'rubocop', '0.58.2'
s.add_development_dependency 'simplecov', '0.16.1'
Expand Down

0 comments on commit 900d123

Please sign in to comment.