-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
37 lines (30 loc) · 778 Bytes
/
Rakefile
File metadata and controls
37 lines (30 loc) · 778 Bytes
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
require 'rubygems'
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'awestruct/version'
GEMFILE = "awestruct-#{Awestruct::VERSION}.gem"
task :default => :build
if !defined?(RSpec)
puts "spec targets require RSpec"
else
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/**/*.rb'
t.rspec_opts = ['-cfs']
end
end
desc "Run all tests and build the gem"
task :build => :spec do
system "gem build awestruct.gemspec"
end
desc "Release the gem to rubygems"
task :release => [ :build, :tag ] do
system "gem push #{GEMFILE}"
end
desc "Build and install the gem locally (for testing)"
task :install => :build do
system "gem install -l -f #{GEMFILE}"
end
task :tag do
system "git tag #{Awestruct::VERSION}"
end