diff --git a/Gemfile b/Gemfile index f3af7cf..a1b93f3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,3 @@ source :rubygems -# Add dependencies to develop your gem here. -# Include everything needed to run rake, tests, features, etc. -group :development do - gem "rspec", ">= 2.0.0" - gem "shoulda" - gem "sdoc" - gem "bundler", ">= 1.0.0" - gem "jeweler", ">= 1.5.1" - gem "rcov", ">= 0" - gem "rr" - gem "reek", "~> 1.2.8" - gem "roodi", "~> 2.1.0" - gem "activerecord" -end +gemspec diff --git a/README.md b/README.md index 64ba3b3..469210a 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ The latest AASM can currently be pulled from the git repository on github. ### Building your own gems ### ```sh -% rake gemspec % rake build % sudo gem install pkg/aasm-2.2.1.gem ``` diff --git a/Rakefile b/Rakefile index 88d34d8..f42eb51 100644 --- a/Rakefile +++ b/Rakefile @@ -1,30 +1,11 @@ -require 'rubygems' -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 -require 'rake' - -require 'jeweler' -Jeweler::Tasks.new do |gem| - gem.name = "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://rubyist.github.com/aasm/" - gem.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley"] - gem.email = "scott@elitists.net, ttilley@gmail.com" - gem.add_development_dependency "rspec" - gem.add_development_dependency "shoulda" - gem.add_development_dependency 'sdoc' - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings -end -Jeweler::RubygemsDotOrgTasks.new +require 'bundler/gem_tasks' +require 'rspec/core' require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = FileList['spec/**/*_spec.rb'] +end + require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' @@ -32,48 +13,15 @@ Rake::TestTask.new(:test) do |test| test.verbose = true end -require 'rcov/rcovtask' -Rcov::RcovTask.new(:rcov_shoulda) do |test| - test.libs << 'test' - test.pattern = 'test/**/*_test.rb' - test.verbose = true -end - -RSpec::Core::RakeTask.new(:spec) do |spec| - spec.pattern = 'spec/**/*_spec.rb' - spec.rspec_opts = ['-cfs'] -end - -RSpec::Core::RakeTask.new(:rcov_rspec) do |spec| - spec.pattern = 'spec/**/*_spec.rb' - spec.rcov = true -end - -require 'reek/rake/task' -Reek::Rake::Task.new do |t| - t.fail_on_error = true - t.verbose = false - t.source_files = 'lib/**/*.rb' -end - -require 'roodi' -require 'roodi_task' -RoodiTask.new do |t| - t.verbose = false -end - task :default => :test -require 'rake/rdoctask' +require 'rdoc/task' +require 'aasm/version' require 'sdoc' -Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" +Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'rdoc' - rdoc.title = "aasm #{version}" + rdoc.title = "aasm #{AASM::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') - - rdoc.options << '--fmt' << 'shtml' - rdoc.template = 'direct' -end \ No newline at end of file +end diff --git a/VERSION b/VERSION deleted file mode 100644 index c043eea..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.2.1 diff --git a/aasm.gemspec b/aasm.gemspec index fcbbffa..3321a95 100644 --- a/aasm.gemspec +++ b/aasm.gemspec @@ -1,126 +1,26 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +# require "aasm/version" Gem::Specification.new do |s| - s.name = %q{aasm} - s.version = "2.2.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley"] - s.date = %q{2011-08-31} + s.name = "aasm" + s.version = "2.2.1" #AASM::VERSION + s.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley", "Thorsten Böttger"] + s.email = %q{scott@elitists.net, ttilley@gmail.com} + s.homepage = %q{http://rubyist.github.com/aasm/} + s.summary = %q{State machine mixin for Ruby objects} s.description = %q{AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects.} - s.email = %q{scott@elitists.net, ttilley@gmail.com} - s.extra_rdoc_files = [ - "LICENSE", - "README.rdoc" - ] - s.files = [ - ".document", - "Gemfile", - "LICENSE", - "README.rdoc", - "Rakefile", - "VERSION", - "aasm.gemspec", - "lib/aasm.rb", - "lib/aasm/aasm.rb", - "lib/aasm/event.rb", - "lib/aasm/persistence.rb", - "lib/aasm/persistence/active_record_persistence.rb", - "lib/aasm/state.rb", - "lib/aasm/state_machine.rb", - "lib/aasm/state_transition.rb", - "lib/aasm/supporting_classes.rb", - "spec/functional/conversation.rb", - "spec/functional/conversation_spec.rb", - "spec/spec_helper.rb", - "spec/unit/aasm_spec.rb", - "spec/unit/active_record_persistence_spec.rb", - "spec/unit/before_after_callbacks_spec.rb", - "spec/unit/event_spec.rb", - "spec/unit/state_spec.rb", - "spec/unit/state_transition_spec.rb", - "test/functional/auth_machine_test.rb", - "test/models/process.rb", - "test/test_helper.rb", - "test/unit/aasm_test.rb", - "test/unit/event_test.rb", - "test/unit/state_machine_test.rb", - "test/unit/state_test.rb", - "test/unit/state_transition_test.rb" - ] - s.homepage = %q{http://rubyist.github.com/aasm/} + + s.add_dependency 'activerecord' #, '~> 3.0' + s.add_development_dependency 'rake' + s.add_development_dependency 'sdoc' + s.add_development_dependency 'rspec', '~> 2.0' + s.add_development_dependency 'rr' + s.add_development_dependency 'shoulda' + s.add_development_dependency 'minitest' + + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.rubygems_version = %q{1.6.2} - s.summary = %q{State machine mixin for Ruby objects} - s.test_files = [ - "spec/functional/conversation.rb", - "spec/functional/conversation_spec.rb", - "spec/spec_helper.rb", - "spec/unit/aasm_spec.rb", - "spec/unit/active_record_persistence_spec.rb", - "spec/unit/before_after_callbacks_spec.rb", - "spec/unit/event_spec.rb", - "spec/unit/state_spec.rb", - "spec/unit/state_transition_spec.rb", - "test/functional/auth_machine_test.rb", - "test/models/process.rb", - "test/test_helper.rb", - "test/unit/aasm_test.rb", - "test/unit/event_test.rb", - "test/unit/state_machine_test.rb", - "test/unit/state_test.rb", - "test/unit/state_transition_test.rb" - ] - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, [">= 2.0.0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 1.0.0"]) - s.add_development_dependency(%q, [">= 1.5.1"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, ["~> 1.2.8"]) - s.add_development_dependency(%q, ["~> 2.1.0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 2.0.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.0.0"]) - s.add_dependency(%q, [">= 1.5.1"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, ["~> 1.2.8"]) - s.add_dependency(%q, ["~> 2.1.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 2.0.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.0.0"]) - s.add_dependency(%q, [">= 1.5.1"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, ["~> 1.2.8"]) - s.add_dependency(%q, ["~> 2.1.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end end - diff --git a/lib/aasm/version.rb b/lib/aasm/version.rb new file mode 100644 index 0000000..8f264b0 --- /dev/null +++ b/lib/aasm/version.rb @@ -0,0 +1,3 @@ +module AASM + VERSION = "2.2.1" +end