-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRakefile
51 lines (42 loc) · 1.04 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require "bundler/gem_tasks"
require 'rspec/core/rake_task'
require 'aweplug/version'
require 'guard'
GEMFILE = "aweplug-#{Aweplug::VERSION}.gem"
task :default => :build
desc "Run all tests and build the gem"
task :build => 'test:spec' do
system "gem build aweplug.gemspec"
end
desc "Build and install the gem locally"
task :install => :build do
system "gem install -l -f #{GEMFILE}"
end
namespace :release do
desc "Release the gem to rubygems"
task :push => [ :build, :tag ] do
system "gem push #{GEMFILE}"
end
desc "Create tag #{Aweplug::VERSION} in git"
task :tag do
system "git tag #{Aweplug::VERSION}"
end
end
namespace :test do
if !defined?(RSpec)
puts "spec targets require RSpec"
else
desc "Run all specifications"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/**/*_spec.rb'
end
end
desc "Start Guard to listen for changes and run specs"
task :guard do
Guard.start(:guardfile => 'Guardfile')
Guard.run_all
while ::Guard.running do
sleep 0.5
end
end
end