Turn your Rails 3 application into a gem
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
init.rb
matrioshka.gemspec

README.md

Matrioshka

Organizing redistributable Rails applications can be a pain. Typical way to solve the issue is to write a lot of generators to duplicate entries like migrations, seeds and other stuff from the host application. Modern Rails Engines system however has the ability to proxy all that for you. So most of ready Rails applications can become a gem within few simple steps.

Matrioshka is a set of ready generators that will do the job on your behalf.

endorse

Host Application (Gem)

Inject the following to your host application Gemfile:

gem 'matrioshka'

Run Matrioshka install generator

rails g matrioshka:install

It will generate all the required additions and patches. For a typical application they will just work. However you probably should edit $application.gemspec to set proper meta information for your future gem.

Client Application (Consumer)

As soon as your gem ready to rumble we can procceed to the consumer. Let's make it work within a new rails application:

rails new marakash

Add your application gem to the new Gemfile:

gem '$application'

Run bundle install and then

rake $application:link

Ta-dam. You are done here. Time to party hard.

Maintainers

License

It is free software, and may be redistributed under the terms of MIT license.

Bitdeli Badge