state_machine 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. data/.gitignore +7 -11
  2. data/.travis.yml +49 -7
  3. data/Appraisals +255 -87
  4. data/CHANGELOG.md +30 -0
  5. data/README.md +142 -21
  6. data/Rakefile +1 -11
  7. data/examples/Gemfile +5 -0
  8. data/examples/Gemfile.lock +14 -0
  9. data/examples/auto_shop.rb +2 -0
  10. data/examples/car.rb +2 -0
  11. data/examples/doc/AutoShop.html +2856 -0
  12. data/examples/doc/AutoShop_state.png +0 -0
  13. data/examples/doc/Car.html +919 -0
  14. data/examples/doc/Car_state.png +0 -0
  15. data/examples/doc/TrafficLight.html +2230 -0
  16. data/examples/doc/TrafficLight_state.png +0 -0
  17. data/examples/doc/Vehicle.html +7921 -0
  18. data/examples/doc/Vehicle_state.png +0 -0
  19. data/examples/doc/_index.html +136 -0
  20. data/examples/doc/class_list.html +47 -0
  21. data/examples/doc/css/common.css +1 -0
  22. data/examples/doc/css/full_list.css +55 -0
  23. data/examples/doc/css/style.css +322 -0
  24. data/examples/doc/file_list.html +46 -0
  25. data/examples/doc/frames.html +13 -0
  26. data/examples/doc/index.html +136 -0
  27. data/examples/doc/js/app.js +205 -0
  28. data/examples/doc/js/full_list.js +173 -0
  29. data/examples/doc/js/jquery.js +16 -0
  30. data/examples/doc/method_list.html +734 -0
  31. data/examples/doc/top-level-namespace.html +105 -0
  32. data/examples/rails-rest/migration.rb +1 -5
  33. data/examples/rails-rest/view__form.html.erb +34 -0
  34. data/examples/rails-rest/view_edit.html.erb +2 -21
  35. data/examples/rails-rest/view_index.html.erb +6 -4
  36. data/examples/rails-rest/view_new.html.erb +2 -11
  37. data/examples/rails-rest/view_show.html.erb +5 -3
  38. data/examples/traffic_light.rb +2 -0
  39. data/examples/vehicle.rb +2 -0
  40. data/gemfiles/active_model-3.0.0.gemfile.lock +9 -6
  41. data/gemfiles/active_model-3.0.5.gemfile.lock +10 -7
  42. data/gemfiles/active_model-3.1.1.gemfile.lock +12 -10
  43. data/gemfiles/{active_model-3.2.0.gemfile → active_model-3.2.1.gemfile} +1 -1
  44. data/gemfiles/{graphviz-0.9.0.gemfile → active_model-3.2.12.gemfile} +1 -1
  45. data/gemfiles/active_model-3.2.12.gemfile.lock +36 -0
  46. data/gemfiles/{active_record-3.2.0.gemfile → active_model-3.2.13.rc1.gemfile} +1 -2
  47. data/gemfiles/active_model-3.2.13.rc1.gemfile.lock +36 -0
  48. data/gemfiles/active_model-4.0.0.gemfile +9 -0
  49. data/gemfiles/active_model-4.0.0.gemfile.lock +78 -0
  50. data/gemfiles/active_record-2.0.0.gemfile +2 -1
  51. data/gemfiles/active_record-2.0.0.gemfile.lock +15 -6
  52. data/gemfiles/active_record-2.0.5.gemfile +2 -1
  53. data/gemfiles/active_record-2.0.5.gemfile.lock +15 -6
  54. data/gemfiles/active_record-2.1.0.gemfile +2 -1
  55. data/gemfiles/active_record-2.1.0.gemfile.lock +15 -6
  56. data/gemfiles/active_record-2.1.2.gemfile +2 -1
  57. data/gemfiles/active_record-2.1.2.gemfile.lock +15 -6
  58. data/gemfiles/active_record-2.2.3.gemfile +2 -1
  59. data/gemfiles/active_record-2.2.3.gemfile.lock +15 -6
  60. data/gemfiles/active_record-2.3.12.gemfile +2 -1
  61. data/gemfiles/active_record-2.3.12.gemfile.lock +15 -6
  62. data/gemfiles/active_record-2.3.5.gemfile +9 -0
  63. data/gemfiles/active_record-2.3.5.gemfile.lock +39 -0
  64. data/gemfiles/active_record-3.0.0.gemfile +2 -1
  65. data/gemfiles/active_record-3.0.0.gemfile.lock +18 -11
  66. data/gemfiles/active_record-3.0.5.gemfile +2 -1
  67. data/gemfiles/active_record-3.0.5.gemfile.lock +19 -12
  68. data/gemfiles/active_record-3.1.1.gemfile +2 -1
  69. data/gemfiles/active_record-3.1.1.gemfile.lock +22 -16
  70. data/gemfiles/active_record-3.2.12.gemfile +9 -0
  71. data/gemfiles/active_record-3.2.12.gemfile.lock +51 -0
  72. data/gemfiles/active_record-3.2.13.rc1.gemfile +9 -0
  73. data/gemfiles/active_record-3.2.13.rc1.gemfile.lock +51 -0
  74. data/gemfiles/active_record-4.0.0.gemfile +11 -0
  75. data/gemfiles/active_record-4.0.0.gemfile.lock +83 -0
  76. data/gemfiles/data_mapper-0.10.2.gemfile +1 -0
  77. data/gemfiles/data_mapper-0.10.2.gemfile.lock +13 -9
  78. data/gemfiles/data_mapper-0.9.11.gemfile +1 -0
  79. data/gemfiles/data_mapper-0.9.11.gemfile.lock +31 -7
  80. data/gemfiles/data_mapper-0.9.4.gemfile.lock +25 -14
  81. data/gemfiles/data_mapper-0.9.7.gemfile +1 -0
  82. data/gemfiles/data_mapper-0.9.7.gemfile.lock +27 -15
  83. data/gemfiles/data_mapper-1.0.0.gemfile.lock +20 -17
  84. data/gemfiles/data_mapper-1.0.1.gemfile.lock +20 -17
  85. data/gemfiles/data_mapper-1.0.2.gemfile.lock +20 -17
  86. data/gemfiles/data_mapper-1.1.0.gemfile.lock +19 -16
  87. data/gemfiles/data_mapper-1.2.0.gemfile.lock +19 -16
  88. data/gemfiles/default.gemfile.lock +8 -5
  89. data/gemfiles/graphviz-0.9.17.gemfile +7 -0
  90. data/gemfiles/graphviz-0.9.17.gemfile.lock +29 -0
  91. data/gemfiles/graphviz-0.9.21.gemfile.lock +7 -4
  92. data/gemfiles/graphviz-1.0.0.gemfile.lock +7 -4
  93. data/gemfiles/graphviz-1.0.3.gemfile +7 -0
  94. data/gemfiles/graphviz-1.0.3.gemfile.lock +29 -0
  95. data/gemfiles/graphviz-1.0.8.gemfile +7 -0
  96. data/gemfiles/graphviz-1.0.8.gemfile.lock +29 -0
  97. data/gemfiles/mongo_mapper-0.10.0.gemfile +1 -0
  98. data/gemfiles/mongo_mapper-0.10.0.gemfile.lock +14 -11
  99. data/gemfiles/mongo_mapper-0.11.1.gemfile +7 -0
  100. data/gemfiles/mongo_mapper-0.11.1.gemfile.lock +44 -0
  101. data/gemfiles/mongo_mapper-0.11.2.gemfile +9 -0
  102. data/gemfiles/mongo_mapper-0.11.2.gemfile.lock +48 -0
  103. data/gemfiles/mongo_mapper-0.12.0.gemfile +9 -0
  104. data/gemfiles/mongo_mapper-0.12.0.gemfile.lock +48 -0
  105. data/gemfiles/mongo_mapper-0.5.5.gemfile.lock +7 -4
  106. data/gemfiles/mongo_mapper-0.5.8.gemfile.lock +7 -4
  107. data/gemfiles/mongo_mapper-0.6.0.gemfile.lock +7 -4
  108. data/gemfiles/mongo_mapper-0.6.10.gemfile.lock +7 -4
  109. data/gemfiles/mongo_mapper-0.7.0.gemfile.lock +7 -4
  110. data/gemfiles/mongo_mapper-0.7.5.gemfile.lock +7 -4
  111. data/gemfiles/mongo_mapper-0.8.0.gemfile.lock +7 -4
  112. data/gemfiles/mongo_mapper-0.8.3.gemfile.lock +7 -4
  113. data/gemfiles/mongo_mapper-0.8.4.gemfile.lock +7 -4
  114. data/gemfiles/mongo_mapper-0.8.6.gemfile.lock +7 -4
  115. data/gemfiles/mongo_mapper-0.9.0.gemfile.lock +7 -4
  116. data/gemfiles/mongoid-2.0.0.gemfile +2 -0
  117. data/gemfiles/mongoid-2.0.0.gemfile.lock +22 -18
  118. data/gemfiles/mongoid-2.1.4.gemfile +2 -0
  119. data/gemfiles/mongoid-2.1.4.gemfile.lock +21 -17
  120. data/gemfiles/mongoid-2.2.4.gemfile +2 -0
  121. data/gemfiles/mongoid-2.2.4.gemfile.lock +21 -17
  122. data/gemfiles/mongoid-2.3.3.gemfile +2 -0
  123. data/gemfiles/mongoid-2.3.3.gemfile.lock +21 -17
  124. data/gemfiles/mongoid-2.4.0.gemfile +9 -0
  125. data/gemfiles/mongoid-2.4.0.gemfile.lock +47 -0
  126. data/gemfiles/mongoid-2.4.10.gemfile +9 -0
  127. data/gemfiles/mongoid-2.4.10.gemfile.lock +47 -0
  128. data/gemfiles/mongoid-2.5.2.gemfile +9 -0
  129. data/gemfiles/mongoid-2.5.2.gemfile.lock +47 -0
  130. data/gemfiles/mongoid-2.6.0.gemfile +9 -0
  131. data/gemfiles/mongoid-2.6.0.gemfile.lock +47 -0
  132. data/gemfiles/mongoid-3.0.0.gemfile +8 -0
  133. data/gemfiles/mongoid-3.0.0.gemfile.lock +45 -0
  134. data/gemfiles/mongoid-3.0.22.gemfile +8 -0
  135. data/gemfiles/mongoid-3.0.22.gemfile.lock +45 -0
  136. data/gemfiles/mongoid-3.1.0.gemfile +8 -0
  137. data/gemfiles/mongoid-3.1.0.gemfile.lock +45 -0
  138. data/gemfiles/sequel-2.11.0.gemfile +2 -1
  139. data/gemfiles/sequel-2.11.0.gemfile.lock +11 -6
  140. data/gemfiles/sequel-2.12.0.gemfile +2 -1
  141. data/gemfiles/sequel-2.12.0.gemfile.lock +11 -6
  142. data/gemfiles/sequel-2.8.0.gemfile +2 -1
  143. data/gemfiles/sequel-2.8.0.gemfile.lock +11 -6
  144. data/gemfiles/sequel-3.0.0.gemfile +2 -1
  145. data/gemfiles/sequel-3.0.0.gemfile.lock +11 -6
  146. data/gemfiles/sequel-3.10.0.gemfile +9 -0
  147. data/gemfiles/sequel-3.10.0.gemfile.lock +33 -0
  148. data/gemfiles/sequel-3.13.0.gemfile +2 -1
  149. data/gemfiles/sequel-3.13.0.gemfile.lock +11 -6
  150. data/gemfiles/sequel-3.14.0.gemfile +2 -1
  151. data/gemfiles/sequel-3.14.0.gemfile.lock +11 -6
  152. data/gemfiles/sequel-3.23.0.gemfile +2 -1
  153. data/gemfiles/sequel-3.23.0.gemfile.lock +11 -6
  154. data/gemfiles/sequel-3.24.0.gemfile +2 -1
  155. data/gemfiles/sequel-3.24.0.gemfile.lock +11 -6
  156. data/gemfiles/sequel-3.29.0.gemfile +2 -1
  157. data/gemfiles/sequel-3.29.0.gemfile.lock +11 -6
  158. data/gemfiles/sequel-3.34.0.gemfile +9 -0
  159. data/gemfiles/sequel-3.34.0.gemfile.lock +33 -0
  160. data/gemfiles/sequel-3.35.0.gemfile +9 -0
  161. data/gemfiles/sequel-3.35.0.gemfile.lock +33 -0
  162. data/gemfiles/sequel-3.4.0.gemfile +9 -0
  163. data/gemfiles/sequel-3.4.0.gemfile.lock +33 -0
  164. data/gemfiles/sequel-3.44.0.gemfile +9 -0
  165. data/gemfiles/sequel-3.44.0.gemfile.lock +33 -0
  166. data/lib/state_machine.rb +6 -0
  167. data/lib/state_machine/branch.rb +9 -8
  168. data/lib/state_machine/callback.rb +2 -2
  169. data/lib/state_machine/core.rb +10 -0
  170. data/lib/state_machine/core_ext.rb +1 -0
  171. data/lib/state_machine/eval_helpers.rb +5 -3
  172. data/lib/state_machine/event.rb +17 -6
  173. data/lib/state_machine/graph.rb +92 -0
  174. data/lib/state_machine/integrations.rb +13 -1
  175. data/lib/state_machine/integrations/active_model.rb +14 -20
  176. data/lib/state_machine/integrations/active_model/observer.rb +3 -3
  177. data/lib/state_machine/integrations/active_model/observer_update.rb +42 -0
  178. data/lib/state_machine/integrations/active_record.rb +52 -25
  179. data/lib/state_machine/integrations/active_record/locale.rb +1 -1
  180. data/lib/state_machine/integrations/active_record/versions.rb +1 -17
  181. data/lib/state_machine/integrations/base.rb +15 -6
  182. data/lib/state_machine/integrations/data_mapper.rb +98 -35
  183. data/lib/state_machine/integrations/data_mapper/versions.rb +46 -8
  184. data/lib/state_machine/integrations/mongo_mapper.rb +39 -12
  185. data/lib/state_machine/integrations/mongo_mapper/locale.rb +1 -1
  186. data/lib/state_machine/integrations/mongo_mapper/versions.rb +3 -20
  187. data/lib/state_machine/integrations/mongoid.rb +52 -14
  188. data/lib/state_machine/integrations/mongoid/locale.rb +1 -1
  189. data/lib/state_machine/integrations/mongoid/versions.rb +52 -26
  190. data/lib/state_machine/integrations/sequel.rb +82 -33
  191. data/lib/state_machine/integrations/sequel/versions.rb +19 -44
  192. data/lib/state_machine/machine.rb +99 -59
  193. data/lib/state_machine/machine_collection.rb +1 -2
  194. data/lib/state_machine/macro_methods.rb +29 -0
  195. data/lib/state_machine/node_collection.rb +1 -1
  196. data/lib/state_machine/state.rb +18 -10
  197. data/lib/state_machine/state_context.rb +2 -2
  198. data/lib/state_machine/transition.rb +8 -1
  199. data/lib/state_machine/transition_collection.rb +2 -1
  200. data/lib/state_machine/version.rb +1 -1
  201. data/lib/state_machine/yard.rb +8 -0
  202. data/lib/state_machine/yard/handlers.rb +12 -0
  203. data/lib/state_machine/yard/handlers/base.rb +32 -0
  204. data/lib/state_machine/yard/handlers/event.rb +25 -0
  205. data/lib/state_machine/yard/handlers/machine.rb +344 -0
  206. data/lib/state_machine/yard/handlers/state.rb +25 -0
  207. data/lib/state_machine/yard/handlers/transition.rb +47 -0
  208. data/lib/state_machine/yard/templates.rb +3 -0
  209. data/lib/state_machine/yard/templates/default/class/html/setup.rb +30 -0
  210. data/lib/state_machine/yard/templates/default/class/html/state_machines.erb +12 -0
  211. data/lib/tasks/state_machine.rb +2 -1
  212. data/lib/yard-state_machine.rb +2 -0
  213. data/state_machine.gemspec +4 -3
  214. data/test/files/switch.rb +4 -0
  215. data/test/test_helper.rb +5 -0
  216. data/test/unit/branch_test.rb +117 -36
  217. data/test/unit/callback_test.rb +5 -2
  218. data/test/unit/eval_helpers_test.rb +49 -1
  219. data/test/unit/event_collection_test.rb +3 -1
  220. data/test/unit/event_test.rb +182 -12
  221. data/test/unit/graph_test.rb +98 -0
  222. data/test/unit/integrations/active_model_test.rb +82 -12
  223. data/test/unit/integrations/active_record_test.rb +393 -37
  224. data/test/unit/integrations/base_test.rb +7 -2
  225. data/test/unit/integrations/data_mapper_test.rb +326 -72
  226. data/test/unit/integrations/mongo_mapper_test.rb +338 -44
  227. data/test/unit/integrations/mongoid_test.rb +606 -98
  228. data/test/unit/integrations/sequel_test.rb +429 -102
  229. data/test/unit/integrations_test.rb +28 -6
  230. data/test/unit/machine_collection_test.rb +6 -2
  231. data/test/unit/machine_test.rb +134 -82
  232. data/test/unit/node_collection_test.rb +2 -2
  233. data/test/unit/path_test.rb +1 -1
  234. data/test/unit/state_test.rb +65 -21
  235. data/test/unit/transition_collection_test.rb +43 -23
  236. data/test/unit/transition_test.rb +8 -2
  237. metadata +303 -221
  238. data/gemfiles/active_model-3.2.0.gemfile.lock +0 -32
  239. data/gemfiles/active_record-3.2.0.gemfile.lock +0 -43
  240. data/gemfiles/graphviz-0.9.0.gemfile.lock +0 -26
data/.gitignore CHANGED
@@ -1,12 +1,8 @@
1
1
  *.gem
2
- .bundle
3
- .yardoc
4
- coverage
5
- doc
6
- pkg
7
- rdoc
8
- test/active_record.log
9
- test/data_mapper.log
10
- test/mongo_mapper.log
11
- test/sequel.log
12
- Gemfile.lock
2
+ .bundle/
3
+ .rbx/
4
+ .yardoc/
5
+ coverage/
6
+ /doc/
7
+ test/*.log
8
+ /Gemfile.lock
@@ -1,9 +1,13 @@
1
+ language: ruby
1
2
  script: "bundle exec rake appraisal:integration test"
2
3
  rvm:
3
4
  - 1.8.7
4
5
  - 1.9.2
5
6
  - 1.9.3
6
- - jruby
7
+ - jruby-18mode
8
+ - jruby-19mode
9
+ - rbx-18mode
10
+ - rbx-19mode
7
11
  env:
8
12
  - INTEGRATION=default
9
13
  - INTEGRATION=active_model
@@ -12,19 +16,57 @@ env:
12
16
  - INTEGRATION=mongoid
13
17
  - INTEGRATION=mongo_mapper
14
18
  - INTEGRATION=sequel
19
+ services:
20
+ - mongodb
15
21
  notifications:
16
22
  disabled: true
17
23
  matrix:
18
24
  exclude:
19
- - rvm: jruby
25
+ - rvm: jruby-18mode
20
26
  env: INTEGRATION=active_model
21
- - rvm: jruby
27
+ - rvm: jruby-18mode
22
28
  env: INTEGRATION=active_record
23
- - rvm: jruby
29
+ - rvm: jruby-18mode
24
30
  env: INTEGRATION=data_mapper
25
- - rvm: jruby
31
+ - rvm: jruby-18mode
26
32
  env: INTEGRATION=mongoid
27
- - rvm: jruby
33
+ - rvm: jruby-18mode
28
34
  env: INTEGRATION=mongo_mapper
29
- - rvm: jruby
35
+ - rvm: jruby-18mode
36
+ env: INTEGRATION=sequel
37
+ - rvm: jruby-19mode
38
+ env: INTEGRATION=active_model
39
+ - rvm: jruby-19mode
40
+ env: INTEGRATION=active_record
41
+ - rvm: jruby-19mode
42
+ env: INTEGRATION=data_mapper
43
+ - rvm: jruby-19mode
44
+ env: INTEGRATION=mongoid
45
+ - rvm: jruby-19mode
46
+ env: INTEGRATION=mongo_mapper
47
+ - rvm: jruby-19mode
48
+ env: INTEGRATION=sequel
49
+ - rvm: rbx-18mode
50
+ env: INTEGRATION=active_model
51
+ - rvm: rbx-18mode
52
+ env: INTEGRATION=active_record
53
+ - rvm: rbx-18mode
54
+ env: INTEGRATION=data_mapper
55
+ - rvm: rbx-18mode
56
+ env: INTEGRATION=mongoid
57
+ - rvm: rbx-18mode
58
+ env: INTEGRATION=mongo_mapper
59
+ - rvm: rbx-18mode
60
+ env: INTEGRATION=sequel
61
+ - rvm: rbx-19mode
62
+ env: INTEGRATION=active_model
63
+ - rvm: rbx-19mode
64
+ env: INTEGRATION=active_record
65
+ - rvm: rbx-19mode
66
+ env: INTEGRATION=data_mapper
67
+ - rvm: rbx-19mode
68
+ env: INTEGRATION=mongoid
69
+ - rvm: rbx-19mode
70
+ env: INTEGRATION=mongo_mapper
71
+ - rvm: rbx-19mode
30
72
  env: INTEGRATION=sequel
data/Appraisals CHANGED
@@ -2,10 +2,8 @@ appraise "default" do
2
2
  end
3
3
 
4
4
  # GraphViz
5
- if RUBY_VERSION < "1.9.1"
6
- appraise "graphviz-0.9.0" do
7
- gem "ruby-graphviz", "0.9.0"
8
- end
5
+ appraise "graphviz-0.9.17" do
6
+ gem "ruby-graphviz", "0.9.17"
9
7
  end
10
8
 
11
9
  appraise "graphviz-0.9.21" do
@@ -16,63 +14,113 @@ appraise "graphviz-1.0.0" do
16
14
  gem "ruby-graphviz", "1.0.0"
17
15
  end
18
16
 
17
+ appraise "graphviz-1.0.3" do
18
+ gem "ruby-graphviz", "1.0.3"
19
+ end
20
+
21
+ appraise "graphviz-1.0.8" do
22
+ gem "ruby-graphviz", "1.0.8"
23
+ end
24
+
19
25
  # ActiveRecord integrations
20
26
  if RUBY_VERSION < "1.9.1"
21
27
  appraise "active_record-2.0.0" do
22
- gem "sqlite3-ruby", "1.3.1"
28
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
23
29
  gem "activerecord", "2.0.0"
30
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
24
31
  end
25
32
 
26
33
  appraise "active_record-2.0.5" do
27
- gem "sqlite3-ruby", "1.3.1"
34
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
28
35
  gem "activerecord", "2.0.5"
36
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
29
37
  end
30
38
 
31
39
  appraise "active_record-2.1.0" do
32
- gem "sqlite3-ruby", "1.3.1"
40
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
33
41
  gem "activerecord", "2.1.0"
42
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
34
43
  end
35
44
 
36
45
  appraise "active_record-2.1.2" do
37
- gem "sqlite3-ruby", "1.3.1"
46
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
38
47
  gem "activerecord", "2.1.2"
48
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
39
49
  end
40
50
 
41
51
  appraise "active_record-2.2.3" do
42
- gem "sqlite3-ruby", "1.3.1"
52
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
43
53
  gem "activerecord", "2.2.3"
54
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
44
55
  end
45
56
  end
46
57
 
47
- appraise "active_record-2.3.12" do
48
- gem "sqlite3-ruby", "1.3.1"
49
- gem "activerecord", "2.3.12"
58
+ if RUBY_VERSION < "1.9.2"
59
+ appraise "active_record-2.3.5" do
60
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
61
+ gem "activerecord", "2.3.5"
62
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
63
+ end
50
64
  end
51
65
 
52
- if RUBY_VERSION > "1.8.6"
66
+ if RUBY_VERSION < "2.0.0"
67
+ appraise "active_record-2.3.12" do
68
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
69
+ gem "activerecord", "2.3.12"
70
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
71
+ end
72
+ end
73
+
74
+ if RUBY_VERSION > "1.8.6" && RUBY_PLATFORM != "java"
53
75
  appraise "active_record-3.0.0" do
54
- gem "sqlite3-ruby"
76
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
55
77
  gem "activerecord", "3.0.0"
78
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
56
79
  end
80
+ end
57
81
 
82
+ if RUBY_VERSION > "1.8.6"
58
83
  appraise "active_record-3.0.5" do
59
- gem "sqlite3-ruby"
84
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
60
85
  gem "activerecord", "3.0.5"
86
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
61
87
  end
88
+ end
62
89
 
90
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION != "1.9.1" && RUBY_VERSION < "2.0.0"
63
91
  appraise "active_record-3.1.1" do
64
- gem "sqlite3-ruby"
92
+ gem "sqlite3", "1.3.6", :platform => [:ruby, :mswin, :mingw]
65
93
  gem "activerecord", "3.1.1"
94
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
66
95
  end
67
96
 
68
- appraise "active_record-3.2.0" do
69
- gem "sqlite3-ruby"
70
- gem "activerecord", "3.2.0"
97
+ appraise "active_record-3.2.12" do
98
+ gem "sqlite3", "1.3.6", :platform => [:ruby, :mswin, :mingw]
99
+ gem "activerecord", "3.2.12"
100
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
101
+ end
102
+ end
103
+
104
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION != "1.9.1"
105
+ appraise "active_record-3.2.13.rc1" do
106
+ gem "sqlite3", "1.3.6", :platform => [:ruby, :mswin, :mingw]
107
+ gem "activerecord", "3.2.13.rc1"
108
+ gem "activerecord-jdbcsqlite3-adapter", "1.2.7", :platform => :jruby
109
+ end
110
+ end
111
+
112
+ if RUBY_VERSION > "1.9.2"
113
+ appraise "active_record-4.0.0" do
114
+ gem "sqlite3", "1.3.6"
115
+ gem "activerecord", "4.0.0.beta1", :git => "git://github.com/rails/rails.git", :ref => "92d6dac"
116
+ gem "activerecord-deprecated_finders", "0.0.3"
117
+ gem "protected_attributes", "1.0.0"
118
+ gem "rails-observers", "0.1.1"
71
119
  end
72
120
  end
73
121
 
74
122
  # ActiveModel integrations
75
- if RUBY_VERSION > "1.8.6"
123
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "2.0.0"
76
124
  appraise "active_model-3.0.0" do
77
125
  gem "activemodel", "3.0.0"
78
126
  end
@@ -85,8 +133,22 @@ if RUBY_VERSION > "1.8.6"
85
133
  gem "activemodel", "3.1.1"
86
134
  end
87
135
 
88
- appraise "active_model-3.2.0" do
89
- gem "activemodel", "3.2.0"
136
+ appraise "active_model-3.2.12" do
137
+ gem "activemodel", "3.2.12"
138
+ end
139
+ end
140
+
141
+ if RUBY_VERSION > "1.8.6"
142
+ appraise "active_model-3.2.13.rc1" do
143
+ gem "activemodel", "3.2.13.rc1"
144
+ end
145
+ end
146
+
147
+ if RUBY_VERSION > "1.9.2"
148
+ appraise "active_model-4.0.0" do
149
+ gem "activemodel", "4.0.0.beta", :git => "git://github.com/rails/rails.git", :ref => "4e286bf"
150
+ gem "rails-observers", "0.1.1"
151
+ gem "protected_attributes", "1.0.0"
90
152
  end
91
153
  end
92
154
 
@@ -98,7 +160,7 @@ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "1.9.1"
98
160
  end
99
161
  end
100
162
 
101
- if RUBY_VERSION > "1.8.6"
163
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "2.0.0"
102
164
  appraise "mongo_mapper-0.5.8" do
103
165
  gem "activesupport", "2.3.11"
104
166
  gem "mongo_mapper", "0.5.8"
@@ -118,7 +180,9 @@ if RUBY_VERSION > "1.8.6"
118
180
  gem "activesupport", "2.3.11"
119
181
  gem "mongo_mapper", "0.7.0"
120
182
  end
183
+ end
121
184
 
185
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "2.0.0" && (!defined?(RUBY_ENGINE) || RUBY_ENGINE != 'rbx')
122
186
  appraise "mongo_mapper-0.7.5" do
123
187
  gem "activesupport", "2.3.11"
124
188
  gem "mongo_mapper", "0.7.5"
@@ -137,7 +201,9 @@ if RUBY_VERSION > "1.8.6"
137
201
  gem "plucky", "0.3.3"
138
202
  gem "mongo_mapper", "0.8.3"
139
203
  end
204
+ end
140
205
 
206
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "2.0.0"
141
207
  appraise "mongo_mapper-0.8.4" do
142
208
  gem "activesupport", "2.3.11"
143
209
  gem "mongo_mapper", "0.8.4"
@@ -147,107 +213,216 @@ if RUBY_VERSION > "1.8.6"
147
213
  gem "activesupport", "2.3.11"
148
214
  gem "mongo_mapper", "0.8.6"
149
215
  end
216
+ end
150
217
 
151
- # MongoMapper 0.9.0+ breaks on Ruby 1.9.1
152
- if RUBY_VERSION != "1.9.1"
153
- appraise "mongo_mapper-0.9.0" do
154
- gem "mongo_mapper", "0.9.0"
155
- end
156
-
157
- appraise "mongo_mapper-0.10.0" do
158
- gem "mongo_mapper", "0.10.0"
159
- end
218
+ # MongoMapper 0.9.0+ breaks on Ruby 1.9.1
219
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION != "1.9.1" && RUBY_VERSION < "2.0.0"
220
+ appraise "mongo_mapper-0.9.0" do
221
+ gem "mongo_mapper", "0.9.0"
160
222
  end
161
223
  end
224
+
225
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION != "1.9.1"
226
+ appraise "mongo_mapper-0.10.0" do
227
+ gem "activemodel", "3.2.13.rc1"
228
+ gem "mongo_mapper", "0.10.0"
229
+ end
230
+
231
+ appraise "mongo_mapper-0.11.2" do
232
+ gem "activemodel", "3.2.13.rc1"
233
+ gem "mongo", "~> 1.7.0"
234
+ gem "mongo_mapper", "0.11.2"
235
+ end
162
236
 
237
+ appraise "mongo_mapper-0.12.0" do
238
+ gem "activemodel", "3.2.13.rc1"
239
+ gem "mongo", "~> 1.7.0"
240
+ gem "mongo_mapper", "0.12.0"
241
+ end
242
+ end
243
+
163
244
  # Mongoid integrations
164
- if RUBY_VERSION > "1.8.6"
245
+ if RUBY_VERSION > "1.8.6" && RUBY_VERSION < "2.0.0"
165
246
  appraise "mongoid-2.0.0" do
247
+ gem "activemodel", "~> 3.1.0"
248
+ gem "mongo", "~> 1.7.0"
166
249
  gem "mongoid", "2.0.0"
167
250
  end
168
251
 
169
252
  appraise "mongoid-2.1.4" do
253
+ gem "activemodel", "~> 3.1.0"
254
+ gem "mongo", "~> 1.7.0"
170
255
  gem "mongoid", "2.1.4"
171
256
  end
172
257
 
173
258
  appraise "mongoid-2.2.4" do
259
+ gem "activemodel", "~> 3.1.0"
260
+ gem "mongo", "~> 1.7.0"
174
261
  gem "mongoid", "2.2.4"
175
262
  end
176
263
 
177
264
  appraise "mongoid-2.3.3" do
265
+ gem "activemodel", "~> 3.1.0"
266
+ gem "mongo", "~> 1.7.0"
178
267
  gem "mongoid", "2.3.3"
179
268
  end
180
269
  end
181
270
 
182
- # Sequel integrations
183
- appraise "sequel-2.8.0" do
184
- gem "sqlite3-ruby", "1.3.1"
185
- gem "sequel", "2.8.0"
271
+ if RUBY_VERSION > "1.8.6"
272
+ appraise "mongoid-2.4.0" do
273
+ gem "activemodel", "3.2.13.rc1"
274
+ gem "mongo", "~> 1.7.0"
275
+ gem "mongoid", "2.4.0"
276
+ end
277
+
278
+ appraise "mongoid-2.4.10" do
279
+ gem "activemodel", "3.2.13.rc1"
280
+ gem "mongo", "~> 1.7.0"
281
+ gem "mongoid", "2.4.10"
282
+ end
283
+
284
+ appraise "mongoid-2.5.2" do
285
+ gem "activemodel", "3.2.13.rc1"
286
+ gem "mongo", "~> 1.7.0"
287
+ gem "mongoid", "2.5.2"
288
+ end
289
+
290
+ appraise "mongoid-2.6.0" do
291
+ gem "activemodel", "3.2.13.rc1"
292
+ gem "mongo", "~> 1.7.0"
293
+ gem "mongoid", "2.6.0"
294
+ end
186
295
  end
187
296
 
188
- appraise "sequel-2.11.0" do
189
- gem "sqlite3-ruby", "1.3.1"
190
- gem "sequel", "2.11.0"
297
+ if RUBY_VERSION > "1.9.2"
298
+ appraise "mongoid-3.0.0" do
299
+ gem "activemodel", "3.2.13.rc1"
300
+ gem "mongoid", "3.0.0"
301
+ end
302
+
303
+ appraise "mongoid-3.0.22" do
304
+ gem "activemodel", "3.2.13.rc1"
305
+ gem "mongoid", "3.0.22"
306
+ end
307
+
308
+ appraise "mongoid-3.1.0" do
309
+ gem "activemodel", "3.2.13.rc1"
310
+ gem "mongoid", "3.1.0"
311
+ end
191
312
  end
192
313
 
193
- appraise "sequel-2.12.0" do
194
- gem "sqlite3-ruby", "1.3.1"
195
- gem "sequel", "2.12.0"
314
+ # Sequel integrations
315
+ if RUBY_VERSION < "1.9.2"
316
+ appraise "sequel-2.8.0" do
317
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
318
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
319
+ gem "sequel", "2.8.0"
320
+ end
321
+
322
+ appraise "sequel-2.11.0" do
323
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
324
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
325
+ gem "sequel", "2.11.0"
326
+ end
327
+
328
+ appraise "sequel-2.12.0" do
329
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
330
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
331
+ gem "sequel", "2.12.0"
332
+ end
333
+
334
+ appraise "sequel-3.0.0" do
335
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
336
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
337
+ gem "sequel", "3.0.0"
338
+ end
339
+
340
+ appraise "sequel-3.4.0" do
341
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
342
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
343
+ gem "sequel", "3.4.0"
344
+ end
196
345
  end
197
346
 
198
- appraise "sequel-3.0.0" do
199
- gem "sqlite3-ruby", "1.3.1"
200
- gem "sequel", "3.0.0"
347
+ appraise "sequel-3.10.0" do
348
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
349
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
350
+ gem "sequel", "3.10.0"
201
351
  end
202
352
 
203
353
  appraise "sequel-3.13.0" do
204
- gem "sqlite3-ruby", "1.3.1"
354
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
355
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
205
356
  gem "sequel", "3.13.0"
206
357
  end
207
358
 
208
359
  appraise "sequel-3.14.0" do
209
- gem "sqlite3-ruby", "1.3.1"
360
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
361
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
210
362
  gem "sequel", "3.14.0"
211
363
  end
212
364
 
213
365
  appraise "sequel-3.23.0" do
214
- gem "sqlite3-ruby", "1.3.1"
366
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
367
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
215
368
  gem "sequel", "3.23.0"
216
369
  end
217
370
 
218
371
  appraise "sequel-3.24.0" do
219
- gem "sqlite3-ruby", "1.3.1"
372
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
373
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
220
374
  gem "sequel", "3.24.0"
221
375
  end
222
376
 
223
377
  appraise "sequel-3.29.0" do
224
- gem "sqlite3-ruby", "1.3.1"
378
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
379
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
225
380
  gem "sequel", "3.29.0"
226
381
  end
227
382
 
228
- # DataMapper
229
- if RUBY_VERSION < "1.9.1"
230
- if RUBY_PLATFORM != 'java'
231
- appraise "data_mapper-0.9.4" do
232
- gem "dm-core", "0.9.4"
233
- gem "dm-migrations", "0.9.4"
234
- gem "dm-validations", "0.9.4"
235
- gem "dm-observer", "0.9.4"
236
- gem "data_objects", "0.9.4"
237
- gem "do_sqlite3", "0.9.4"
238
- end
383
+ appraise "sequel-3.34.0" do
384
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
385
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
386
+ gem "sequel", "3.34.0"
387
+ end
388
+
389
+ if RUBY_VERSION > "1.8.6"
390
+ appraise "sequel-3.35.0" do
391
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
392
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
393
+ gem "sequel", "3.35.0"
394
+ end
239
395
 
240
- appraise "data_mapper-0.9.7" do
241
- gem "dm-core", "0.9.7"
242
- gem "dm-migrations", "0.9.7"
243
- gem "dm-validations", "0.9.7"
244
- gem "dm-observer", "0.9.7"
245
- gem "data_objects", "0.9.7"
246
- gem "do_sqlite3", "0.9.7"
247
- end
396
+ appraise "sequel-3.44.0" do
397
+ gem "sqlite3-ruby", "1.3.1", :platform => [:ruby, :mswin, :mingw]
398
+ gem "jdbc-sqlite3", "3.7.2", :platform => :jruby
399
+ gem "sequel", "3.44.0"
400
+ end
401
+ end
402
+
403
+ # DataMapper
404
+ if RUBY_VERSION < "1.9.1" && RUBY_PLATFORM != 'java' && (!defined?(RUBY_ENGINE) || RUBY_ENGINE != 'rbx')
405
+ appraise "data_mapper-0.9.4" do
406
+ gem "dm-core", "0.9.4"
407
+ gem "dm-migrations", "0.9.4"
408
+ gem "dm-validations", "0.9.4"
409
+ gem "dm-observer", "0.9.4"
410
+ gem "data_objects", "0.9.4"
411
+ gem "do_sqlite3", "0.9.4"
412
+ end
413
+
414
+ appraise "data_mapper-0.9.7" do
415
+ gem "extlib", "0.9.8"
416
+ gem "dm-core", "0.9.7"
417
+ gem "dm-migrations", "0.9.7"
418
+ gem "dm-validations", "0.9.7"
419
+ gem "dm-observer", "0.9.7"
420
+ gem "data_objects", "0.9.7"
421
+ gem "do_sqlite3", "0.9.7"
248
422
  end
249
423
 
250
424
  appraise "data_mapper-0.9.11" do
425
+ gem "extlib", "0.9.11"
251
426
  gem "dm-core", "0.9.11"
252
427
  gem "dm-migrations", "0.9.11"
253
428
  gem "dm-validations", "0.9.11"
@@ -257,15 +432,7 @@ if RUBY_VERSION < "1.9.1"
257
432
  end
258
433
 
259
434
  appraise "data_mapper-0.10.2" do
260
- gem "dm-core", "0.10.2"
261
- gem "dm-migrations", "0.10.2"
262
- gem "dm-validations", "0.10.2"
263
- gem "dm-observer", "0.10.2"
264
- gem "data_objects", "0.10.2"
265
- gem "do_sqlite3", "0.10.2"
266
- end
267
-
268
- appraise "data_mapper-0.10.2" do
435
+ gem "extlib", "0.9.16"
269
436
  gem "dm-core", "0.10.2"
270
437
  gem "dm-migrations", "0.10.2"
271
438
  gem "dm-validations", "0.10.2"
@@ -302,16 +469,17 @@ appraise "data_mapper-1.0.2" do
302
469
  gem "dm-sqlite-adapter", "1.0.2"
303
470
  end
304
471
 
305
- appraise "data_mapper-1.1.0" do
306
- gem "dm-core", "1.1.0"
307
- gem "dm-migrations", "1.1.0"
308
- gem "dm-validations", "1.1.0"
309
- gem "dm-observer", "1.1.0"
310
- gem "dm-transactions", "1.1.0"
311
- gem "dm-sqlite-adapter", "1.1.0"
312
- end
313
472
 
314
473
  if RUBY_VERSION > "1.8.6"
474
+ appraise "data_mapper-1.1.0" do
475
+ gem "dm-core", "1.1.0"
476
+ gem "dm-migrations", "1.1.0"
477
+ gem "dm-validations", "1.1.0"
478
+ gem "dm-observer", "1.1.0"
479
+ gem "dm-transactions", "1.1.0"
480
+ gem "dm-sqlite-adapter", "1.1.0"
481
+ end
482
+
315
483
  appraise "data_mapper-1.2.0" do
316
484
  gem "dm-core", "1.2.0"
317
485
  gem "dm-migrations", "1.2.0"