wagons 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +2 -1
  3. data/Rakefile +20 -17
  4. data/lib/tasks/wagons.rake +1 -1
  5. data/lib/wagons/extensions/migration.rb +20 -7
  6. data/lib/wagons/installer.rb +1 -1
  7. data/lib/wagons/version.rb +1 -1
  8. data/test/ci/rails52.gemfile.lock +77 -81
  9. data/test/ci/rails60.gemfile +11 -0
  10. data/test/ci/rails60.gemfile.lock +164 -0
  11. data/test/ci/rails61.gemfile +11 -0
  12. data/test/ci/rails61.gemfile.lock +167 -0
  13. data/test/dummy/Gemfile +1 -0
  14. data/test/dummy/Gemfile.lock +114 -104
  15. data/test/dummy/config/application.rb +0 -13
  16. data/test/dummy/config/environments/development.rb +0 -5
  17. data/test/dummy/config/environments/production.rb +0 -9
  18. data/test/dummy/db/development.sqlite3 +0 -0
  19. data/test/dummy/db/schema.rb +2 -2
  20. data/test/dummy/db/test.sqlite3 +0 -0
  21. data/test/dummy/log/development.log +391 -0
  22. data/test/dummy/log/test.log +21415 -0
  23. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-H/-HtXnef0HYbCf4IQCm3aqe59wL4bpgzS_yqaHC7iD7I.cache +1 -0
  24. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0w/0w13MOsljskmRGYd7h_dmRxupsbtm1UGG8UKWdpgqxE.cache +1 -0
  25. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1I/1IDB5qr1TR6_Ex6y1wfpAnPPcuGNbDqKAFp-bicMdJw.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1Q/1Q--32pSu0X8tgKnQKviniT1f9fr270Siz7MLazfjY0.cache +1 -0
  27. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1q/1qLm_ssdtiWjLGDfOyEXLBpOpSFyDftrTe-J5A-x0fM.cache +0 -0
  28. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/22/22jeSha1gQut3uUfoP44m3l99L_7N8usml4LS737Q9w.cache +1 -0
  29. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/24/24_tNLrmt-so6UcYfOScWzfJ9eMRN-Vr2TlQdp4rMwc.cache +1 -0
  30. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/2r/2rLBgIivfRbzIntqLcL4qIWdGUayQDXzPX4Zs7z5nyw.cache +0 -0
  31. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3H/3HRYOSvPLUiLY8pL0DrEsH7doLosVFAhNEPYzRJvBJ4.cache +0 -0
  32. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3c/3cK6cxzebN6u3koHiOwekBT0V7sOWJ1fSJi7NNdNm6c.cache +0 -0
  33. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3c/3cq6SBzo29D833trP4SsvTdbQFZVgHc4l1F0H3zSXv4.cache +1 -0
  34. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4H/4HmxH_jTqYtN8qzSD6B1E5zoly7Us6enPW634qmOqhw.cache +1 -0
  35. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5p/5pIt6wS1BhH8MCXj73QMvG-ydW4NYZGwK0LtqRWWijk.cache +0 -0
  36. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/6P/6P5A7JnNeGH2r_6lUbaJbwJjgp52R5WYy9FXdMzAP5M.cache +1 -0
  37. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/6u/6uAmv-3XxnNSicBxCQxV6qa6uf-paBhbcGlMQKVgLfc.cache +1 -0
  38. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/7E/7EF_s-ENUfH9-gY_3l3BqtEvz1eR5lA1RIIXtQrPTfA.cache +0 -0
  39. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8E/8ER8figK9NszHC0GERob9QKvw4FqifCDmXMRFBU8lBY.cache +0 -0
  40. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8a/8aRdJtxvRmSy8nbyfzd_38EOvQDCI6lNv31LaqtpGuQ.cache +1 -0
  41. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9S/9SKoByIXxOhEZpdYEljQDxQO3klZtZo_q0da5mM7AMs.cache +0 -0
  42. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9j/9jqgHrQ7pZsKefNZU7qkNWAuu9doJE34xxfgRxrPZHQ.cache +0 -0
  43. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/AU/AUcrNcDCsowVJZSQHQcQw0Vd2y-bl_JwYlxVV_Fm5u0.cache +1 -0
  44. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/CQ/CQ-eB4eoQoV4KyNA1L69J-e1PJUhh-1afQdrey7YjWo.cache +1 -0
  45. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Db/DbmLC3wtG7ztEvkzmVAubW8vf37XdD0bT3Kh73oed1A.cache +0 -0
  46. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/E_/E_9AuEMLlN8ewb_6kPjLBen7_maGlmUctv0og1oBLHA.cache +0 -0
  47. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ej/EjlPEjuWuoa8ddDFxYmNJcDBJciSdyi7top8aI8Qhi0.cache +0 -0
  48. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Em/Emyq6KCg079U1cAHGJ8ldkvAH0_vjape2X0DuypLkHA.cache +0 -0
  49. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Fk/FkfYCBdaahKiox0qtLhN8JdG8c8kKscddoj1hZFyKss.cache +1 -0
  50. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/GL/GLfgFsH7gYztSz8KqppT6RAF-xlterP4wlPr49DaqY0.cache +0 -0
  51. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Hv/Hv2IxpRjvLKwwO-zzNWLMJSyL2xRH9QRNFGUP-r_PMg.cache +0 -0
  52. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/JC/JCL1JaTAfMuWVygoApJocm0bfiJVcGMUpTlyCbWRcTE.cache +1 -0
  53. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NO/NOvhBx5Ck6mzR9lbTh4oYkFyZuBhW8kL0xq2fXYNZvc.cache +0 -0
  54. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Nx/Nx6PN_fylzZexApM9JmmnNNw-uLk71OfIgJ9zdGNLu4.cache +1 -0
  55. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OR/ORoJxKNF59Ei4Yg_hIlxcVpLhFmKUXQWKpedcRPHqnw.cache +0 -0
  56. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/PH/PHWXANBrMyYy54Iv8E_E-1rVQTumNJ3u7NUIB5BRApA.cache +0 -0
  57. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pc/PcK1T7ShesfXYFQ5W0iDvn5_NCn9mdRY-iKLYmErizs.cache +1 -0
  58. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Q7/Q7XEjIX6hH0eYgyYXzK_eRM0b3cYXuvkR48xX2IbTe4.cache +0 -0
  59. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QM/QMwgAVHjwvL_AddHLU5X3p9JND42X7g7zuNQh4FStEU.cache +1 -0
  60. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QW/QWYLzm_V5roD5W780sxbErySkEfXH9TP6U5wp1kTAsQ.cache +1 -0
  61. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/RY/RYblxQYTWrFsoTHUoRPMM5nsWzp7OdBla5t3WxqCJk4.cache +0 -0
  62. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Rk/RkNi1mU3vLaSmMYTSCSnlwE-9oKy_W3zbtGnebp8giM.cache +0 -0
  63. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Sh/ShZe4Yd3d4ey6lkV51RLsCo0xviOwe17edjrzNs6xKw.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Tg/TgTcVvqf5KTGti25aDSVdPzdEFSzFCA7TIgv36nVcSw.cache +0 -0
  65. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Tt/TtCo1neXEwVGrBDA9g7KFKfHfrw24_xMjrxpTWj6hqU.cache +0 -0
  66. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/V0/V0xH9hW5hqbm6BDG8n6Ax2lqGsz0MfR1iXOxPDDU9J0.cache +0 -0
  67. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/WR/WR6tsay9cs1pVib3TaKDHXbSLwDXgEFi7yI6zAsdIos.cache +1 -0
  68. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/XA/XAHwGWu2FidHKKPWHkXTeqsL616yZD-bj78n2tifQiw.cache +0 -0
  69. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Z1/Z1xiE6AeOFjmwb1QypT0chrrYtEfojQh9xF6dvo15Oc.cache +1 -0
  70. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_Z/_ZGxbIs0pIikJpeITx66Vj5HZlTlwPjBtTIxZY4Llhw.cache +1 -0
  71. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_c/_cATGhGdtRwYqswf2eDhF248i27ZoWhL6JUOJztaDRs.cache +1 -0
  72. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_fALMSlqEIAoEcArNZCH9a0pmK-9extGEC3rN19EE0Q.cache +0 -0
  73. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_m/_mEPYNj4UPh88JyBBGxj9LlOgG2hUfzgmdLqzqBQQBE.cache +1 -0
  74. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aF/aFYi0QN0ocrEJd5NcK0n5oruPgfi0bbV_yoiKJQIRcc.cache +1 -0
  75. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aU/aUji3Ouh9B82G7bYfgs1QcgsrCBmS4-f4ILsN_C_zFw.cache +0 -0
  76. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aY/aYZRIcKNgaTkEdL-ujKXKwqxK2cVyZole5qthnSYTz8.cache +0 -0
  77. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/b7/b7lBpkBxQaCxHBBRf-QF0CiQKnRE8kYGLUzgAPTjf_k.cache +0 -0
  78. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bP/bPNHnuI52miVtJqlBT_g5qG18I0oAHSYE9bI7Ptrofg.cache +0 -0
  79. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bU/bUpMjwfdKLlejY8OWALhTYtESG4S5xUg9LOEryfqsh8.cache +0 -0
  80. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bd/bdrnMYD4qOAIIdZCbT39Wkn2wzabKadpCmgWLT56Lq8.cache +0 -0
  81. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dg/dgjHA3yS-cfHM6U2pIHqfOZ9E-ooNW7JbqArpn5_DSI.cache +1 -0
  82. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/eu/euosPQOlq1xNPPLzxhZKDyWfm75qDMlfXRK5pzbPDk0.cache +1 -0
  83. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/h4/h41FBu5275MRJYh-QtgDJZpvJQ4TD6nnvTv93-yfw8s.cache +1 -0
  84. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ig/ig0NZPffrlU5nyvxScGhp9RbX-ztkRcop-W3z_0GOxg.cache +0 -0
  85. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ix/ixZDJv3nUs5OyxiRdK1zZ7AnmYUHoPTk0uF-f1CZ-IQ.cache +0 -0
  86. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/jv/jvhMb4IFtynnfkP-m13mfrg9gYy4iDEjYnZiK2YBuWg.cache +1 -0
  87. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/l_/l_tJ9WwBL9Q8XjxQN56nGuGtCrP7kGBvE8e76g8tRC0.cache +0 -0
  88. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/m5/m5Zzglx0goFadTvj77IDwqNQpO6-UAKhPq6cpeKq-ks.cache +0 -0
  89. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/mH/mHAhTi2hfFhPk9Q0Q_fl1eh_7Za4SNRUevCoJRLcZb0.cache +1 -0
  90. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/oi/oifW-FoUUBJZovp7spCmtZ2nV0p36Sm-3pdjeOd_MBI.cache +0 -0
  91. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/pg/pg4_Xb9Jpu2-lF5UTFVEdSygm2el9xcJ_PTt5bSXGos.cache +1 -0
  92. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/qP/qP3gEansoZiP9AhSv2BIJUz5hq2qwkMBjj-NJ3Ibdt0.cache +0 -0
  93. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/qY/qYvyX-tPRbBGYCkP1_8f6fthjekc2G7Eq6V_afdgbrY.cache +1 -0
  94. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/rG/rGDKy38JC9huYGZLtA-wiM_C5tv0OChr97sVU-HUesQ.cache +1 -0
  95. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/s9/s9hTotMjw4ddx-wmP0kGle-EXqVg-CaCo1LMpDTZeKQ.cache +1 -0
  96. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/w3/w38rfd6qdVo1aV28n_6tWWrNnwrxR55-kEZc6pyA5zk.cache +1 -0
  97. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wx/wxwvso5wh0QLD0Vwu4VJimRWxLDGYfCaGMOsrLYrLg8.cache +1 -0
  98. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xG/xGMnO4s6f7EDeEia5H8zPU1p-Z-MmsO0Val4gsFgpYk.cache +0 -0
  99. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xR/xRih9fv1y9PmtOktqzUIrowdEqL2bBp6EAxyNIdZ9yw.cache +1 -0
  100. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xT/xTjKotv2c8rw6rRSG5MFPKuThESil_pEyLnT0NMaQ0c.cache +0 -0
  101. data/test/dummy/vendor/wagons/superliner/Gemfile.lock +115 -107
  102. data/test/test_helper.rb +1 -1
  103. metadata +292 -140
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb5c3068da7f326c778f484c01ab545176e1a836bdd1b97e74a5ab8e8c33c8e4
4
- data.tar.gz: d5e835973232338332bedd472dad3cbb20b08c37c56a64d5d7bfe2137dd2a8f0
3
+ metadata.gz: 3d06295f19bd1963830bd47006676c4b25eb2b1e7b30af0f8c2302996b129493
4
+ data.tar.gz: d3c66601cc2869001432ae9877cbd03dfd6a68f9685aa47ab929a3b36023dcef
5
5
  SHA512:
6
- metadata.gz: 7333b065d4dab93c3ff9ef06f7d6ad42af0fa206a0cc49d46bbcdbc373232f22672efb0c00b2355d458a633508c4aad3f661cf9962342fd4fe9f11203821ca0e
7
- data.tar.gz: b20c4fa29ccbed32c5fc629dabd0ccb4156daf50a2a352c3ed120c8ad52235ce8bbd8ca11cb6460c445190b240d755d8918625e454768f93dc9a6be847dbf212
6
+ metadata.gz: bb293faaa5f7639c22dea5b78a98b202936ad6dd5fe6016c7215b81866861c9eb23a81a733e2dffc27ce09d1ebd7459f000a33dd73913e94633a4d0b96ad245a
7
+ data.tar.gz: ac080f11d0a70f91755e510f365a9c36bfec28e2918fd167edf58524f40834c52b0fae01bcb8dd44b1e1bce8ca7abc50bd96e877220ffbd454b80a9e4aaac076
data/README.rdoc CHANGED
@@ -1,6 +1,7 @@
1
1
  = Here Be Wagons
2
2
 
3
- {<img src="https://secure.travis-ci.org/codez/wagons.png" />}[http://travis-ci.org/codez/wagons]
3
+ {<img src="https://github.com/codez/wagons/actions/workflows/build.yml/badge.svg" />}[https://github.com/codez/wagons/actions/workflows/build.yml]
4
+ {<img src="https://api.codeclimate.com/v1/badges/32a0d860544681cf718c/maintainability" />}[https://codeclimate.com/github/codez/wagons/maintainability]
4
5
 
5
6
  Wagons are extensions to your application train running on Rails. You can see them as plugins that
6
7
  extend the behavior of your specific Rails application. This framework makes it easy to create and
data/Rakefile CHANGED
@@ -30,24 +30,8 @@ Rake::TestTask.new(:test) do |test|
30
30
  test.verbose = true
31
31
  end
32
32
 
33
- task :test => :set_rails_version do
34
- def in_dummy(command)
35
- version = "RAILS_VERSION=\"#{ENV['RAILS_VERSION']}\" " if ENV['RAILS_VERSION']
36
- Bundler.with_clean_env { sh "cd test/dummy && #{version}#{command}" }
37
- end
38
-
33
+ task :test => :bundle do
39
34
  begin
40
- in_dummy 'rm -rf Gemfile.lock'
41
- if ENV['ROOT_BUNDLE_PATH'] # used by travis-ci
42
- in_dummy 'mkdir -p .bundle'
43
- in_dummy 'echo "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > .bundle/config'
44
- in_dummy 'cat .bundle/config'
45
- in_dummy 'mkdir -p vendor/wagons/test_wagon/.bundle'
46
- in_dummy 'echo -e "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > vendor/wagons/test_wagon/.bundle/config'
47
- in_dummy 'mkdir -p vendor/wagons/superliner/.bundle'
48
- in_dummy 'echo -e "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > vendor/wagons/superliner/.bundle/config'
49
- end
50
- in_dummy 'bundle'
51
35
  in_dummy 'bundle exec rails g wagon test_wagon'
52
36
  in_dummy 'bundle exec rake wagon:bundle:update'
53
37
  in_dummy "bundle exec rake db:migrate test #{'-t' if Rake.application.options.trace}"
@@ -57,6 +41,20 @@ task :test => :set_rails_version do
57
41
  end
58
42
  end
59
43
 
44
+ task :bundle => :set_rails_version do
45
+ in_dummy 'rm -rf Gemfile.lock'
46
+ if ENV['ROOT_BUNDLE_PATH'] # used by ci
47
+ in_dummy 'mkdir -p .bundle'
48
+ in_dummy 'echo "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > .bundle/config'
49
+ in_dummy 'cat .bundle/config'
50
+ in_dummy 'mkdir -p vendor/wagons/test_wagon/.bundle'
51
+ in_dummy 'echo -e "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > vendor/wagons/test_wagon/.bundle/config'
52
+ in_dummy 'mkdir -p vendor/wagons/superliner/.bundle'
53
+ in_dummy 'echo -e "---\nBUNDLE_PATH: \"$ROOT_BUNDLE_PATH\"\n" > vendor/wagons/superliner/.bundle/config'
54
+ end
55
+ in_dummy 'bundle'
56
+ end
57
+
60
58
  task :set_rails_version do
61
59
  if ENV['BUNDLE_GEMFILE']
62
60
  version = File.read(ENV['BUNDLE_GEMFILE'])[/gem\s*'rails',\s*'(.*)'/, 1]
@@ -65,3 +63,8 @@ task :set_rails_version do
65
63
  end
66
64
 
67
65
  task :default => :test
66
+
67
+ def in_dummy(command)
68
+ version = "RAILS_VERSION=\"#{ENV['RAILS_VERSION']}\" " if ENV['RAILS_VERSION']
69
+ Bundler.with_unbundled_env { sh "cd test/dummy && #{version}#{command}" }
70
+ end
@@ -123,7 +123,7 @@ eval(File.read(wagonfile)) if File.exist?(wagonfile)"
123
123
  puts "\n*** #{w.wagon_name.upcase} ***" if wagons.size > 1
124
124
  rel_dir = w.root.to_s.sub(Rails.root.to_s + File::SEPARATOR, '')
125
125
  cmd = "cd #{rel_dir} && #{ENV['CMD']}"
126
- Bundler.with_clean_env do
126
+ Bundler.with_unbundled_env do
127
127
  verbose(Rake.application.options.trace) { sh cmd }
128
128
  end
129
129
  end
@@ -5,12 +5,12 @@ module ActiveRecord
5
5
  # Extend maintain_test_schema! to include migrations of the current wagon to test
6
6
  # or to make sure no wagon migrations are loaded when testing the main application.
7
7
  def maintain_test_schema_with_wagons!
8
- if Base.maintain_test_schema
9
- # set migrations paths to core only, wagon migrations are loaded separately
10
- Migrator.migrations_paths = Rails.application.paths['db/migrate'].to_a
11
- if app_needs_migration?
12
- suppress_messages { load_wagon_schema! }
13
- end
8
+ return unless maintain_test_schema?
9
+
10
+ # set migrations paths to core only, wagon migrations are loaded separately
11
+ Migrator.migrations_paths = Rails.application.paths['db/migrate'].to_a
12
+ if app_needs_migration?
13
+ suppress_messages { load_wagon_schema! }
14
14
  end
15
15
  end
16
16
  alias maintain_test_schema_without_wagons! maintain_test_schema!
@@ -23,7 +23,12 @@ module ActiveRecord
23
23
 
24
24
  # Contrary to the original rails approach (#load_schema_if_pending!),
25
25
  # purge the database first to get rid of all wagon tables.
26
- config = Base.configurations['test']
26
+ config =
27
+ if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('6.1.0')
28
+ Base.configurations['test']
29
+ else
30
+ Base.configurations.configs_for(env_name: 'test').first
31
+ end
27
32
  Tasks::DatabaseTasks.purge(config)
28
33
 
29
34
  Base.establish_connection(config)
@@ -62,6 +67,14 @@ module ActiveRecord
62
67
  end
63
68
  end
64
69
 
70
+ def maintain_test_schema?
71
+ if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('7.0.0')
72
+ ActiveRecord::Base.maintain_test_schema
73
+ else
74
+ ActiveRecord.maintain_test_schema
75
+ end
76
+ end
77
+
65
78
  end
66
79
  end
67
80
  end
@@ -256,7 +256,7 @@ module Wagons
256
256
  cmd = setup_command(specs)
257
257
  Rails.logger.info(cmd)
258
258
 
259
- Bundler.with_clean_env do
259
+ Bundler.with_unbundled_env do
260
260
  ENV['RAILS_ENV'] = env
261
261
  execute_setup(cmd)
262
262
  end
@@ -1,3 +1,3 @@
1
1
  module Wagons
2
- VERSION = '0.6.1'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -1,138 +1,134 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- wagons (0.5.0)
4
+ wagons (0.6.1)
5
5
  bundler (>= 1.1)
6
- rails (>= 4.2)
6
+ rails (>= 5.2)
7
7
  seed-fu-ndo (>= 0.0.3)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (5.2.3)
13
- actionpack (= 5.2.3)
12
+ actioncable (5.2.8.1)
13
+ actionpack (= 5.2.8.1)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailer (5.2.3)
17
- actionpack (= 5.2.3)
18
- actionview (= 5.2.3)
19
- activejob (= 5.2.3)
16
+ actionmailer (5.2.8.1)
17
+ actionpack (= 5.2.8.1)
18
+ actionview (= 5.2.8.1)
19
+ activejob (= 5.2.8.1)
20
20
  mail (~> 2.5, >= 2.5.4)
21
21
  rails-dom-testing (~> 2.0)
22
- actionpack (5.2.3)
23
- actionview (= 5.2.3)
24
- activesupport (= 5.2.3)
25
- rack (~> 2.0)
22
+ actionpack (5.2.8.1)
23
+ actionview (= 5.2.8.1)
24
+ activesupport (= 5.2.8.1)
25
+ rack (~> 2.0, >= 2.0.8)
26
26
  rack-test (>= 0.6.3)
27
27
  rails-dom-testing (~> 2.0)
28
28
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.3)
30
- activesupport (= 5.2.3)
29
+ actionview (5.2.8.1)
30
+ activesupport (= 5.2.8.1)
31
31
  builder (~> 3.1)
32
32
  erubi (~> 1.4)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.3)
36
- activesupport (= 5.2.3)
35
+ activejob (5.2.8.1)
36
+ activesupport (= 5.2.8.1)
37
37
  globalid (>= 0.3.6)
38
- activemodel (5.2.3)
39
- activesupport (= 5.2.3)
40
- activerecord (5.2.3)
41
- activemodel (= 5.2.3)
42
- activesupport (= 5.2.3)
38
+ activemodel (5.2.8.1)
39
+ activesupport (= 5.2.8.1)
40
+ activerecord (5.2.8.1)
41
+ activemodel (= 5.2.8.1)
42
+ activesupport (= 5.2.8.1)
43
43
  arel (>= 9.0)
44
- activestorage (5.2.3)
45
- actionpack (= 5.2.3)
46
- activerecord (= 5.2.3)
47
- marcel (~> 0.3.1)
48
- activesupport (5.2.3)
44
+ activestorage (5.2.8.1)
45
+ actionpack (= 5.2.8.1)
46
+ activerecord (= 5.2.8.1)
47
+ marcel (~> 1.0.0)
48
+ activesupport (5.2.8.1)
49
49
  concurrent-ruby (~> 1.0, >= 1.0.2)
50
50
  i18n (>= 0.7, < 2)
51
51
  minitest (~> 5.1)
52
52
  tzinfo (~> 1.1)
53
53
  arel (9.0.0)
54
- builder (3.2.3)
55
- concurrent-ruby (1.1.5)
56
- crass (1.0.5)
57
- erubi (1.9.0)
58
- globalid (0.4.2)
59
- activesupport (>= 4.2.0)
60
- i18n (1.7.0)
54
+ builder (3.2.4)
55
+ concurrent-ruby (1.1.10)
56
+ crass (1.0.6)
57
+ erubi (1.11.0)
58
+ globalid (1.0.0)
59
+ activesupport (>= 5.0)
60
+ i18n (1.12.0)
61
61
  concurrent-ruby (~> 1.0)
62
- loofah (2.3.1)
62
+ loofah (2.19.0)
63
63
  crass (~> 1.0.2)
64
64
  nokogiri (>= 1.5.9)
65
65
  mail (2.7.1)
66
66
  mini_mime (>= 0.1.1)
67
- marcel (0.3.3)
68
- mimemagic (~> 0.3.2)
69
- metaclass (0.0.4)
70
- method_source (0.9.2)
71
- mimemagic (0.3.3)
72
- mini_mime (1.0.2)
73
- mini_portile2 (2.4.0)
74
- minitest (5.12.2)
75
- mocha (1.9.0)
76
- metaclass (~> 0.0.1)
77
- nio4r (2.5.2)
78
- nokogiri (1.10.4)
79
- mini_portile2 (~> 2.4.0)
67
+ marcel (1.0.2)
68
+ method_source (1.0.0)
69
+ mini_mime (1.1.2)
70
+ minitest (5.16.3)
71
+ mocha (1.15.0)
72
+ nio4r (2.5.8)
73
+ nokogiri (1.13.8-x86_64-linux)
74
+ racc (~> 1.4)
80
75
  open4 (1.3.4)
81
- rack (2.0.7)
82
- rack-test (1.1.0)
83
- rack (>= 1.0, < 3)
84
- rails (5.2.3)
85
- actioncable (= 5.2.3)
86
- actionmailer (= 5.2.3)
87
- actionpack (= 5.2.3)
88
- actionview (= 5.2.3)
89
- activejob (= 5.2.3)
90
- activemodel (= 5.2.3)
91
- activerecord (= 5.2.3)
92
- activestorage (= 5.2.3)
93
- activesupport (= 5.2.3)
76
+ racc (1.6.0)
77
+ rack (2.2.4)
78
+ rack-test (2.0.2)
79
+ rack (>= 1.3)
80
+ rails (5.2.8.1)
81
+ actioncable (= 5.2.8.1)
82
+ actionmailer (= 5.2.8.1)
83
+ actionpack (= 5.2.8.1)
84
+ actionview (= 5.2.8.1)
85
+ activejob (= 5.2.8.1)
86
+ activemodel (= 5.2.8.1)
87
+ activerecord (= 5.2.8.1)
88
+ activestorage (= 5.2.8.1)
89
+ activesupport (= 5.2.8.1)
94
90
  bundler (>= 1.3.0)
95
- railties (= 5.2.3)
91
+ railties (= 5.2.8.1)
96
92
  sprockets-rails (>= 2.0.0)
97
- rails-controller-testing (1.0.4)
98
- actionpack (>= 5.0.1.x)
99
- actionview (>= 5.0.1.x)
100
- activesupport (>= 5.0.1.x)
93
+ rails-controller-testing (1.0.5)
94
+ actionpack (>= 5.0.1.rc1)
95
+ actionview (>= 5.0.1.rc1)
96
+ activesupport (>= 5.0.1.rc1)
101
97
  rails-dom-testing (2.0.3)
102
98
  activesupport (>= 4.2.0)
103
99
  nokogiri (>= 1.6)
104
- rails-html-sanitizer (1.3.0)
100
+ rails-html-sanitizer (1.4.3)
105
101
  loofah (~> 2.3)
106
- railties (5.2.3)
107
- actionpack (= 5.2.3)
108
- activesupport (= 5.2.3)
102
+ railties (5.2.8.1)
103
+ actionpack (= 5.2.8.1)
104
+ activesupport (= 5.2.8.1)
109
105
  method_source
110
106
  rake (>= 0.8.7)
111
107
  thor (>= 0.19.0, < 2.0)
112
- rake (13.0.0)
108
+ rake (13.0.6)
113
109
  seed-fu (2.3.9)
114
110
  activerecord (>= 3.1)
115
111
  activesupport (>= 3.1)
116
112
  seed-fu-ndo (0.0.3)
117
113
  seed-fu (>= 2.2.0)
118
- sprockets (4.0.0)
114
+ sprockets (4.1.1)
119
115
  concurrent-ruby (~> 1.0)
120
116
  rack (> 1, < 3)
121
- sprockets-rails (3.2.1)
122
- actionpack (>= 4.0)
123
- activesupport (>= 4.0)
117
+ sprockets-rails (3.4.2)
118
+ actionpack (>= 5.2)
119
+ activesupport (>= 5.2)
124
120
  sprockets (>= 3.0.0)
125
- sqlite3 (1.4.1)
126
- thor (0.20.3)
121
+ sqlite3 (1.5.3-x86_64-linux)
122
+ thor (1.2.1)
127
123
  thread_safe (0.3.6)
128
- tzinfo (1.2.5)
124
+ tzinfo (1.2.10)
129
125
  thread_safe (~> 0.1)
130
- websocket-driver (0.7.1)
126
+ websocket-driver (0.7.5)
131
127
  websocket-extensions (>= 0.1.0)
132
- websocket-extensions (0.1.4)
128
+ websocket-extensions (0.1.5)
133
129
 
134
130
  PLATFORMS
135
- ruby
131
+ x86_64-linux
136
132
 
137
133
  DEPENDENCIES
138
134
  mocha
@@ -143,4 +139,4 @@ DEPENDENCIES
143
139
  wagons!
144
140
 
145
141
  BUNDLED WITH
146
- 2.0.2
142
+ 2.3.19
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => '../..'
4
+
5
+ gem 'rails', '~> 6.0.0'
6
+
7
+ group :test do
8
+ gem 'mocha', :require => false
9
+ gem 'net-smtp'
10
+ gem 'rails-controller-testing'
11
+ end
@@ -0,0 +1,164 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ wagons (0.6.1)
5
+ bundler (>= 1.1)
6
+ rails (>= 5.2)
7
+ seed-fu-ndo (>= 0.0.3)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (6.0.6)
13
+ actionpack (= 6.0.6)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailbox (6.0.6)
17
+ actionpack (= 6.0.6)
18
+ activejob (= 6.0.6)
19
+ activerecord (= 6.0.6)
20
+ activestorage (= 6.0.6)
21
+ activesupport (= 6.0.6)
22
+ mail (>= 2.7.1)
23
+ actionmailer (6.0.6)
24
+ actionpack (= 6.0.6)
25
+ actionview (= 6.0.6)
26
+ activejob (= 6.0.6)
27
+ mail (~> 2.5, >= 2.5.4)
28
+ rails-dom-testing (~> 2.0)
29
+ actionpack (6.0.6)
30
+ actionview (= 6.0.6)
31
+ activesupport (= 6.0.6)
32
+ rack (~> 2.0, >= 2.0.8)
33
+ rack-test (>= 0.6.3)
34
+ rails-dom-testing (~> 2.0)
35
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
36
+ actiontext (6.0.6)
37
+ actionpack (= 6.0.6)
38
+ activerecord (= 6.0.6)
39
+ activestorage (= 6.0.6)
40
+ activesupport (= 6.0.6)
41
+ nokogiri (>= 1.8.5)
42
+ actionview (6.0.6)
43
+ activesupport (= 6.0.6)
44
+ builder (~> 3.1)
45
+ erubi (~> 1.4)
46
+ rails-dom-testing (~> 2.0)
47
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
48
+ activejob (6.0.6)
49
+ activesupport (= 6.0.6)
50
+ globalid (>= 0.3.6)
51
+ activemodel (6.0.6)
52
+ activesupport (= 6.0.6)
53
+ activerecord (6.0.6)
54
+ activemodel (= 6.0.6)
55
+ activesupport (= 6.0.6)
56
+ activestorage (6.0.6)
57
+ actionpack (= 6.0.6)
58
+ activejob (= 6.0.6)
59
+ activerecord (= 6.0.6)
60
+ marcel (~> 1.0)
61
+ activesupport (6.0.6)
62
+ concurrent-ruby (~> 1.0, >= 1.0.2)
63
+ i18n (>= 0.7, < 2)
64
+ minitest (~> 5.1)
65
+ tzinfo (~> 1.1)
66
+ zeitwerk (~> 2.2, >= 2.2.2)
67
+ builder (3.2.4)
68
+ concurrent-ruby (1.1.10)
69
+ crass (1.0.6)
70
+ erubi (1.11.0)
71
+ globalid (1.0.0)
72
+ activesupport (>= 5.0)
73
+ i18n (1.12.0)
74
+ concurrent-ruby (~> 1.0)
75
+ loofah (2.19.0)
76
+ crass (~> 1.0.2)
77
+ nokogiri (>= 1.5.9)
78
+ mail (2.7.1)
79
+ mini_mime (>= 0.1.1)
80
+ marcel (1.0.2)
81
+ method_source (1.0.0)
82
+ mini_mime (1.1.2)
83
+ minitest (5.16.3)
84
+ mocha (1.15.0)
85
+ net-protocol (0.1.3)
86
+ timeout
87
+ net-smtp (0.3.2)
88
+ net-protocol
89
+ nio4r (2.5.8)
90
+ nokogiri (1.13.8-x86_64-linux)
91
+ racc (~> 1.4)
92
+ open4 (1.3.4)
93
+ racc (1.6.0)
94
+ rack (2.2.4)
95
+ rack-test (2.0.2)
96
+ rack (>= 1.3)
97
+ rails (6.0.6)
98
+ actioncable (= 6.0.6)
99
+ actionmailbox (= 6.0.6)
100
+ actionmailer (= 6.0.6)
101
+ actionpack (= 6.0.6)
102
+ actiontext (= 6.0.6)
103
+ actionview (= 6.0.6)
104
+ activejob (= 6.0.6)
105
+ activemodel (= 6.0.6)
106
+ activerecord (= 6.0.6)
107
+ activestorage (= 6.0.6)
108
+ activesupport (= 6.0.6)
109
+ bundler (>= 1.3.0)
110
+ railties (= 6.0.6)
111
+ sprockets-rails (>= 2.0.0)
112
+ rails-controller-testing (1.0.5)
113
+ actionpack (>= 5.0.1.rc1)
114
+ actionview (>= 5.0.1.rc1)
115
+ activesupport (>= 5.0.1.rc1)
116
+ rails-dom-testing (2.0.3)
117
+ activesupport (>= 4.2.0)
118
+ nokogiri (>= 1.6)
119
+ rails-html-sanitizer (1.4.3)
120
+ loofah (~> 2.3)
121
+ railties (6.0.6)
122
+ actionpack (= 6.0.6)
123
+ activesupport (= 6.0.6)
124
+ method_source
125
+ rake (>= 0.8.7)
126
+ thor (>= 0.20.3, < 2.0)
127
+ rake (13.0.6)
128
+ seed-fu (2.3.9)
129
+ activerecord (>= 3.1)
130
+ activesupport (>= 3.1)
131
+ seed-fu-ndo (0.0.3)
132
+ seed-fu (>= 2.2.0)
133
+ sprockets (4.1.1)
134
+ concurrent-ruby (~> 1.0)
135
+ rack (> 1, < 3)
136
+ sprockets-rails (3.4.2)
137
+ actionpack (>= 5.2)
138
+ activesupport (>= 5.2)
139
+ sprockets (>= 3.0.0)
140
+ sqlite3 (1.5.3-x86_64-linux)
141
+ thor (1.2.1)
142
+ thread_safe (0.3.6)
143
+ timeout (0.3.0)
144
+ tzinfo (1.2.10)
145
+ thread_safe (~> 0.1)
146
+ websocket-driver (0.7.5)
147
+ websocket-extensions (>= 0.1.0)
148
+ websocket-extensions (0.1.5)
149
+ zeitwerk (2.6.1)
150
+
151
+ PLATFORMS
152
+ x86_64-linux
153
+
154
+ DEPENDENCIES
155
+ mocha
156
+ net-smtp
157
+ open4
158
+ rails (~> 6.0.0)
159
+ rails-controller-testing
160
+ sqlite3
161
+ wagons!
162
+
163
+ BUNDLED WITH
164
+ 2.3.19
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => '../..'
4
+
5
+ gem 'rails', '~> 6.1.0'
6
+
7
+ group :test do
8
+ gem 'mocha', :require => false
9
+ gem 'net-smtp'
10
+ gem 'rails-controller-testing'
11
+ end