New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Padrino::Mounter support the Rack application #1787

Merged
merged 1 commit into from Oct 14, 2014

Conversation

Projects
None yet
3 participants
@namusyaka
Member

namusyaka commented Oct 12, 2014

I'd like to allow to mount the Rack application to Padrino apps.
If we want to mount the rack application to the main application currently, we have to define some class methods on the mounted application class.
It's very troublesome.

class API < Grape::API
  class << self
    # some class methods here
  end
end

This commit makes the mounter smoothly support the Rack application.
The apps.rb code would be something like:

# config/apps.rb

Padrino.mount('SinatraApp', app_file: Padrino.root('sinatra_app/app.rb'))
Padrino.mount('Sample::API', app_file: Padrino.root('api/app.rb'))

@padrino/core-members What do you think?

@namusyaka namusyaka added the feature label Oct 12, 2014

@namusyaka namusyaka changed the title from Make the Mounter support the Rack application to Make Padrino::Mounter support the Rack application Oct 13, 2014

Make the Mounter support the Rack application
Conflicts:
	padrino-core/lib/padrino-core/mounter.rb

ujifgc added a commit that referenced this pull request Oct 14, 2014

Merge pull request #1787 from padrino/support-rack-app
Make Padrino::Mounter support the Rack application

@ujifgc ujifgc merged commit a97f5ae into master Oct 14, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@namusyaka namusyaka deleted the support-rack-app branch Oct 14, 2014

@dariocravero

This comment has been minimized.

Show comment
Hide comment
@dariocravero

dariocravero Oct 14, 2014

Contributor

Amazing @namusyaka :) Thanks so much!!

Contributor

dariocravero commented Oct 14, 2014

Amazing @namusyaka :) Thanks so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment