Skip to content

Commit

Permalink
gemify
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Aug 19, 2009
1 parent 4529854 commit a0f8670
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 15 deletions.
60 changes: 47 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,56 @@
require 'rubygems'
require 'rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "acts_as_tree"
gem.summary = %Q{acts_as_tree as a gem}
gem.description = %Q{acts_as_tree as a gem}
gem.email = "jim@saturnflyer.com"
gem.homepage = "http://github.com/saturnflyer/acts_as_tree"
gem.authors = ["David Heinemeier Hansson",'and others']
# gem.add_development_dependency "thoughtbot-shoulda"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

require 'rake/testtask'
require 'rake/rdoctask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end

task :test => :check_dependencies

desc 'Default: run unit tests.'
task :default => :test

desc 'Test acts_as_tree plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end

desc 'Generate documentation for acts_as_tree plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'acts_as_tree'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.title = "acts_as_tree #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
3 changes: 1 addition & 2 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
require 'active_record/acts/tree'
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree
require File.dirname(__FILE__) + "/rails/init"
2 changes: 2 additions & 0 deletions lib/acts_as_tree.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'active_record/acts/tree'
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree
1 change: 1 addition & 0 deletions rails/init.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'acts_as_tree'
Empty file removed test/abstract_unit.rb
Empty file.
Empty file removed test/database.yml
Empty file.
Empty file removed test/fixtures/mixin.rb
Empty file.
Empty file removed test/fixtures/mixins.yml
Empty file.
Empty file removed test/schema.rb
Empty file.

0 comments on commit a0f8670

Please sign in to comment.