1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/aasm.gemspec
Johnny Shields 13e7090d40 Added autocreation of state scopes for Mongoid, including RSpec tests. The interface mirrors the ActiveRecord support for the same.
Summary of changes
- Added the following methods to persistence/mongoid_persistence.rb
  - find_in_state
  - count_in_state
  - with_state_scope (protected in AR, would argue it should be made public there.
  - I did not port calculate_in_state, due to AR vs. Mongoid API differences; I made with_state_scope public instead. (I think it should be public for AR as well.)
- Moved AASM::Base patch which aliases scopes in persistence/active_record_persistence.rb to persistence/base.rb, and added a Mongoid detection clause to the if statement (in addition to AR). Also deleted commented code from the original method.
- Added 'mongoid' as dev dependency to gemspec
- Created two test files (mongoid_persistance_spec.rb and mongoid_models.rb) covering all my changes.
2013-01-07 07:29:35 +09:00

32 lines
1.3 KiB
Ruby

# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "aasm/version"
Gem::Specification.new do |s|
s.name = "aasm"
s.version = AASM::VERSION
s.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley", "Thorsten Boettger"]
s.email = %q{scott@elitists.net, ttilley@gmail.com, aasm@mt7.de}
s.homepage = %q{https://github.com/aasm/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.date = Time.now
s.licenses = ["MIT"]
s.add_development_dependency 'activerecord'
s.add_development_dependency 'mongoid'
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 'sqlite3'
s.add_development_dependency 'minitest'
# s.add_development_dependency 'debugger'
s.add_development_dependency 'ruby-debug-completion'
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"]
end