Skip to content
Newer
Older
100644 59 lines (48 sloc) 1.44 KB
9365d6d @einzige Initial commit
einzige authored
1 # encoding: utf-8
2
3 ENV['BUNDLE_GEMFILE'] = 'Gemfile'
4
5 gem_root = File.expand_path(File.dirname(__FILE__))
6
7 require 'rubygems'
8 require 'bundler'
9 require 'rake'
10 require 'jeweler'
11 require 'rake'
12 require 'rake/testtask'
13 require 'rspec'
14 require 'rspec/core/rake_task'
15
16 begin
17 Bundler.setup(:default, :development)
18 rescue Bundler::BundlerError => e
19 $stderr.puts e.message
20 $stderr.puts "Run `bundle install` to install missing gems"
21 exit e.status_code
22 end
23
24 Jeweler::Tasks.new do |gem|
25 # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
26 gem.name = "sneaky-save"
27 gem.homepage = "http://github.com/partyearth/sneaky-save"
28 gem.license = "MIT"
29 gem.summary = %Q{Kevin, please add summary.}
30 gem.description = %Q{Longer description of our gem}
31 gem.email = "kgoslar@partyearth.ru"
32 gem.authors = ["Sergei Zinin", "Kevin Goslar"]
33 gem.files = Dir.glob('lib/**/*.rb')
34 # dependencies defined in Gemfile
35 end
36 Jeweler::RubygemsDotOrgTasks.new
37
38 task :default => :spec
39
40 desc "Run the test suite"
41 task :spec => ['spec:setup', 'spec:lib', 'spec:cleanup']
42
43 namespace :spec do
44 desc "Setup the test environment"
45 task :setup do
46 system "cd #{gem_root} && bundle install && mkdir db"
47 end
48
49 desc "Cleanup the test environment"
50 task :cleanup do
51 FileUtils.rm_rf "#{gem_root}/db"
52 end
53
54 desc "Test the SneakySave lib"
55 RSpec::Core::RakeTask.new(:lib) do |task|
56 task.pattern = gem_root + '/spec/lib/**/*_spec.rb'
57 end
58 end
Something went wrong with that request. Please try again.