-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRakefile
More file actions
37 lines (30 loc) · 860 Bytes
/
Rakefile
File metadata and controls
37 lines (30 loc) · 860 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 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
CLEAN.include("**/*.gem", "**/*.rbc", "**/link*", "*.lock")
namespace :gem do
desc 'Create the file-find gem'
task :create => [:clean] do
require 'rubygems/package'
spec = Gem::Specification.load('file-find.gemspec')
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
Gem::Package.build(spec)
end
desc "Install the file-find gem"
task :install => [:create] do
ruby 'file-find.gemspec'
file = Dir["*.gem"].first
sh "gem install -l #{file}"
end
end
RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = ['spec/file_find_spec.rb']
t.rspec_opts = '-f documentation -w'
end
# Clean up afterwards
Rake::Task[:spec].enhance do
Rake::Task[:clean].invoke
end
task :default => :spec