diff --git a/Rakefile b/Rakefile index e170aa3..617f4ac 100644 --- a/Rakefile +++ b/Rakefile @@ -1,12 +1,12 @@ -# encoding: utf-8 +# frozen_string_literal: true require "bundler/gem_tasks" -FileList['tasks/**/*.rake'].each(&method(:import)) +FileList["tasks/**/*.rake"].each(&method(:import)) -mri = RUBY_ENGINE == 'ruby' -specs = ['spec'] -specs.unshift('spec:perf') if mri +mri = RUBY_ENGINE == "ruby" +specs = ["spec"] +specs.unshift("spec:perf") if mri -desc 'Run all specs' +desc "Run all specs" task ci: specs diff --git a/tasks/console.rake b/tasks/console.rake index 271bb15..d5b650c 100644 --- a/tasks/console.rake +++ b/tasks/console.rake @@ -4,8 +4,8 @@ desc "Load gem inside irb console" task :console do require "irb" require "irb/completion" - require File.join(__FILE__, "../../lib/finite_machine") + require_relative "../lib/finite_machine" ARGV.clear IRB.start end -task :c => :console +task c: :console diff --git a/tasks/spec.rake b/tasks/spec.rake index 5092544..3c7461e 100644 --- a/tasks/spec.rake +++ b/tasks/spec.rake @@ -24,11 +24,10 @@ begin task.pattern = "spec/performance{,/*/**}/*_spec.rb" end end - rescue LoadError %w[spec spec:unit spec:integration].each do |name| task name do - $stderr.puts "In order to run #{name}, do `gem install rspec`" + warn "In order to run #{name}, do `gem install rspec`" end end end