Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup, move to jeweler, nuke gemspec
- Loading branch information
Showing
11 changed files
with
77 additions
and
739 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
README.rdoc | ||
lib/**/*.rb | ||
bin/* | ||
features/**/*.feature | ||
LICENSE |
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,5 +1,6 @@ | ||
rdoc | ||
pkg | ||
coverage | ||
*~ | ||
*.sw? | ||
*~ | ||
.DS_Store | ||
coverage | ||
pkg | ||
rdoc |
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,95 +1,75 @@ | ||
# Copyright 2008 Scott Barron (scott@elitists.net) | ||
# All rights reserved | ||
|
||
# This file may be distributed under an MIT style license. | ||
# See MIT-LICENSE for details. | ||
require 'rubygems' | ||
require 'rake' | ||
|
||
begin | ||
require 'rubygems' | ||
require 'rake/gempackagetask' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
require 'spec/rake/spectask' | ||
rescue Exception | ||
nil | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "ttilley-aasm" | ||
gem.summary = %Q{State machine mixin for Ruby objects} | ||
gem.description = %Q{AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects.} | ||
gem.homepage = "http://github.com/ttilley/aasm" | ||
gem.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley"] | ||
gem.email = "ttilley@gmail.com" | ||
gem.add_development_dependency "rspec" | ||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings | ||
end | ||
Jeweler::GemcutterTasks.new | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" | ||
end | ||
|
||
if `ruby -Ilib -raasm -e "print AASM.Version"` =~ /([0-9.]+)$/ | ||
CURRENT_VERSION = $1 | ||
else | ||
CURRENT_VERSION = '0.0.0' | ||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.spec_files = FileList['spec/**/*_spec.rb'] | ||
spec.spec_opts = ['-cfs'] | ||
end | ||
$package_version = CURRENT_VERSION | ||
|
||
PKG_FILES = FileList['[A-Z]*', | ||
'lib/**/*.rb', | ||
'doc/**/*' | ||
] | ||
|
||
desc 'Generate documentation for the acts as state machine plugin.' | ||
rd = Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'html' | ||
rdoc.template = 'doc/jamis.rb' | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'AASM' | ||
rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README.rdoc' << '--title' << 'AASM' | ||
rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGELOG') | ||
rdoc.rdoc_files.include('lib/*.rb', 'lib/**/*.rb', 'doc/**/*.rdoc') | ||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
if !defined?(Gem) | ||
puts "Package target requires RubyGEMs" | ||
else | ||
spec = Gem::Specification.new do |s| | ||
s.name = 'aasm' | ||
s.version = $package_version | ||
s.summary = 'State machine mixin for Ruby objects' | ||
s.description = <<EOF | ||
AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects. | ||
EOF | ||
task :spec => :check_dependencies | ||
|
||
s.files = PKG_FILES.to_a | ||
s.require_path = 'lib' | ||
s.has_rdoc = true | ||
s.extra_rdoc_files = rd.rdoc_files.reject {|fn| fn =~ /\.rb$/}.to_a | ||
s.rdoc_options = rd.options | ||
|
||
s.authors = ['Scott Barron', 'Scott Petersen', 'Travis Tilley'] | ||
s.email = 'ttilley@gmail.com' | ||
s.homepage = 'http://github.com/ttilley/aasm' | ||
begin | ||
require 'reek/rake_task' | ||
Reek::RakeTask.new do |t| | ||
t.fail_on_error = true | ||
t.verbose = false | ||
t.source_files = 'lib/**/*.rb' | ||
end | ||
|
||
package_task = Rake::GemPackageTask.new(spec) do |pkg| | ||
pkg.need_zip = true | ||
pkg.need_tar = true | ||
rescue LoadError | ||
task :reek do | ||
abort "Reek is not available. In order to run reek, you must: sudo gem install reek" | ||
end | ||
end | ||
|
||
if !defined?(Spec) | ||
puts "spec and cruise targets require RSpec" | ||
else | ||
desc "Run all examples with RCov" | ||
Spec::Rake::SpecTask.new('cruise') do |t| | ||
t.spec_files = FileList['spec/**/*.rb'] | ||
t.rcov = true | ||
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'Library', '--exclude', 'rcov.rb'] | ||
begin | ||
require 'roodi' | ||
require 'roodi_task' | ||
RoodiTask.new do |t| | ||
t.verbose = false | ||
end | ||
|
||
desc "Run all examples" | ||
Spec::Rake::SpecTask.new('spec') do |t| | ||
t.spec_files = FileList['spec/**/*.rb'] | ||
t.rcov = false | ||
t.spec_opts = ['-cfs'] | ||
rescue LoadError | ||
task :roodi do | ||
abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi" | ||
end | ||
end | ||
|
||
if !defined?(Gem) | ||
puts "Package target requires RubyGEMs" | ||
else | ||
desc "sudo gem uninstall aasm && rake gem && sudo gem install pkg/aasm-3.0.0.gem" | ||
task :reinstall do | ||
puts `sudo gem uninstall aasm && rake gem && sudo gem install pkg/aasm-3.0.0.gem` | ||
task :default => :spec | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
if File.exist?('VERSION') | ||
version = File.read('VERSION') | ||
else | ||
version = "" | ||
end | ||
end | ||
|
||
task :default => [:spec] | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "ttilley-aasm #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.1.2 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.