forked from technicalpickles/jeweler
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
82 lines (69 loc) · 2.13 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# encoding: utf-8
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
#$LOAD_PATH.unshift('lib')
#require 'rake'
require_relative 'lib/jeweler2'
Jeweler::Tasks.new do |gem|
gem.name = "jeweler2"
gem.version = Jeweler::Version::STRING
gem.homepage = "http://github.com/appoxy/jeweler"
gem.summary = "Opinionated tool for creating and managing RubyGem projects"
gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
gem.license = "MIT"
gem.authors = ["Josh Nichols"]
gem.email = "[email protected]"
#gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
#gem.files.include %w(lib)
# dependencies defined in Gemfile
gem.files = Dir.glob('lib/**/*.rb')
gem.files.exclude %w(lib/jeweler/templates) # exclude temporary directory
end
Jeweler::RubygemsDotOrgTasks.new
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.test_files = FileList.new('test/**/test_*.rb') do |list|
list.exclude 'test/test_helper.rb'
list.exclude 'test/fixtures/**/*.rb'
end
test.libs << 'test'
test.verbose = true
end
namespace :test do
task :gemspec_dup do
gemspec = Rake.application.jeweler.gemspec
dupped_gemspec = gemspec.dup
cloned_gemspec = gemspec.clone
puts gemspec.to_ruby
puts dupped_gemspec.to_ruby
end
end
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = FileList['lib/**/*.rb'].exclude('lib/jeweler/templates/**/*.rb')
end
require 'rcov/rcovtask'
Rcov::RcovTask.new(:rcov => :check_dependencies) do |rcov|
rcov.libs << 'test'
rcov.pattern = 'test/**/test_*.rb'
end
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |features|
features.cucumber_opts = "features --format progress"
end
namespace :features do
Cucumber::Rake::Task.new(:pretty) do |features|
features.cucumber_opts = "features --format progress"
end
end
if ENV["RUN_CODE_RUN"] == "true"
task :default => [:test, :features]
else
task :default => :test
end