diff options
| author | Tom Black <[email protected]> | 2016-10-09 15:58:30 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2016-10-09 15:58:30 -0400 |
| commit | 4b3cd2c81ad8c03dd25bbb8617e54e349054fcf5 (patch) | |
| tree | b96ebeb06630ad154378bde61718629291e3a41e /Rakefile | |
| parent | 96bdd3584cb3818474fc01b50444dadbe5e85fbe (diff) | |
| download | ruby2d-4b3cd2c81ad8c03dd25bbb8617e54e349054fcf5.tar.gz ruby2d-4b3cd2c81ad8c03dd25bbb8617e54e349054fcf5.zip | |
Update Rakefile
`run_test` now only runs the test (not build or run spec); now separate
tasks for uninstall, build, install.
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -23,9 +23,7 @@ def run_cmd(cmd) end def run_test(file) - Rake::Task['build'].invoke - Rake::Task['spec'].invoke - print "==> ".blue, "running tests/#{file}.rb".bold, "\n" + print "\n==> ".blue, "running tests/#{file}.rb".bold, "\n" system "( cd tests/ ; ruby #{file}.rb )" end @@ -33,19 +31,27 @@ end task default: 'all' -desc "Run the RSpec tests" -RSpec::Core::RakeTask.new do |t| - print "\n==> ".blue, "running RSpec".bold, "\n\n" - t.pattern = "spec/*spec.rb" +desc "Uninstall gem" +task :uninstall do + run_cmd "gem uninstall ruby2d --executables" end desc "Build gem" task :build do - run_cmd "gem uninstall ruby2d --executables" run_cmd "gem build ruby2d.gemspec --verbose" +end + +desc "Install gem" +task :install do run_cmd "gem install ruby2d-#{Ruby2D::VERSION}.gem --local --verbose" end +desc "Run the RSpec tests" +RSpec::Core::RakeTask.new do |t| + print "\n==> ".blue, "running RSpec".bold, "\n\n" + t.pattern = "spec/*spec.rb" +end + desc "Run testcard" task :testcard do run_test 'testcard' @@ -61,8 +67,10 @@ task :controller do run_test 'controller' end -desc "Test and build" +desc "Uninstall, build, install, and test" task :all do + Rake::Task['uninstall'].invoke Rake::Task['build'].invoke + Rake::Task['install'].invoke Rake::Task['spec'].invoke end |
