bueller 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +141 -0
- data/LICENSE +20 -0
- data/README.markdown +182 -0
- data/bin/bueller +5 -0
- data/lib/bueller/commands/build_gem.rb +50 -0
- data/lib/bueller/commands/git_tag_release.rb +63 -0
- data/lib/bueller/commands/install_gem.rb +36 -0
- data/lib/bueller/commands/release_to_github.rb +41 -0
- data/lib/bueller/commands/release_to_rubygems.rb +26 -0
- data/lib/bueller/commands/version/base.rb +36 -0
- data/lib/bueller/commands/version/bump_major.rb +11 -0
- data/lib/bueller/commands/version/bump_minor.rb +12 -0
- data/lib/bueller/commands/version/bump_patch.rb +14 -0
- data/lib/bueller/commands/version/write.rb +21 -0
- data/lib/bueller/commands/write_gemspec.rb +29 -0
- data/lib/bueller/commands.rb +18 -0
- data/lib/bueller/errors.rb +8 -0
- data/lib/bueller/gemspec_helper.rb +83 -0
- data/lib/bueller/generator/application.rb +51 -0
- data/lib/bueller/generator/bacon_mixin.rb +43 -0
- data/lib/bueller/generator/github_mixin.rb +29 -0
- data/lib/bueller/generator/micronaut_mixin.rb +41 -0
- data/lib/bueller/generator/minitest_mixin.rb +42 -0
- data/lib/bueller/generator/options.rb +154 -0
- data/lib/bueller/generator/rdoc_mixin.rb +9 -0
- data/lib/bueller/generator/riot_mixin.rb +42 -0
- data/lib/bueller/generator/rspec_mixin.rb +50 -0
- data/lib/bueller/generator/shindo_mixin.rb +44 -0
- data/lib/bueller/generator/shoulda_mixin.rb +42 -0
- data/lib/bueller/generator/testspec_mixin.rb +42 -0
- data/lib/bueller/generator/testunit_mixin.rb +39 -0
- data/lib/bueller/generator/yard_mixin.rb +14 -0
- data/lib/bueller/generator.rb +291 -0
- data/lib/bueller/rubyforge_tasks.rb +88 -0
- data/lib/bueller/tasks.rb +133 -0
- data/lib/bueller/templates/.document +11 -0
- data/lib/bueller/templates/.gitignore +40 -0
- data/lib/bueller/templates/Gemfile +1 -0
- data/lib/bueller/templates/LICENSE +20 -0
- data/lib/bueller/templates/README.rdoc +17 -0
- data/lib/bueller/templates/Rakefile +20 -0
- data/lib/bueller/templates/bacon/flunking.rb +7 -0
- data/lib/bueller/templates/bacon/helper.rb +8 -0
- data/lib/bueller/templates/bueller_tasks.erb +10 -0
- data/lib/bueller/templates/features/default.feature +9 -0
- data/lib/bueller/templates/features/support/env.rb +16 -0
- data/lib/bueller/templates/gemspec +27 -0
- data/lib/bueller/templates/micronaut/flunking.rb +7 -0
- data/lib/bueller/templates/micronaut/helper.rb +17 -0
- data/lib/bueller/templates/minitest/flunking.rb +7 -0
- data/lib/bueller/templates/minitest/helper.rb +11 -0
- data/lib/bueller/templates/other_tasks.erb +84 -0
- data/lib/bueller/templates/riot/flunking.rb +11 -0
- data/lib/bueller/templates/riot/helper.rb +3 -0
- data/lib/bueller/templates/rspec/.rspec +1 -0
- data/lib/bueller/templates/rspec/flunking.rb +7 -0
- data/lib/bueller/templates/rspec/helper.rb +19 -0
- data/lib/bueller/templates/shindo/flunking.rb +8 -0
- data/lib/bueller/templates/shindo/helper.rb +5 -0
- data/lib/bueller/templates/shoulda/flunking.rb +7 -0
- data/lib/bueller/templates/shoulda/helper.rb +10 -0
- data/lib/bueller/templates/testspec/flunking.rb +7 -0
- data/lib/bueller/templates/testspec/helper.rb +7 -0
- data/lib/bueller/templates/testunit/flunking.rb +7 -0
- data/lib/bueller/templates/testunit/helper.rb +9 -0
- data/lib/bueller/version_helper.rb +59 -0
- data/lib/bueller.rb +139 -0
- data/spec/bueller/commands/build_gem_spec.rb +38 -0
- data/spec/bueller/commands/git_tag_release_spec.rb +79 -0
- data/spec/bueller/commands/install_gem_spec.rb +11 -0
- data/spec/bueller/commands/release_to_github_spec.rb +54 -0
- data/spec/bueller/commands/release_to_rubygems_spec.rb +15 -0
- data/spec/bueller/commands/version/bump_major_spec.rb +12 -0
- data/spec/bueller/commands/version/bump_minor_spec.rb +12 -0
- data/spec/bueller/commands/version/bump_patch_spec.rb +12 -0
- data/spec/bueller/commands/write_gemspec_spec.rb +32 -0
- data/spec/bueller/gemspec_helper_spec.rb +55 -0
- data/spec/bueller/generator/application_spec.rb +67 -0
- data/spec/bueller/generator/options_spec.rb +206 -0
- data/spec/bueller/generator_mixins_spec.rb +23 -0
- data/spec/bueller/generator_spec.rb +274 -0
- data/spec/bueller/tasks_spec.rb +29 -0
- data/spec/bueller/version_helper_spec.rb +57 -0
- data/spec/bueller_spec.rb +94 -0
- data/spec/fixtures/bar/bar.gemspec +41 -0
- data/spec/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
- data/spec/fixtures/bar/hey_include_me_in_gemspec +0 -0
- data/spec/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
- data/spec/fixtures/existing-project/LICENSE +20 -0
- data/spec/fixtures/existing-project/README.rdoc +7 -0
- data/spec/fixtures/existing-project/Rakefile +69 -0
- data/spec/fixtures/existing-project/existing-project.gemspec +20 -0
- data/spec/fixtures/existing-project/lib/existing_project_with_version.rb +0 -0
- data/spec/fixtures/existing-project/test/existing_project_with_version_test.rb +7 -0
- data/spec/fixtures/existing-project/test/test_helper.rb +10 -0
- data/spec/fixtures/existing-project-with-version-constant/LICENSE +20 -0
- data/spec/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
- data/spec/fixtures/existing-project-with-version-constant/Rakefile +69 -0
- data/spec/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +19 -0
- data/spec/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
- data/spec/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
- data/spec/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/support/application.rb +28 -0
- data/spec/support/file_system.rb +24 -0
- data/spec/support/gemspec.rb +28 -0
- data/spec/support/git.rb +19 -0
- data/spec/support/have_version.rb +18 -0
- metadata +381 -0
@@ -0,0 +1,133 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
class Rake::Application
|
4
|
+
attr_accessor :bueller_tasks
|
5
|
+
|
6
|
+
# The bueller instance that has be instantiated in the current Rakefile.
|
7
|
+
#
|
8
|
+
# This is usually useful if you want to get at info like version from other files.
|
9
|
+
def bueller
|
10
|
+
bueller_tasks.bueller
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Bueller
|
15
|
+
# Rake tasks for managing your gem.
|
16
|
+
#
|
17
|
+
# Here's a basic example of using it:
|
18
|
+
#
|
19
|
+
# Bueller::Tasks.new
|
20
|
+
class Tasks < ::Rake::TaskLib
|
21
|
+
attr_accessor :bueller
|
22
|
+
|
23
|
+
def initialize
|
24
|
+
Rake.application.bueller_tasks = self
|
25
|
+
define
|
26
|
+
end
|
27
|
+
|
28
|
+
def bueller
|
29
|
+
@bueller ||= Bueller.new
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def define
|
35
|
+
task :gemspec_required do
|
36
|
+
unless File.exist?(bueller.gemspec_helper.path)
|
37
|
+
abort "Expected #{bueller.gemspec_helper.path} to exist. See 'rake gemspec:write' to create it"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
desc "Build gem"
|
42
|
+
task :build do
|
43
|
+
bueller.build_gem
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "Install gem"
|
47
|
+
task :install => [:build] do
|
48
|
+
bueller.install_gem
|
49
|
+
end
|
50
|
+
|
51
|
+
namespace :gemspec do
|
52
|
+
desc 'Validates the gemspec'
|
53
|
+
task :validate => :gemspec_required do
|
54
|
+
if bueller.gemspec_helper.valid?
|
55
|
+
puts "Gemspec is valid"
|
56
|
+
true
|
57
|
+
else
|
58
|
+
puts "Gemspec is not valid"
|
59
|
+
false
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
desc "Displays the current version"
|
65
|
+
task :version do
|
66
|
+
$stdout.puts "Current version: #{bueller.version}"
|
67
|
+
end
|
68
|
+
|
69
|
+
namespace :version do
|
70
|
+
desc "Writes out an explicit version. Respects the following environment variables, or defaults to 0: MAJOR, MINOR, PATCH. Also recognizes BUILD, which defaults to nil"
|
71
|
+
task :write do
|
72
|
+
major, minor, patch, build = ENV['MAJOR'].to_i, ENV['MINOR'].to_i, ENV['PATCH'].to_i, (ENV['BUILD'] || nil )
|
73
|
+
bueller.write_version(major, minor, patch, build)
|
74
|
+
$stdout.puts "Updated version: #{bueller.version}"
|
75
|
+
end
|
76
|
+
|
77
|
+
namespace :bump do
|
78
|
+
desc "Bump the gemspec by a major version."
|
79
|
+
task :major => :version do
|
80
|
+
bueller.bump_major_version
|
81
|
+
bueller.write_gemspec
|
82
|
+
$stdout.puts "Updated version: #{bueller.version}"
|
83
|
+
end
|
84
|
+
|
85
|
+
desc "Bump the gemspec by a minor version."
|
86
|
+
task :minor => :version do
|
87
|
+
bueller.bump_minor_version
|
88
|
+
bueller.write_gemspec
|
89
|
+
$stdout.puts "Updated version: #{bueller.version}"
|
90
|
+
end
|
91
|
+
|
92
|
+
desc "Bump the gemspec by a patch version."
|
93
|
+
task :patch => :version do
|
94
|
+
bueller.bump_patch_version
|
95
|
+
bueller.write_gemspec
|
96
|
+
$stdout.puts "Updated version: #{bueller.version}"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
desc "Release gem"
|
102
|
+
task :release do
|
103
|
+
end
|
104
|
+
|
105
|
+
namespace :github do
|
106
|
+
desc "Release Gem to GitHub"
|
107
|
+
task :release do
|
108
|
+
bueller.release_gem_to_github
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
task :release => 'github:release'
|
113
|
+
|
114
|
+
namespace :git do
|
115
|
+
desc "Tag a release in Git"
|
116
|
+
task :release do
|
117
|
+
bueller.release_to_git
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
task :release => 'git:release'
|
122
|
+
|
123
|
+
namespace :rubygems do
|
124
|
+
desc "Release gem to Rubygems"
|
125
|
+
task :release => [:gemspec, :build] do
|
126
|
+
bueller.release_gem_to_rubygems
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
task :release => 'rubygems:release'
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# .document is used by rdoc and yard to know how to generate documentation
|
2
|
+
# for example, it can be used to control how rdoc gets built when you do `gem install foo`
|
3
|
+
|
4
|
+
README.rdoc
|
5
|
+
lib/**/*.rb
|
6
|
+
bin/*
|
7
|
+
|
8
|
+
# Files below this - are treated as 'extra files', and aren't parsed for ruby code
|
9
|
+
-
|
10
|
+
features/**/*.feature
|
11
|
+
LICENSE
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# jeweler generated
|
12
|
+
pkg
|
13
|
+
Gemfile.lock
|
14
|
+
|
15
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
16
|
+
#
|
17
|
+
# * Create a file at ~/.gitignore
|
18
|
+
# * Include files you want ignored
|
19
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
20
|
+
#
|
21
|
+
# After doing this, these files will be ignored in all your git projects,
|
22
|
+
# saving you from having to 'pollute' every project you touch with them
|
23
|
+
#
|
24
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
25
|
+
#
|
26
|
+
# For MacOS:
|
27
|
+
#
|
28
|
+
#.DS_Store
|
29
|
+
#
|
30
|
+
# For TextMate
|
31
|
+
#*.tmproj
|
32
|
+
#tmtags
|
33
|
+
#
|
34
|
+
# For emacs:
|
35
|
+
#*~
|
36
|
+
#\#*
|
37
|
+
#.\#*
|
38
|
+
#
|
39
|
+
# For vim:
|
40
|
+
#*.swp
|
@@ -0,0 +1 @@
|
|
1
|
+
gemspec :path => '.'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) <%= Time.now.year %> <%= user_name %>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
= <%= project_name %>
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) <%= Time.now.year %> <%= user_name %>. See LICENSE for details.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'bundler'
|
5
|
+
rescue LoadError
|
6
|
+
$stderr.puts "You must install bundler - run `gem install bundler`"
|
7
|
+
end
|
8
|
+
|
9
|
+
begin
|
10
|
+
Bundler.setup
|
11
|
+
rescue Bundler::BundlerError => e
|
12
|
+
$stderr.puts e.message
|
13
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
14
|
+
exit e.status_code
|
15
|
+
end
|
16
|
+
require 'rake'
|
17
|
+
|
18
|
+
<%= render_template 'bueller_tasks.erb' %>
|
19
|
+
|
20
|
+
<%= render_template 'other_tasks.erb' %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
|
10
|
+
require '<%= require_name %>'
|
11
|
+
|
12
|
+
require '<%= feature_support_require %>'
|
13
|
+
<% if feature_support_extend %>
|
14
|
+
|
15
|
+
World(<%= feature_support_extend %>)
|
16
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = '<%= project_name %>'
|
3
|
+
s.version = "0.0.0"
|
4
|
+
s.date = '<%= Time.now.strftime('%Y-%m-%d') %>'
|
5
|
+
s.authors = ['<%= user_name %>']
|
6
|
+
s.email = '<%= user_email %>'
|
7
|
+
s.homepage = 'http://github.com/<%= github_username %>/<%= project_name %>'
|
8
|
+
s.summary = %Q{<%= summary %>}
|
9
|
+
s.description = %Q{<%= description %>}
|
10
|
+
s.extra_rdoc_files = [
|
11
|
+
'LICENSE',
|
12
|
+
'README.rdoc',
|
13
|
+
]
|
14
|
+
|
15
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 1.3.7')
|
16
|
+
s.rubygems_version = '1.3.7'
|
17
|
+
s.specification_version = 3
|
18
|
+
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
s.files = Dir.glob('lib/**/*.rb')
|
21
|
+
s.test_files = Dir.glob('<%= test_pattern %>')
|
22
|
+
|
23
|
+
<% development_dependencies.each do |dependency| %>
|
24
|
+
s.add_development_dependency '<%= dependency %>'
|
25
|
+
<% end %>
|
26
|
+
end
|
27
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'micronaut'
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
|
7
|
+
require '<%= require_name %>'
|
8
|
+
|
9
|
+
def not_in_editor?
|
10
|
+
!(ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM'))
|
11
|
+
end
|
12
|
+
|
13
|
+
Micronaut.configure do |c|
|
14
|
+
c.color_enabled = not_in_editor?
|
15
|
+
c.filter_run :focused => true
|
16
|
+
end
|
17
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'minitest/unit'
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
require '<%= require_name %>'
|
7
|
+
|
8
|
+
class MiniTest::Unit::TestCase
|
9
|
+
end
|
10
|
+
|
11
|
+
MiniTest::Unit.autorun
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<% case testing_framework %>
|
2
|
+
<% when :rspec %>
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
RSpec::Core::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
|
5
|
+
<%= test_task %>.rspec_opts = '-I<%= test_dir %>'
|
6
|
+
end
|
7
|
+
<% when :micronaut %>
|
8
|
+
require 'micronaut/rake_task'
|
9
|
+
Micronaut::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
|
10
|
+
<%= test_task %>.pattern = '<%= test_pattern %>'
|
11
|
+
<%= test_task %>.ruby_opts << '-Ilib -I<%= test_dir %>'
|
12
|
+
end
|
13
|
+
<% when :shindo %>
|
14
|
+
require 'shindo/rake'
|
15
|
+
Shindo::Rake.new
|
16
|
+
<% else %>
|
17
|
+
require 'rake/testtask'
|
18
|
+
Rake::TestTask.new(:<%= test_task %>) do |<%= test_task %>|
|
19
|
+
<%= test_task %>.libs << 'lib' << '<%= test_dir %>'
|
20
|
+
<%= test_task %>.pattern = '<%= test_pattern %>'
|
21
|
+
<%= test_task %>.verbose = true
|
22
|
+
end
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% case testing_framework %>
|
26
|
+
<% when :rspec %>
|
27
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
28
|
+
spec.rspec_opts = '-I<%= test_dir %>'
|
29
|
+
spec.rcov = true
|
30
|
+
end
|
31
|
+
<% when :micronaut %>
|
32
|
+
Micronaut::RakeTask.new(:rcov) do |examples|
|
33
|
+
examples.pattern = '<%= test_pattern %>'
|
34
|
+
examples.rcov_opts = '-Ilib -I<%= test_dir %>'
|
35
|
+
examples.rcov = true
|
36
|
+
end
|
37
|
+
<% else %>
|
38
|
+
require 'rcov/rcovtask'
|
39
|
+
Rcov::RcovTask.new do |<%= test_task %>|
|
40
|
+
<%= test_task %>.libs << '<%= test_dir %>'
|
41
|
+
<%= test_task %>.pattern = '<%= test_pattern %>'
|
42
|
+
<%= test_task %>.verbose = true
|
43
|
+
end
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<% if use_cucumber? %>
|
47
|
+
require 'cucumber/rake/task'
|
48
|
+
Cucumber::Rake::Task.new(:features)
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% if use_reek? %>
|
52
|
+
require 'reek/adapters/rake_task'
|
53
|
+
Reek::RakeTask.new do |t|
|
54
|
+
t.fail_on_error = true
|
55
|
+
t.verbose = false
|
56
|
+
t.source_files = 'lib/**/*.rb'
|
57
|
+
end
|
58
|
+
<% end %>
|
59
|
+
|
60
|
+
<% if use_roodi? %>
|
61
|
+
require 'roodi'
|
62
|
+
require 'roodi_task'
|
63
|
+
RoodiTask.new do |t|
|
64
|
+
t.verbose = false
|
65
|
+
end
|
66
|
+
<% end %>
|
67
|
+
|
68
|
+
task :default => :<%= default_task %>
|
69
|
+
|
70
|
+
<% case documentation_framework %>
|
71
|
+
<% when :rdoc %>
|
72
|
+
require 'rake/rdoctask'
|
73
|
+
Rake::RDocTask.new do |rdoc|
|
74
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
75
|
+
|
76
|
+
rdoc.rdoc_dir = 'rdoc'
|
77
|
+
rdoc.title = "<%= project_name %> #{version}"
|
78
|
+
rdoc.rdoc_files.include('README*')
|
79
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
80
|
+
end
|
81
|
+
<% when :yard %>
|
82
|
+
require 'yard'
|
83
|
+
YARD::Rake::YardocTask.new
|
84
|
+
<% end %>
|