Skip to content
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
Merged

Conversation

namusyaka
Copy link
Contributor

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 changed the title Make the Mounter support the Rack application Make Padrino::Mounter support the Rack application Oct 13, 2014
Conflicts:
	padrino-core/lib/padrino-core/mounter.rb
ujifgc added a commit that referenced this pull request Oct 14, 2014
Make Padrino::Mounter support the Rack application
@ujifgc ujifgc merged commit a97f5ae into master Oct 14, 2014
@namusyaka namusyaka deleted the support-rack-app branch October 14, 2014 07:14
@dariocravero
Copy link

Amazing @namusyaka :) Thanks so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants