Skip to content

Commit

Permalink
Change rake tasks to improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Jun 5, 2021
1 parent b0c0d98 commit 8b1e421
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tasks/console.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions tasks/spec.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8b1e421

Please sign in to comment.