Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.2.0 - Enable minitest and mocha by default
- Loading branch information
Josep M. Bach
committed
Apr 4, 2011
1 parent
63355d1
commit c1c50c4
Showing
8 changed files
with
184 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
require 'bundler' | ||
Bundler::GemHelper.install_tasks | ||
|
||
require 'rspec/core/rake_task' | ||
desc "Run <%= underscored %> specs" | ||
RSpec::Core::RakeTask.new | ||
|
||
require 'yard' | ||
YARD::Rake::YardocTask.new(:docs) do |t| | ||
t.files = ['lib/**/*.rb'] | ||
t.options = ['-m', 'markdown', '--no-private', '-r', 'Readme.md', '--title', '<%= camelized %> documentation'] | ||
end | ||
|
||
site = 'doc' | ||
source_branch = 'master' | ||
deploy_branch = 'gh-pages' | ||
|
||
desc "generate and deploy documentation website to github pages" | ||
multitask :pages do | ||
puts ">>> Deploying #{deploy_branch} branch to Github Pages <<<" | ||
require 'git' | ||
repo = Git.open('.') | ||
puts "\n>>> Checking out #{deploy_branch} branch <<<\n" | ||
repo.branch("#{deploy_branch}").checkout | ||
(Dir["*"] - [site]).each { |f| rm_rf(f) } | ||
Dir["#{site}/*"].each {|f| mv(f, "./")} | ||
rm_rf(site) | ||
puts "\n>>> Moving generated site files <<<\n" | ||
Dir["**/*"].each {|f| repo.add(f) } | ||
repo.status.deleted.each {|f, s| repo.remove(f)} | ||
puts "\n>>> Commiting: Site updated at #{Time.now.utc} <<<\n" | ||
message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}" | ||
repo.commit(message) | ||
puts "\n>>> Pushing generated site to #{deploy_branch} branch <<<\n" | ||
repo.push | ||
puts "\n>>> Github Pages deploy complete <<<\n" | ||
repo.branch("#{source_branch}").checkout | ||
end | ||
|
||
task :doc => [:docs] | ||
|
||
desc "Generate and open class diagram (needs Graphviz installed)" | ||
task :graph do |t| | ||
`bundle exec yard graph -d --full --no-private | dot -Tpng -o graph.png && open graph.png` | ||
end | ||
|
||
task :default => [:spec] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
gem 'minitest' | ||
require 'minitest/spec' | ||
require 'minitest/autorun' | ||
require 'mocha' | ||
|
||
require '<%= underscored %>' | ||
<% if rails %> | ||
|
||
ActiveRecord::Base.establish_connection( | ||
:adapter => 'sqlite3', | ||
:database => ':memory:' | ||
) | ||
|
||
ActiveRecord::Schema.define do | ||
create_table :articles do |t| | ||
t.string :name | ||
t.integer :price | ||
|
||
t.timestamps | ||
end | ||
end | ||
<% end %> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Gram | ||
VERSION = '0.1.0' | ||
VERSION = '0.2.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters