-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
executable file
·30 lines (25 loc) · 973 Bytes
/
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
#!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
require 'rubygems'
namespace :gem do
desc "Build the json-canonicalization-#{File.read('VERSION').chomp}.gem file"
task :build do
sh "gem build json-canonicalization.gemspec && mv json-canonicalization-#{File.read('VERSION').chomp}.gem pkg/"
end
desc "Release the json-canonicalization-#{File.read('VERSION').chomp}.gem file"
task :release do
sh "gem push pkg/json-canonicalization-#{File.read('VERSION').chomp}.gem"
end
end
desc 'Default: run specs.'
task default: :spec
task specs: :spec
require 'rspec/core/rake_task'
desc 'Run specifications'
RSpec::Core::RakeTask.new do |spec|
spec.rspec_opts = %w(--options spec/spec.opts) if File.exists?('spec/spec.opts')
end
desc "Run specifications for continuous integration"
RSpec::Core::RakeTask.new("spec:ci") do |spec|
spec.rspec_opts = %w(--options spec/spec.opts) if File.exists?('spec/spec.opts')
end