librelist archives

« back to archive

New "mr-sparkle" gem for an auto-reloading development server

New "mr-sparkle" gem for an auto-reloading development server

From:
Micah Chalmer
Date:
2012-12-23 @ 08:35
After reading Graham's writeup of different auto-reload options in the 
"External access to staging site" thread, I read through the "magical 
reloading sparkles" blog post that was mentioned, and realized there's no 
reason you need a bunch of project-specific code to use that approach.  
But I couldn't find an easy-to-use package already written, so I wrote it 
myself.  The resulting new gem is called "mr-sparkle."

The full README is at https://github.com/MicahChalmer/mr-sparkle but the 
short version is this:  install the gem with "gem install mr-sparkle" and 
then run "mr-sparkle" in the root of your project instead of "shotgun."  
Your app will be served at localhost:8080.  It will auto-reload when a 
file changes (like rerun) but it won't stop listening when it does so, and
it only reloads your own code, so the result should be faster than shotgun
or rerun.

I've tested it and it works well with my Nesta site on my own machines, 
but it's brand spanking new, so it could have severe problems I haven't 
yet seen.  I figured people here might be interested, given the earlier 
thread.

-Micah

Re: [nesta] New "mr-sparkle" gem for an auto-reloading development server

From:
Graham Ashton
Date:
2012-12-23 @ 10:03
On 23 Dec 2012, at 08:35, Micah Chalmer <micah@micahchalmer.net> wrote:

> The full README is at https://github.com/MicahChalmer/mr-sparkle but the
short version is this:  install the gem with "gem install mr-sparkle" and 
then run "mr-sparkle" in the root of your project instead of "shotgun."  
Your app will be served at localhost:8080.

I just tried it on a Nesta site, and it worked very smoothly (and quickly)
with guard-livereload. Very nicely done.

It'll be my default Sinatra app starter from now on. :-)

Once a few more people have tried it successfully we could replace shotgun
in the docs.

-- 
Graham Ashton
Founder, The Agile Planner
http://theagileplanner.com | @agileplanner | @grahamashton

Re: [nesta] New "mr-sparkle" gem for an auto-reloading development server

From:
Jacopo Notarstefano
Date:
2013-01-03 @ 05:22
I can confirm that mr-sparkle works nicely on my blog.

Good job!

Cheers,
Jacopo


On Sun, Dec 23, 2012 at 11:03 AM, Graham Ashton <graham@effectif.com> wrote:

> On 23 Dec 2012, at 08:35, Micah Chalmer <micah@micahchalmer.net> wrote:
>
> > The full README is at https://github.com/MicahChalmer/mr-sparkle but
> the short version is this:  install the gem with "gem install mr-sparkle"
> and then run "mr-sparkle" in the root of your project instead of "shotgun."
>  Your app will be served at localhost:8080.
>
> I just tried it on a Nesta site, and it worked very smoothly (and quickly)
> with guard-livereload. Very nicely done.
>
> It'll be my default Sinatra app starter from now on. :-)
>
> Once a few more people have tried it successfully we could replace shotgun
> in the docs.
>
> --
> Graham Ashton
> Founder, The Agile Planner
> http://theagileplanner.com | @agileplanner | @grahamashton
>
>