Sinatra: Preloader for Sinatra

Created on 27 Jul 2015  路  7Comments  路  Source: sinatra/sinatra

Hello,

I like spring in Rails. It would be nice to have the equivalent in Sinatra. I tried to use spring but it seems to be designed for Rails. I also tried Zeus but it's the same issue.

Is there a solution?

Thanks!

feature

Most helpful comment

Sorry @kendrikat, I didn't found a solution and I don't use Sinatra anymore.

You're picture is really appropriate.

All 7 comments

Hi, @GCorbel. The recommended tool for this is Rerun. See the FAQ entry for more details.

I actually disable Spring when working with Rails because it causes confusion too often. Is there something it does that Rerun wouldn't cover?

My main issue is for tests. I want to have a fast feedback. Now, my acceptance tests take 5 seconds each. My tests are light but I have a slow hard drive and it take time to simply load files. Rerun will not work for my case because I want to run a specific file with at a specific line. rspec spec/acceptance/signup_spec.rb:11 for example.

I can recommend Shotgun for this.

I'm also unsure this is a feature we want to solve in Sinatra itself.

It seems like a missing feature in third-party library, if you have any questions about implementing with Sinatra, feel free.

I can recommend Shotgun for this.

Shotgun appears to be even slower for this - rather than preloading, its philosophy is to not load anything at all until a request is received. At that point it loads a "clean slate" for the entire app, and answers the request. Are you using it in a way which makes it function more like a preloader, with the associated performance enhancements?

@GCorbel - did you find a solution eventually? :)

image
source

Sorry @kendrikat, I didn't found a solution and I don't use Sinatra anymore.

You're picture is really appropriate.

Was this page helpful?
0 / 5 - 0 ratings