aasm 4.11.1 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -16
  3. data/Appraisals +44 -0
  4. data/CHANGELOG.md +14 -0
  5. data/CONTRIBUTING.md +24 -0
  6. data/Gemfile +4 -21
  7. data/README.md +53 -32
  8. data/Rakefile +6 -1
  9. data/TESTING.md +25 -0
  10. data/aasm.gemspec +3 -0
  11. data/gemfiles/rails_3.2.gemfile +13 -0
  12. data/gemfiles/rails_4.0.gemfile +8 -9
  13. data/gemfiles/rails_4.2.gemfile +9 -9
  14. data/gemfiles/rails_4.2_mongoid_5.gemfile +5 -9
  15. data/gemfiles/rails_5.0.gemfile +7 -16
  16. data/lib/aasm/aasm.rb +9 -3
  17. data/lib/aasm/base.rb +3 -1
  18. data/lib/aasm/configuration.rb +4 -0
  19. data/lib/aasm/core/event.rb +17 -3
  20. data/lib/aasm/core/state.rb +7 -0
  21. data/lib/aasm/core/transition.rb +9 -0
  22. data/lib/aasm/persistence.rb +0 -3
  23. data/lib/aasm/persistence/active_record_persistence.rb +1 -1
  24. data/lib/aasm/persistence/mongoid_persistence.rb +48 -9
  25. data/lib/aasm/state_machine.rb +4 -2
  26. data/lib/aasm/state_machine_store.rb +5 -2
  27. data/lib/aasm/version.rb +1 -1
  28. data/lib/motion-aasm.rb +0 -1
  29. data/spec/generators/active_record_generator_spec.rb +42 -39
  30. data/spec/generators/mongoid_generator_spec.rb +4 -6
  31. data/spec/models/{invalid_persistor.rb → active_record/invalid_persistor.rb} +0 -2
  32. data/spec/models/{silent_persistor.rb → active_record/silent_persistor.rb} +0 -2
  33. data/spec/models/{transactor.rb → active_record/transactor.rb} +0 -2
  34. data/spec/models/{validator.rb → active_record/validator.rb} +0 -2
  35. data/spec/models/{worker.rb → active_record/worker.rb} +0 -0
  36. data/spec/models/callbacks/basic.rb +5 -2
  37. data/spec/models/guard_with_params.rb +1 -1
  38. data/spec/models/mongoid/invalid_persistor_mongoid.rb +39 -0
  39. data/spec/models/mongoid/silent_persistor_mongoid.rb +39 -0
  40. data/spec/models/mongoid/validator_mongoid.rb +100 -0
  41. data/spec/models/multiple_transitions_that_differ_only_by_guard.rb +31 -0
  42. data/spec/models/parametrised_event.rb +7 -0
  43. data/spec/models/simple_multiple_example.rb +12 -0
  44. data/spec/models/sub_class.rb +34 -0
  45. data/spec/spec_helper.rb +0 -33
  46. data/spec/spec_helpers/active_record.rb +7 -0
  47. data/spec/spec_helpers/dynamoid.rb +33 -0
  48. data/spec/spec_helpers/mongoid.rb +7 -0
  49. data/spec/spec_helpers/redis.rb +7 -0
  50. data/spec/spec_helpers/remove_warnings.rb +1 -0
  51. data/spec/spec_helpers/sequel.rb +7 -0
  52. data/spec/unit/api_spec.rb +76 -73
  53. data/spec/unit/callbacks_spec.rb +5 -0
  54. data/spec/unit/event_spec.rb +12 -0
  55. data/spec/unit/guard_with_params_spec.rb +4 -0
  56. data/spec/unit/localizer_spec.rb +55 -53
  57. data/spec/unit/multiple_transitions_that_differ_only_by_guard_spec.rb +14 -0
  58. data/spec/unit/override_warning_spec.rb +8 -0
  59. data/spec/unit/persistence/active_record_persistence_multiple_spec.rb +452 -448
  60. data/spec/unit/persistence/active_record_persistence_spec.rb +523 -501
  61. data/spec/unit/persistence/dynamoid_persistence_multiple_spec.rb +4 -9
  62. data/spec/unit/persistence/dynamoid_persistence_spec.rb +4 -9
  63. data/spec/unit/persistence/mongoid_persistence_multiple_spec.rb +83 -9
  64. data/spec/unit/persistence/mongoid_persistence_spec.rb +85 -9
  65. data/spec/unit/persistence/redis_persistence_spec.rb +3 -7
  66. data/spec/unit/persistence/sequel_persistence_multiple_spec.rb +4 -9
  67. data/spec/unit/persistence/sequel_persistence_spec.rb +4 -9
  68. data/spec/unit/simple_multiple_example_spec.rb +28 -0
  69. data/spec/unit/subclassing_multiple_spec.rb +37 -2
  70. data/spec/unit/subclassing_spec.rb +17 -2
  71. metadata +66 -28
  72. data/gemfiles/rails_3.2_stable.gemfile +0 -15
  73. data/gemfiles/rails_4.0_mongo_mapper.gemfile +0 -16
  74. data/gemfiles/rails_4.2_mongo_mapper.gemfile +0 -17
  75. data/lib/aasm/persistence/mongo_mapper_persistence.rb +0 -163
  76. data/spec/models/mongo_mapper/complex_mongo_mapper_example.rb +0 -37
  77. data/spec/models/mongo_mapper/no_scope_mongo_mapper.rb +0 -21
  78. data/spec/models/mongo_mapper/simple_mongo_mapper.rb +0 -23
  79. data/spec/models/mongo_mapper/simple_new_dsl_mongo_mapper.rb +0 -25
  80. data/spec/unit/persistence/mongo_mapper_persistence_multiple_spec.rb +0 -149
  81. data/spec/unit/persistence/mongo_mapper_persistence_spec.rb +0 -96
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a57dd3feade6d1aea288f5999b4d93c890b11c60
4
- data.tar.gz: 8e14ba9da4f262ca2f2ba0a40f633af6234e2075
3
+ metadata.gz: fedd52d9c93d911e324c5c3594910d7fb7b33db2
4
+ data.tar.gz: a0334890f17ce24960567a8f95e0cafd03375a9f
5
5
  SHA512:
6
- metadata.gz: 08b85c55e73ba7b152e7a8344bf706315aa33016047849fee0e64dff8201f2691132d83d1e2c91b7e603b1e5f8e2a23bb8510573b539f142fa38b718c4aa0191
7
- data.tar.gz: 2cdd0ef93171f881ef36bd2b1fe0d06d71dce2a73fffee570515c12f69fdc52fb18ea02e29a5b4591498de9526e3fb1bf6039aff8d4ed9af0c8a069f278150cc
6
+ metadata.gz: 91bec3c1dfd3c450fb0565794026c0dcba137db1c42e5fb79a63544e4071c7ece69e36a2c42b9a5e45cf8790a1fca769c25ce6dc9f9050819a4c7dae7216bb5f
7
+ data.tar.gz: 20e8f730c627d53ad7558240d808c2ac42e0540b57e0e78814e560668e80af18c0c83014eefb3d335356dd8bb58ff27425f412f0a8054921171e206cff6a88cf
@@ -4,44 +4,43 @@ cache: bundler
4
4
 
5
5
  rvm:
6
6
  - 1.9.3
7
- - 2.2.5
8
- - 2.3.1
7
+ - 2.2.6
8
+ - 2.3.3
9
9
  - jruby-1.7 # JRuby in 1.9 mode
10
10
  - jruby-9.0.5.0
11
- - rbx-2.5.8
12
11
 
13
12
  services:
14
13
  - mongodb
15
14
  - redis-server
16
15
 
17
16
  gemfile:
18
- - gemfiles/rails_3.2_stable.gemfile
17
+ - gemfiles/rails_3.2.gemfile
19
18
  - gemfiles/rails_4.0.gemfile
20
- - gemfiles/rails_4.0_mongo_mapper.gemfile
21
19
  - gemfiles/rails_4.2.gemfile
22
20
  - gemfiles/rails_4.2_mongoid_5.gemfile
23
- - gemfiles/rails_4.2_mongo_mapper.gemfile
24
21
  - gemfiles/rails_5.0.gemfile
25
22
 
26
23
  before_script:
27
24
  - mkdir /tmp/dynamodb
28
- - wget -O - http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | tar xz --directory /tmp/dynamodb
25
+ - wget -O - http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz | tar xz --directory /tmp/dynamodb
29
26
  - java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory -delayTransientStatuses -port 30180 &
27
+ - mongod --version
30
28
 
31
29
  matrix:
32
- allow_failures:
33
- - rvm: jruby-9.0.5.0
34
- gemfile: gemfiles/rails_5.0.gemfile
35
- - rvm: rbx-2.5.8
36
- gemfile: gemfiles/rails_5.0.gemfile
37
30
  exclude:
31
+ - rvm: 1.9.3
32
+ gemfile: gemfiles/rails_4.2_mongoid_5.gemfile
38
33
  - rvm: 1.9.3
39
34
  gemfile: gemfiles/rails_5.0.gemfile
40
- - rvm: 2.2.5
41
- gemfile: gemfiles/rails_3.2_stable.gemfile
42
- - rvm: 2.3.1
43
- gemfile: gemfiles/rails_3.2_stable.gemfile
35
+ - rvm: 2.2.6
36
+ gemfile: gemfiles/rails_3.2.gemfile
37
+ - rvm: 2.3.3
38
+ gemfile: gemfiles/rails_3.2.gemfile
44
39
  - rvm: jruby-1.7
40
+ gemfile: gemfiles/rails_4.2_mongoid_5.gemfile
41
+ - rvm: jruby-1.7
42
+ gemfile: gemfiles/rails_5.0.gemfile
43
+ - rvm: jruby-9.0.5.0
45
44
  gemfile: gemfiles/rails_5.0.gemfile
46
45
 
47
46
  notifications:
@@ -0,0 +1,44 @@
1
+ appraise 'rails_3.2' do
2
+ gem 'rails', '~>3.2.22'
3
+ gem 'mongoid', '~>3.1'
4
+ gem 'sequel'
5
+ gem 'bson_ext', :platforms => :ruby
6
+ gem 'test-unit', '~> 3.0'
7
+ end
8
+
9
+ appraise 'rails_4.0' do
10
+ gem 'mime-types', '~> 2', :platforms => [:ruby_19, :jruby]
11
+ gem 'rails', '4.0.13'
12
+ gem 'mongoid', '~>4.0'
13
+ gem 'sequel'
14
+ gem 'dynamoid', '~> 1', :platforms => :ruby
15
+ gem 'aws-sdk', '~>2', :platforms => :ruby
16
+ gem 'redis-objects'
17
+ end
18
+
19
+ appraise 'rails_4.2' do
20
+ gem 'nokogiri', '1.6.8.1', :platforms => [:ruby_19]
21
+ gem 'mime-types', '~> 2', :platforms => [:ruby_19, :jruby]
22
+ gem 'rails', '4.2.5'
23
+ gem 'mongoid', '~>4.0'
24
+ gem 'sequel'
25
+ gem 'dynamoid', '~> 1', :platforms => :ruby
26
+ gem 'aws-sdk', '~>2', :platforms => :ruby
27
+ end
28
+
29
+ appraise 'rails_4.2_mongoid_5' do
30
+ gem 'mime-types', '~> 2', :platforms => [:ruby_19, :jruby]
31
+ gem 'rails', '4.2.5'
32
+ gem 'mongoid', '~>5.0'
33
+ end
34
+
35
+ appraise 'rails_5.0' do
36
+ gem 'rails', '5.0.0'
37
+ gem 'mongoid', '~>6.0'
38
+ gem 'sequel'
39
+
40
+ # dynamoid is not yet Rails 5 compatible
41
+ # gem 'dynamoid', '~> 1', :platforms => :ruby
42
+
43
+ gem 'aws-sdk', '~>2', :platforms => :ruby
44
+ end
@@ -1,5 +1,19 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## unreleased
4
+
5
+ ## 4.12.0
6
+
7
+ * Fix thread safe issue with concurrent-ruby gem [see [pull-request #422](https://github.com/aasm/aasm/pull/442), thanks to [@reidmorrison](https://github.com/reidmorrison)
8
+ * Drop Support for Mongo Mapper [see [pull-request #439](https://github.com/aasm/aasm/pull/439)], thanks to [@reidmorrison](https://github.com/reidmorrison)
9
+ * add :binding_event option to event [see [pull-request #438](https://github.com/aasm/aasm/pull/438)], thanks to [@leanhdaovn](https://github.com/leanhdaovn)
10
+ * fix: `skip_validation_on_save: true` for default_scope records, [see [pull-request #433](https://github.com/aasm/aasm/pull/433)], thanks to [@larissa](https://github.com/larissa)
11
+ * Deep clone state machine during inheritance so that state machines in child classes can be modified (see [pull-request #429](https://github.com/aasm/aasm/pull/429)), thanks to [@reidmorrison](https://github.com/reidmorrison) and [@Tybot204](https://github.com/Tybot204)
12
+ * add before_success callback for event (see [pull-request #422](https://github.com/aasm/aasm/pull/422)), thanks to [@timsly ](https://github.com/timsly)
13
+ * fix: multiple transitions in a single event with the same to and from states (see [issue #372](https://github.com/aasm/aasm/issues/372) and [issue #362](https://github.com/aasm/aasm/issues/362) for details, fixed with [pull-request #408](https://github.com/aasm/aasm/pull/408), thanks to [@dathanb](https://github.com/dathanb))
14
+ * fix: passing nil as a argument to callbacks (see [issue #404](https://github.com/aasm/aasm/issues/404) for details, fixed with [pull-request #406](https://github.com/aasm/aasm/pull/406), thanks to [@yogeshjain999](https://github.com/yogeshjain999))
15
+
16
+
3
17
  ## 4.11.1
4
18
 
5
19
  * fix: generator file name when using custom column name instead of
@@ -0,0 +1,24 @@
1
+ ## Contributing ##
2
+
3
+ While not required to contribute, we recommend [RVM](https://rvm.io/) to manage your rubies.
4
+
5
+ 1. Read the [Contributor Code of Conduct](https://github.com/aasm/aasm/blob/master/CODE_OF_CONDUCT.md)
6
+ 2. [Fork it](https://help.github.com/articles/about-forks/)
7
+ 3. Clone the project `git clone git@github.com:[YOUR GITHUB USERNAME]/aasm.git`
8
+ 4. `cd aasm`
9
+ 5. Create your feature branch `git checkout -b my-new-feature`
10
+ 6. Write tests for your changes (feature/bug)
11
+ 7. Write your (feature/bugfix)
12
+ 8. Install the dependencies `appraisal install`
13
+ 9. Run the tests `appraisal rspec`
14
+ 10. Commit your changes `git commit -am 'Added some feature'`
15
+ 11. Push to the branch `git push origin my-new-feature`
16
+ 12. Create new [Pull Request](https://help.github.com/articles/creating-a-pull-request/)
17
+
18
+ There are some option dependencies as well.
19
+
20
+ - [MongoDB server](https://www.mongodb.com/download-center)
21
+ - [Redis](https://redis.io/topics/quickstart)
22
+ - [DynamoDB (local)](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)
23
+
24
+ If we've missed something please open an [issue](https://github.com/aasm/aasm/issues/new)
data/Gemfile CHANGED
@@ -1,24 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "sqlite3", :platforms => :ruby
4
- gem 'rubysl', :platforms => :rbx
5
- gem "jruby-openssl", :platforms => :jruby
6
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
7
- gem "mime-types", "~> 2" if Gem::Version.create(RUBY_VERSION.dup) <= Gem::Version.create('1.9.3')
8
- gem "rails", "~>4.2"
9
- gem 'mongoid', '~>4.0' if Gem::Version.create(RUBY_VERSION.dup) >= Gem::Version.create('1.9.3')
10
- gem 'sequel'
11
-
12
- # testing dynamoid
13
- # gem 'dynamoid', '~> 1'
14
- # gem 'aws-sdk', '~>2'
15
-
16
- # Since mongoid V4 requires incompatible bson V2, cannot have mongoid (V4 or greater)
17
- # and mongo_mapper ( or mongo ) in the same application
18
- # gem 'mongo_mapper', '~> 0.13'
19
- # gem 'bson_ext', :platforms => :ruby
20
-
21
- # uncomment if you want to run specs for Redis persistence
22
- # gem "redis-objects"
23
-
24
3
  gemspec
4
+
5
+ gem 'sqlite3', :platforms => :ruby
6
+ gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
7
+ gem 'rails', '5.0.0'
data/README.md CHANGED
@@ -10,7 +10,7 @@ This package contains AASM, a library for adding finite state machines to Ruby c
10
10
  AASM started as the *acts_as_state_machine* plugin but has evolved into a more generic library
11
11
  that no longer targets only ActiveRecord models. It currently provides adapters for
12
12
  [ActiveRecord](http://api.rubyonrails.org/classes/ActiveRecord/Base.html),
13
- [Mongoid](http://mongoid.org/), and [Mongomapper](http://mongomapper.com/) but it can be used for any Ruby class, no matter what
13
+ and [Mongoid](http://mongoid.org/) but it can be used for any Ruby class, no matter what
14
14
  parent class it has (if any).
15
15
 
16
16
  ## Upgrade from version 3 to 4
@@ -180,6 +180,7 @@ begin
180
180
  new_state before_enter
181
181
  new_state enter
182
182
  ...update state...
183
+ event before_success # if persist successful
183
184
  transition success # if persist successful
184
185
  event success # if persist successful
185
186
  old_state after_exit
@@ -415,6 +416,46 @@ SimpleMultipleExample.aasm(:work).states
415
416
  # => [:standing, :walking, :running]
416
417
  ```
417
418
 
419
+ ### Binding event
420
+
421
+ Allow an event to be bound to another
422
+ ```ruby
423
+ class Example
424
+ include AASM
425
+
426
+ aasm(:work) do
427
+ state :sleeping, :initial => true
428
+ state :processing
429
+
430
+ event :start do
431
+ transitions :from => :sleeping, :to => :processing
432
+ end
433
+ event :stop do
434
+ transitions :from => :processing, :to => :sleeping
435
+ end
436
+ end
437
+
438
+ aasm(:question) do
439
+ state :answered, :initial => true
440
+ state :asked
441
+
442
+ event :ask, :binding_event => :start do
443
+ transitions :from => :answered, :to => :asked
444
+ end
445
+ event :answer, :binding_event => :stop do
446
+ transitions :from => :asked, :to => :answered
447
+ end
448
+ end
449
+ end
450
+
451
+ example = Example.new
452
+ example.aasm(:work).current_state #=> :sleeping
453
+ example.aasm(:question).current_state #=> :answered
454
+ example.ask
455
+ example.aasm(:work).current_state #=> :processing
456
+ example.aasm(:question).current_state #=> :asked
457
+ ```
458
+
418
459
  *Final note*: Support for multiple state machines per class is a pretty new feature
419
460
  (since version `4.3`), so please bear with us in case it doesn't work as expected.
420
461
 
@@ -532,6 +573,8 @@ class Job < ActiveRecord::Base
532
573
  end
533
574
  ```
534
575
 
576
+ ### Bang events
577
+
535
578
  You can tell AASM to auto-save the object or leave it unsaved
536
579
 
537
580
  ```ruby
@@ -540,8 +583,10 @@ job.run # not saved
540
583
  job.run! # saved
541
584
  ```
542
585
 
543
- Saving includes running all validations on the `Job` class, and returns `true` if
544
- successful or `false` if errors occur. Exceptions are not raised.
586
+ Saving includes running all validations on the `Job` class. If
587
+ `whiny_persistence` flag is set to `true`, exception is raised in case of
588
+ failure. If `whiny_persistence` flag is set to false, methods with a bang return
589
+ `true` if the state transition is successful or `false` if an error occurs.
545
590
 
546
591
  If you want make sure the state gets saved without running validations (and
547
592
  thereby maybe persisting an invalid object state), simply tell AASM to skip the
@@ -632,7 +677,7 @@ to ```false```.
632
677
 
633
678
  ### Sequel
634
679
 
635
- AASM also supports [Sequel](http://sequel.jeremyevans.net/) besides _ActiveRecord_, _Mongoid_, and _MongoMapper_.
680
+ AASM also supports [Sequel](http://sequel.jeremyevans.net/) besides _ActiveRecord_, and _Mongoid_.
636
681
 
637
682
  ```ruby
638
683
  class Job < Sequel::Model
@@ -668,23 +713,6 @@ class Job
668
713
  end
669
714
  ```
670
715
 
671
- ### MongoMapper
672
-
673
- AASM also supports persistence to Mongodb if you're using MongoMapper. Make sure
674
- to include MongoMapper::Document before you include AASM.
675
-
676
- ```ruby
677
- class Job
678
- include MongoMapper::Document
679
- include AASM
680
-
681
- key :aasm_state, Symbol
682
- aasm do
683
- ...
684
- end
685
- end
686
- ```
687
-
688
716
  ### Redis
689
717
 
690
718
  AASM also supports persistence in Redis.
@@ -921,13 +949,13 @@ end
921
949
 
922
950
  ```ruby
923
951
  # show all states
924
- Job.aasm.states.map(&:name)
952
+ Job.aasm.states.map(&:name)
925
953
  #=> [:sleeping, :running, :cleaning]
926
954
 
927
955
  job = Job.new
928
956
 
929
957
  # show all permitted states (from initial state)
930
- job.aasm.states(:permitted => true).map(&:name)
958
+ job.aasm.states(:permitted => true).map(&:name)
931
959
  #=> [:running]
932
960
 
933
961
  job.run
@@ -935,7 +963,7 @@ job.aasm.states(:permitted => true).map(&:name)
935
963
  #=> [:sleeping]
936
964
 
937
965
  # show all non permitted states
938
- job.aasm.states(:permitted => false).map(&:name)
966
+ job.aasm.states(:permitted => false).map(&:name)
939
967
  #=> [:cleaning]
940
968
 
941
969
  # show all possible (triggerable) events from the current state
@@ -1083,14 +1111,7 @@ Feel free to
1083
1111
  * [Anil Maurya](http://github.com/anilmaurya) (since 2016)
1084
1112
 
1085
1113
 
1086
- ## Contributing ##
1087
-
1088
- 1. Read the [Contributor Code of Conduct](https://github.com/aasm/aasm/blob/master/CODE_OF_CONDUCT.md)
1089
- 2. Fork it
1090
- 3. Create your feature branch (git checkout -b my-new-feature)
1091
- 4. Commit your changes (git commit -am 'Added some feature')
1092
- 5. Push to the branch (git push origin my-new-feature)
1093
- 6. Create new Pull Request
1114
+ ## [Contributing](CONTRIBUTING.md)
1094
1115
 
1095
1116
  ## Warranty ##
1096
1117
 
data/Rakefile CHANGED
@@ -23,4 +23,9 @@ Rake::RDocTask.new do |rdoc|
23
23
  rdoc.rdoc_files.include('lib/**/*.rb')
24
24
  end
25
25
 
26
- task :default => :spec
26
+ if ENV["APPRAISAL_INITIALIZED"] || ENV["TRAVIS"]
27
+ task :default => :spec
28
+ else
29
+ require 'appraisal'
30
+ task :default => :appraisal
31
+ end
@@ -0,0 +1,25 @@
1
+ ## Install dependency matrix
2
+
3
+ appraisal install
4
+
5
+ This will re-generate Gemfiles in `gemfile` folder
6
+
7
+ Use rvm gemsets or similar to avoid global gem pollution
8
+
9
+ ## Run specs
10
+
11
+ For all supported Rails/ORM combinations:
12
+
13
+ appraisal rspec
14
+
15
+ Or for specific one:
16
+
17
+ appraisal rails_4.2 rspec
18
+
19
+ Or for one particular test file
20
+
21
+ appraisal rails_4.2_mongoid_5 rspec spec/unit/persistence/mongoid_persistence_multiple_spec.rb
22
+
23
+ Or down to one test case
24
+
25
+ appraisal rails_4.2_mongoid_5 rspec spec/unit/persistence/mongoid_persistence_multiple_spec.rb:92
@@ -16,10 +16,13 @@ Gem::Specification.new do |s|
16
16
  s.platform = Gem::Platform::RUBY
17
17
  s.required_ruby_version = '>= 1.9.3'
18
18
 
19
+ s.add_dependency 'concurrent-ruby', '~> 1.0'
20
+
19
21
  s.add_development_dependency 'rake'
20
22
  s.add_development_dependency 'sdoc'
21
23
  s.add_development_dependency 'rspec', ">= 3"
22
24
  s.add_development_dependency 'generator_spec'
25
+ s.add_development_dependency 'appraisal'
23
26
 
24
27
  # debugging
25
28
  # s.add_development_dependency 'debugger'
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sqlite3", :platforms => :ruby
6
+ gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
7
+ gem "rails", "~>3.2.22"
8
+ gem "mongoid", "~>3.1"
9
+ gem "sequel"
10
+ gem "bson_ext", :platforms => :ruby
11
+ gem "test-unit", "~> 3.0"
12
+
13
+ gemspec :path => "../"
@@ -1,16 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
- gem "sqlite3", :platforms => :ruby
4
- gem 'rubysl', :platforms => :rbx
5
- gem 'rubinius-developer_tools', :platforms => :rbx
6
- gem "jruby-openssl", :platforms => :jruby
5
+ gem "sqlite3", :platforms => :ruby
7
6
  gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
8
- gem "mime-types", "~> 2" if Gem::Version.create(RUBY_VERSION.dup) <= Gem::Version.create('1.9.3')
9
7
  gem "rails", "4.0.13"
10
- gem 'mongoid', '~>4.0' if Gem::Version.create(RUBY_VERSION.dup) >= Gem::Version.create('1.9.3')
11
- gem 'sequel'
12
- gem 'dynamoid', '~> 1', :platforms => :ruby
13
- gem 'aws-sdk', '~>2', :platforms => :ruby
8
+ gem "mime-types", "~> 2", :platforms => [:ruby_19, :jruby]
9
+ gem "mongoid", "~>4.0"
10
+ gem "sequel"
11
+ gem "dynamoid", "~> 1", :platforms => :ruby
12
+ gem "aws-sdk", "~>2", :platforms => :ruby
14
13
  gem "redis-objects"
15
14
 
16
15
  gemspec :path => "../"
@@ -1,15 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
- gem "sqlite3", :platforms => :ruby
4
- gem 'rubysl', :platforms => :rbx
5
- gem 'rubinius-developer_tools', :platforms => :rbx
6
- gem "jruby-openssl", :platforms => :jruby
5
+ gem "sqlite3", :platforms => :ruby
7
6
  gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
8
- gem "mime-types", "~> 2" if Gem::Version.create(RUBY_VERSION.dup) <= Gem::Version.create('1.9.3')
9
7
  gem "rails", "4.2.5"
10
- gem 'mongoid', '~>4.0' if Gem::Version.create(RUBY_VERSION.dup) >= Gem::Version.create('1.9.3')
11
- gem 'sequel'
12
- gem 'dynamoid', '~> 1', :platforms => :ruby
13
- gem 'aws-sdk', '~>2', :platforms => :ruby
8
+ gem "nokogiri", "1.6.8.1", :platforms => [:ruby_19]
9
+ gem "mime-types", "~> 2", :platforms => [:ruby_19, :jruby]
10
+ gem "mongoid", "~>4.0"
11
+ gem "sequel"
12
+ gem "dynamoid", "~> 1", :platforms => :ruby
13
+ gem "aws-sdk", "~>2", :platforms => :ruby
14
14
 
15
15
  gemspec :path => "../"