-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
50 lines (44 loc) · 1.45 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 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn 'Run `bundle install` to install missing gems'
exit e.status_code
end
require 'rake'
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = 'gitenv'
gem.homepage = 'http://github.com/AlphaHydrae/gitenv'
gem.license = 'MIT'
gem.summary = %(Symlink manager for git repositories with configuration files.)
gem.description = %(Gitenv sets up symlinks to your configuration files in a git repository.)
gem.authors = ['Simon Oulevay (Alpha Hydrae)']
gem.files = `git ls-files -- {bin,lib}`.split("\n") + %w[Gemfile LICENSE.txt README.md VERSION]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
Rake::TaskManager.class_eval do
def remove_task(task_name)
@tasks.delete(task_name.to_s)
end
end
['version', 'version:bump:major', 'version:bump:minor', 'version:bump:patch', 'version:write'].each do |task|
Rake.application.remove_task task
end
# version tasks
require 'rake-version'
RakeVersion::Tasks.new do |v|
v.copy 'lib/gitenv.rb'
end
require 'rspec/core/rake_task'
desc 'Run specs'
RSpec::Core::RakeTask.new do |t|
# t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
# Put spec opts in a file named .rspec in root
end
task default: :spec