wagons 0.6.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +143 -0
- data/Rakefile +20 -17
- data/lib/tasks/wagons.rake +14 -17
- data/lib/wagons/extensions/migration.rb +40 -12
- data/lib/wagons/extensions/test_case.rb +5 -1
- data/lib/wagons/installer.rb +1 -1
- data/lib/wagons/version.rb +1 -1
- data/lib/wagons/wagon.rb +3 -3
- data/test/ci/{rails52.gemfile → rails61.gemfile} +2 -1
- data/test/ci/rails61.gemfile.lock +167 -0
- data/test/ci/rails70.gemfile +11 -0
- data/test/dummy/Gemfile +2 -1
- data/test/dummy/Gemfile.lock +190 -120
- data/test/dummy/config/application.rb +0 -13
- data/test/dummy/config/environments/development.rb +0 -5
- data/test/dummy/config/environments/production.rb +0 -9
- data/test/dummy/config/initializers/secret_token.rb +1 -5
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/development.sqlite3-shm +0 -0
- data/test/dummy/db/development.sqlite3-wal +0 -0
- data/test/dummy/db/schema.rb +4 -5
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3-shm +0 -0
- data/test/dummy/db/test.sqlite3-wal +0 -0
- data/test/dummy/log/development.log +543 -0
- data/test/dummy/log/test.log +25331 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-H/-HtXnef0HYbCf4IQCm3aqe59wL4bpgzS_yqaHC7iD7I.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0w/0w13MOsljskmRGYd7h_dmRxupsbtm1UGG8UKWdpgqxE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1I/1IDB5qr1TR6_Ex6y1wfpAnPPcuGNbDqKAFp-bicMdJw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1Q/1Q--32pSu0X8tgKnQKviniT1f9fr270Siz7MLazfjY0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1q/1qLm_ssdtiWjLGDfOyEXLBpOpSFyDftrTe-J5A-x0fM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/22/22jeSha1gQut3uUfoP44m3l99L_7N8usml4LS737Q9w.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/24/24_tNLrmt-so6UcYfOScWzfJ9eMRN-Vr2TlQdp4rMwc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/2r/2rLBgIivfRbzIntqLcL4qIWdGUayQDXzPX4Zs7z5nyw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3H/3HRYOSvPLUiLY8pL0DrEsH7doLosVFAhNEPYzRJvBJ4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3c/3cK6cxzebN6u3koHiOwekBT0V7sOWJ1fSJi7NNdNm6c.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3c/3cq6SBzo29D833trP4SsvTdbQFZVgHc4l1F0H3zSXv4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4H/4HmxH_jTqYtN8qzSD6B1E5zoly7Us6enPW634qmOqhw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5p/5pIt6wS1BhH8MCXj73QMvG-ydW4NYZGwK0LtqRWWijk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/6P/6P5A7JnNeGH2r_6lUbaJbwJjgp52R5WYy9FXdMzAP5M.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/6u/6uAmv-3XxnNSicBxCQxV6qa6uf-paBhbcGlMQKVgLfc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/7E/7EF_s-ENUfH9-gY_3l3BqtEvz1eR5lA1RIIXtQrPTfA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8E/8ER8figK9NszHC0GERob9QKvw4FqifCDmXMRFBU8lBY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8a/8aRdJtxvRmSy8nbyfzd_38EOvQDCI6lNv31LaqtpGuQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9S/9SKoByIXxOhEZpdYEljQDxQO3klZtZo_q0da5mM7AMs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9j/9jqgHrQ7pZsKefNZU7qkNWAuu9doJE34xxfgRxrPZHQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/AU/AUcrNcDCsowVJZSQHQcQw0Vd2y-bl_JwYlxVV_Fm5u0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/CQ/CQ-eB4eoQoV4KyNA1L69J-e1PJUhh-1afQdrey7YjWo.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Db/DbmLC3wtG7ztEvkzmVAubW8vf37XdD0bT3Kh73oed1A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/E_/E_9AuEMLlN8ewb_6kPjLBen7_maGlmUctv0og1oBLHA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ej/EjlPEjuWuoa8ddDFxYmNJcDBJciSdyi7top8aI8Qhi0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Em/Emyq6KCg079U1cAHGJ8ldkvAH0_vjape2X0DuypLkHA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Fk/FkfYCBdaahKiox0qtLhN8JdG8c8kKscddoj1hZFyKss.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/GL/GLfgFsH7gYztSz8KqppT6RAF-xlterP4wlPr49DaqY0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Hv/Hv2IxpRjvLKwwO-zzNWLMJSyL2xRH9QRNFGUP-r_PMg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/JC/JCL1JaTAfMuWVygoApJocm0bfiJVcGMUpTlyCbWRcTE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NO/NOvhBx5Ck6mzR9lbTh4oYkFyZuBhW8kL0xq2fXYNZvc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Nx/Nx6PN_fylzZexApM9JmmnNNw-uLk71OfIgJ9zdGNLu4.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OR/ORoJxKNF59Ei4Yg_hIlxcVpLhFmKUXQWKpedcRPHqnw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/PH/PHWXANBrMyYy54Iv8E_E-1rVQTumNJ3u7NUIB5BRApA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pc/PcK1T7ShesfXYFQ5W0iDvn5_NCn9mdRY-iKLYmErizs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Q7/Q7XEjIX6hH0eYgyYXzK_eRM0b3cYXuvkR48xX2IbTe4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QM/QMwgAVHjwvL_AddHLU5X3p9JND42X7g7zuNQh4FStEU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/QW/QWYLzm_V5roD5W780sxbErySkEfXH9TP6U5wp1kTAsQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/RY/RYblxQYTWrFsoTHUoRPMM5nsWzp7OdBla5t3WxqCJk4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Rk/RkNi1mU3vLaSmMYTSCSnlwE-9oKy_W3zbtGnebp8giM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Sh/ShZe4Yd3d4ey6lkV51RLsCo0xviOwe17edjrzNs6xKw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Tg/TgTcVvqf5KTGti25aDSVdPzdEFSzFCA7TIgv36nVcSw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Tt/TtCo1neXEwVGrBDA9g7KFKfHfrw24_xMjrxpTWj6hqU.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/V0/V0xH9hW5hqbm6BDG8n6Ax2lqGsz0MfR1iXOxPDDU9J0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/WR/WR6tsay9cs1pVib3TaKDHXbSLwDXgEFi7yI6zAsdIos.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/XA/XAHwGWu2FidHKKPWHkXTeqsL616yZD-bj78n2tifQiw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Z1/Z1xiE6AeOFjmwb1QypT0chrrYtEfojQh9xF6dvo15Oc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_Z/_ZGxbIs0pIikJpeITx66Vj5HZlTlwPjBtTIxZY4Llhw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_c/_cATGhGdtRwYqswf2eDhF248i27ZoWhL6JUOJztaDRs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_fALMSlqEIAoEcArNZCH9a0pmK-9extGEC3rN19EE0Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/_m/_mEPYNj4UPh88JyBBGxj9LlOgG2hUfzgmdLqzqBQQBE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aF/aFYi0QN0ocrEJd5NcK0n5oruPgfi0bbV_yoiKJQIRcc.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aU/aUji3Ouh9B82G7bYfgs1QcgsrCBmS4-f4ILsN_C_zFw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/aY/aYZRIcKNgaTkEdL-ujKXKwqxK2cVyZole5qthnSYTz8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/b7/b7lBpkBxQaCxHBBRf-QF0CiQKnRE8kYGLUzgAPTjf_k.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bP/bPNHnuI52miVtJqlBT_g5qG18I0oAHSYE9bI7Ptrofg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bU/bUpMjwfdKLlejY8OWALhTYtESG4S5xUg9LOEryfqsh8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bd/bdrnMYD4qOAIIdZCbT39Wkn2wzabKadpCmgWLT56Lq8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dg/dgjHA3yS-cfHM6U2pIHqfOZ9E-ooNW7JbqArpn5_DSI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/eu/euosPQOlq1xNPPLzxhZKDyWfm75qDMlfXRK5pzbPDk0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/h4/h41FBu5275MRJYh-QtgDJZpvJQ4TD6nnvTv93-yfw8s.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ig/ig0NZPffrlU5nyvxScGhp9RbX-ztkRcop-W3z_0GOxg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/ix/ixZDJv3nUs5OyxiRdK1zZ7AnmYUHoPTk0uF-f1CZ-IQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/jv/jvhMb4IFtynnfkP-m13mfrg9gYy4iDEjYnZiK2YBuWg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/l_/l_tJ9WwBL9Q8XjxQN56nGuGtCrP7kGBvE8e76g8tRC0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/m5/m5Zzglx0goFadTvj77IDwqNQpO6-UAKhPq6cpeKq-ks.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/mH/mHAhTi2hfFhPk9Q0Q_fl1eh_7Za4SNRUevCoJRLcZb0.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/oi/oifW-FoUUBJZovp7spCmtZ2nV0p36Sm-3pdjeOd_MBI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/pg/pg4_Xb9Jpu2-lF5UTFVEdSygm2el9xcJ_PTt5bSXGos.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/qP/qP3gEansoZiP9AhSv2BIJUz5hq2qwkMBjj-NJ3Ibdt0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/qY/qYvyX-tPRbBGYCkP1_8f6fthjekc2G7Eq6V_afdgbrY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/rG/rGDKy38JC9huYGZLtA-wiM_C5tv0OChr97sVU-HUesQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/s9/s9hTotMjw4ddx-wmP0kGle-EXqVg-CaCo1LMpDTZeKQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/w3/w38rfd6qdVo1aV28n_6tWWrNnwrxR55-kEZc6pyA5zk.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wx/wxwvso5wh0QLD0Vwu4VJimRWxLDGYfCaGMOsrLYrLg8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xG/xGMnO4s6f7EDeEia5H8zPU1p-Z-MmsO0Val4gsFgpYk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xR/xRih9fv1y9PmtOktqzUIrowdEqL2bBp6EAxyNIdZ9yw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xT/xTjKotv2c8rw6rRSG5MFPKuThESil_pEyLnT0NMaQ0c.cache +0 -0
- data/test/dummy/vendor/wagons/superliner/Gemfile.lock +171 -123
- data/test/test_helper.rb +1 -4
- metadata +310 -162
- data/README.rdoc +0 -146
- data/test/ci/rails52.gemfile.lock +0 -146
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -15
- data/test/dummy/config/initializers/mime_types.rb +0 -5
data/README.rdoc
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
= Here Be Wagons
|
2
|
-
|
3
|
-
{<img src="https://secure.travis-ci.org/codez/wagons.png" />}[http://travis-ci.org/codez/wagons]
|
4
|
-
|
5
|
-
Wagons are extensions to your application train running on Rails. You can see them as plugins that
|
6
|
-
extend the behavior of your specific Rails application. This framework makes it easy to create and
|
7
|
-
manage them.
|
8
|
-
|
9
|
-
First of all, wagons are basically {Rails Engines}[http://api.rubyonrails.org/classes/Rails/Engine.html],
|
10
|
-
so make sure you are familiar with them. Wagons provide a handful of additions so your wagon
|
11
|
-
engines actually know your application.
|
12
|
-
|
13
|
-
Wagons differ from engines in a few points:
|
14
|
-
|
15
|
-
* Wagons extend your application, engines extend Rails.
|
16
|
-
* Wagon migrations are kept separately from your application's migrations to enable easy addition and removal of wagons.
|
17
|
-
* When developing and testing, wagons use the main application instead of a dummy application.
|
18
|
-
|
19
|
-
== Setup
|
20
|
-
|
21
|
-
As always, add this declaration to your application's Gemfile:
|
22
|
-
|
23
|
-
gem 'wagons'
|
24
|
-
|
25
|
-
Now you are ready for your first wagon. Generate it with
|
26
|
-
|
27
|
-
rails generate wagon [name]
|
28
|
-
|
29
|
-
This creates the structure of your wagon in <tt>vendor/wagons/[name]</tt>. In there, you find the file <tt>lib/[name]/wagon.rb</tt>,
|
30
|
-
which defines the <tt>Rails::Engine</tt> and includes the +Wagon+ module. Here, you may also extend your application
|
31
|
-
classes in a +config.to_prepare+ block.
|
32
|
-
|
33
|
-
In order to load wagons with the application, an entry in the +Gemfile+ would be sufficient.
|
34
|
-
To keep things flexible, wagons come with an additional file +Wagonfile+. Generate one for development purposes with:
|
35
|
-
|
36
|
-
rake wagon:file
|
37
|
-
|
38
|
-
This will include all wagons found in +vendor/wagons+ in development mode.
|
39
|
-
Do not check +Wagonfile+ into source control. In your deployments, you might want to have different entries in there.
|
40
|
-
|
41
|
-
Once your wagon is ready to ship, a gem can be built with <tt>rake build</tt>. The name of a wagon gem must always start
|
42
|
-
with the application name, followed with an underscore and the actual name of the wagon. In production, you may
|
43
|
-
simply install the wagon gem and explicitly add a declaration to your +Wagonfile+.
|
44
|
-
|
45
|
-
If your wagon contains migrations and probably seed data, update your database with
|
46
|
-
|
47
|
-
rake wagon:setup WAGON=[name]
|
48
|
-
|
49
|
-
Leave off the +WAGON+ parameter to setup all wagons in your +Wagonfile+. This should not interfere with wagons that are
|
50
|
-
already set up. Migrations are only run if they are not loaded yet, as usual.
|
51
|
-
|
52
|
-
|
53
|
-
== Extending your application with a wagon
|
54
|
-
|
55
|
-
Ruby and Rails provide all the magic required to extend your application from within a wagon.
|
56
|
-
|
57
|
-
To add new models, controllers or views, simply create them in the +app+ directory of your wagon, as you would in a regular engine.
|
58
|
-
|
59
|
-
To extend existing models and controllers, you may create modules with the required functionality.
|
60
|
-
Include them into your application classes in a +config.to_prepare+ block in <tt>lib/[wagon_name]/wagon.rb</tt>.
|
61
|
-
|
62
|
-
To extend views, wagons provides a simple view helper that looks for partials in all view paths. Any template that
|
63
|
-
might be extended by a wagon can include a call like this:
|
64
|
-
|
65
|
-
<%= render_extensions :details %>
|
66
|
-
|
67
|
-
Any partials living in an equally named subfolder as the calling template and starting with the given key are rendered at this place.
|
68
|
-
|
69
|
-
|
70
|
-
== Wagon dependencies
|
71
|
-
|
72
|
-
Wagons may depend on each other and/or have certain requirements on their load order. To make sure something
|
73
|
-
is loaded before the current wagon, add a <tt>require '[app_name]_[other_wagon]'</tt> on top of the
|
74
|
-
<tt>lib/[app_name]_[current_wagon].rb</tt> file. For development dependencies, there is an extra +require_optional+
|
75
|
-
method that will not raise a +LoadError+ if the dependency is not found.
|
76
|
-
|
77
|
-
To control that the main application actually supports a certain wagon, an application version may be defined
|
78
|
-
so wagons can define a requirement. The application version can be set in an initializer. Create it with:
|
79
|
-
|
80
|
-
rake wagon:app_version
|
81
|
-
|
82
|
-
Besides setting the version, this initializer will check all loaded wagons for their application requirement
|
83
|
-
and raise errors if one is not met. In <tt>lib/[wagon_name]/wagon.rb</tt> the requirement may be defined, e.g.:
|
84
|
-
|
85
|
-
app_requirement '>= 1.0'
|
86
|
-
|
87
|
-
The syntax follows the Ruby gem version and requirements.
|
88
|
-
|
89
|
-
|
90
|
-
== Seed Data
|
91
|
-
|
92
|
-
Wagons integrates {Seed Fu}[https://github.com/mbleigh/seed-fu] for seed data. All seed data from the application
|
93
|
-
is also available in wagon tests, as long as no fixture files overwrite the corresponding tables.
|
94
|
-
|
95
|
-
Wagons may come with their own seed data as well. Simply put it into <tt>db/fixtures[/environment]</tt>. To allow for
|
96
|
-
an automatic removal of wagons, {Seed Fu-ndo}[https://github.com/codez/seed-fu-ndo] is able to record
|
97
|
-
seed file instructions and destroy all entries that exist in the database. Just make sure that you only use
|
98
|
-
the +seed+ and +seed_once+ methods in these files, or the unseed may not work correctly.
|
99
|
-
|
100
|
-
|
101
|
-
== Beware
|
102
|
-
|
103
|
-
There are a few other things that work differently with wagons:
|
104
|
-
|
105
|
-
=== Schema & Migrations
|
106
|
-
|
107
|
-
Wagons are extensions to your application that may vary between various installations. Wagon tables are added
|
108
|
-
and removed as wagons are installed or uninstalled. After you have added a wagon's gem to your production
|
109
|
-
+Wagonfile+, run <tt>rake wagon:setup</tt> to run the migrations and load the seed data. Before you remove them
|
110
|
-
from +Wagonfile+, run <tt>rake wagon:remove WAGON=to_remove</tt> to eliminate the artifacts from the database first.
|
111
|
-
|
112
|
-
In this way, the +schema.rb+ file must only contain the tables of the application, not of all wagons.
|
113
|
-
When you have migrations for your main application and wagons loaded, the schema will not be dumped on
|
114
|
-
<tt>db:migrate</tt>. You need to either remove the wagons or reset the database before the schema may be dumped.
|
115
|
-
This is (currently) the cost for having arbitrary pluggable application extensions.
|
116
|
-
|
117
|
-
=== Tests
|
118
|
-
|
119
|
-
Wagons use your application for tests. This is also true for your application's test database. To get the
|
120
|
-
correct setup, <tt>app:db:test:prepare</tt> is extended to run the migration of the current wagon and all its
|
121
|
-
dependencies, as well as their seed data. Once the database is set up, single tests may be run with
|
122
|
-
the usual <tt>ruby -I test test/my_test.rb</tt> command.
|
123
|
-
|
124
|
-
The +test_helper.rb+ of the main application is included in all wagon tests. Any additions in
|
125
|
-
this file are available in wagon tests as well. The only thing wagons need to do is reseting the
|
126
|
-
fixture path to the wagon's test fixtures.
|
127
|
-
|
128
|
-
RSpec works fine with wagons as well. Simply put the heading lines found in <tt>test_helper.rb</tt> into your
|
129
|
-
<tt>spec_helper.rb</tt>.
|
130
|
-
|
131
|
-
=== Gem Bundling
|
132
|
-
|
133
|
-
Bundler manages application dependencies, with a stress on application. Because wagons live
|
134
|
-
inside your application during development, the app's +Gemfile+ is included in each wagon's +Gemfile+.
|
135
|
-
However, Bundler still keeps a separate <tt>Gemfile.lock</tt> for each wagon, so you have to make sure to keep
|
136
|
-
these up to date when you change your main application gems. The gem versions for the wagons should be
|
137
|
-
the same as for the application. <tt>rake wagon:bundle:update</tt> is here to help you exactly with that.
|
138
|
-
We recommend to NOT check in the Wagon's <tt>Gemfile.lock</tt> file into source control.
|
139
|
-
|
140
|
-
Unfortunately, adding wagon gems to the +Wagonfile+ in production also breaks with Bundler's approach
|
141
|
-
of locking down application gems. Because of that, the <tt>--deployment</tt> option cannot be used
|
142
|
-
with wagons. If you install your gems from <tt>vendor/cache</tt> into <tt>vendor/bundle</tt> or so,
|
143
|
-
you still get most of the benefits of using Bundler, including the guarantee for the very same gem
|
144
|
-
versions as used in development.
|
145
|
-
|
146
|
-
Contributions to this or any other issues are very welcome.
|
@@ -1,146 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
wagons (0.5.0)
|
5
|
-
bundler (>= 1.1)
|
6
|
-
rails (>= 4.2)
|
7
|
-
seed-fu-ndo (>= 0.0.3)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actioncable (5.2.3)
|
13
|
-
actionpack (= 5.2.3)
|
14
|
-
nio4r (~> 2.0)
|
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)
|
20
|
-
mail (~> 2.5, >= 2.5.4)
|
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)
|
26
|
-
rack-test (>= 0.6.3)
|
27
|
-
rails-dom-testing (~> 2.0)
|
28
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (5.2.3)
|
30
|
-
activesupport (= 5.2.3)
|
31
|
-
builder (~> 3.1)
|
32
|
-
erubi (~> 1.4)
|
33
|
-
rails-dom-testing (~> 2.0)
|
34
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (5.2.3)
|
36
|
-
activesupport (= 5.2.3)
|
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)
|
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)
|
49
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
|
-
i18n (>= 0.7, < 2)
|
51
|
-
minitest (~> 5.1)
|
52
|
-
tzinfo (~> 1.1)
|
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)
|
61
|
-
concurrent-ruby (~> 1.0)
|
62
|
-
loofah (2.3.1)
|
63
|
-
crass (~> 1.0.2)
|
64
|
-
nokogiri (>= 1.5.9)
|
65
|
-
mail (2.7.1)
|
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)
|
80
|
-
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)
|
94
|
-
bundler (>= 1.3.0)
|
95
|
-
railties (= 5.2.3)
|
96
|
-
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)
|
101
|
-
rails-dom-testing (2.0.3)
|
102
|
-
activesupport (>= 4.2.0)
|
103
|
-
nokogiri (>= 1.6)
|
104
|
-
rails-html-sanitizer (1.3.0)
|
105
|
-
loofah (~> 2.3)
|
106
|
-
railties (5.2.3)
|
107
|
-
actionpack (= 5.2.3)
|
108
|
-
activesupport (= 5.2.3)
|
109
|
-
method_source
|
110
|
-
rake (>= 0.8.7)
|
111
|
-
thor (>= 0.19.0, < 2.0)
|
112
|
-
rake (13.0.0)
|
113
|
-
seed-fu (2.3.9)
|
114
|
-
activerecord (>= 3.1)
|
115
|
-
activesupport (>= 3.1)
|
116
|
-
seed-fu-ndo (0.0.3)
|
117
|
-
seed-fu (>= 2.2.0)
|
118
|
-
sprockets (4.0.0)
|
119
|
-
concurrent-ruby (~> 1.0)
|
120
|
-
rack (> 1, < 3)
|
121
|
-
sprockets-rails (3.2.1)
|
122
|
-
actionpack (>= 4.0)
|
123
|
-
activesupport (>= 4.0)
|
124
|
-
sprockets (>= 3.0.0)
|
125
|
-
sqlite3 (1.4.1)
|
126
|
-
thor (0.20.3)
|
127
|
-
thread_safe (0.3.6)
|
128
|
-
tzinfo (1.2.5)
|
129
|
-
thread_safe (~> 0.1)
|
130
|
-
websocket-driver (0.7.1)
|
131
|
-
websocket-extensions (>= 0.1.0)
|
132
|
-
websocket-extensions (0.1.4)
|
133
|
-
|
134
|
-
PLATFORMS
|
135
|
-
ruby
|
136
|
-
|
137
|
-
DEPENDENCIES
|
138
|
-
mocha
|
139
|
-
open4
|
140
|
-
rails (~> 5.2.0)
|
141
|
-
rails-controller-testing
|
142
|
-
sqlite3
|
143
|
-
wagons!
|
144
|
-
|
145
|
-
BUNDLED WITH
|
146
|
-
2.0.2
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
11
|
-
#
|
12
|
-
# These inflection rules are supported but not enabled by default:
|
13
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
-
# inflect.acronym 'RESTful'
|
15
|
-
# end
|