Rakefile in gmaps_geocoding-0.1.4 vs Rakefile in gmaps_geocoding-1.0.0

- old
+ new

@@ -1,13 +1,11 @@ -# encoding: utf-8 require 'bundler/gem_tasks' require 'rake/testtask' +require 'rubocop/rake_task' require 'yard' -lib = File.expand_path('../lib/', __FILE__) -$:.unshift lib unless $:.include?(lib) -require('gmaps_geocoding/version') +require_relative 'lib/gmaps_geocoding/version' task gem: :build task :build do system 'gem build gmaps_geocoding.gemspec' end @@ -18,21 +16,25 @@ task release: :build do system "git tag -a v#{GmapsGeocoding::VERSION} -m 'Tagging #{GmapsGeocoding::VERSION}'" system 'git push --tags' system "gem push gmaps_geocoding-#{GmapsGeocoding::VERSION}.gem" - # system "rm gmaps_geocoding-#{GmapsGeocoding::VERSION}.gem" + system "rm gmaps_geocoding-#{GmapsGeocoding::VERSION}.gem" end Rake::TestTask.new do |t| t.libs << 'lib/gmaps_geocoding' t.test_files = FileList['test/**/*_test.rb'] t.verbose = true end +task default: [:test, :rubocop] +RuboCop::RakeTask.new do |task| + task.formatters = ['simple'] + task.fail_on_error = false +end + desc 'Generate documentation' YARD::Rake::YardocTask.new do |t| - t.files = ['lib/**/*.rb', '-', 'LICENSE.txt'] - t.options = ['--main', 'README.md', '--no-private'] + t.files = %w(lib/**/*.rb - LICENSE.txt) + t.options = %w(--main README.md --no-private) end - -task default: :test