summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiyev@gmail.com>2015-11-13 11:19:20 -0500
committerElvin Efendi <elvin.efendiyev@gmail.com>2015-11-13 11:19:20 -0500
commit5a2364e50620b825d5325bfbbc5d0f3d8578e25f (patch)
tree0e985374cc7b4bd8111c012072c39218335881ef /Rakefile
parent1400b842f6dc61e662ce15f72f578a55126ffc06 (diff)
parentf2da63369fcb754e3715091cc4fd2f93db42106e (diff)
Merge pull request #2 from Shopify/testing-refactoring
Testing refactoring
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile49
1 files changed, 6 insertions, 43 deletions
diff --git a/Rakefile b/Rakefile
index 3d85377..2dc5415 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,51 +1,14 @@
-begin
- require 'rake/testtask'
- require 'bundler'
- # Bundler.setup
-rescue LoadError
- warn 'bundler missing'
-end
-
-gemspec = eval(File.read(Dir['*.gemspec'].first))
-file = [gemspec.name, gemspec.version].join('-') + '.gem'
-
-desc 'Validate gemspec'
-task :gemspec do
- gemspec.validate
-end
+require 'bundler/gem_tasks'
+require 'rake/testtask'
desc 'Run minitest'
task :test do
Rake::TestTask.new do |t|
- t.libs.push "lib"
- t.test_files = FileList['spec/*_spec.rb']
+ t.libs << 'spec'
+ t.test_files = FileList['spec/**/*_spec.rb']
+ t.warning = true
t.verbose = true
end
end
-desc 'Build gem'
-task :build do
- system "gem build #{gemspec.name}.gemspec"
- FileUtils.mkdir_p 'gems'
- FileUtils.mv file, 'gems'
-end
-
-desc 'Install gem'
-task :install => :build do
- system "sudo -Es sh -c \'umask 022; gem install gems/#{file}\'"
-end
-
-desc 'Remove gems'
-task :clean do
- FileUtils.rm_rf 'gems'
-end
-
-desc 'Tag the release'
-task :tag do
- system "git tag #{gemspec.version}"
-end
-
-desc 'Push to rubygems'
-task :push => :tag do
- system "gem push gems/#{file}"
-end
+task default: :test