vrish88 / sinatra_cyclist

Cycle through Sinatra routes at a regular duration.
MIT License
94 stars 18 forks source link

Added the ability to set the cycle duration from your config.ru configuration block #6

Closed kevintuhumury closed 11 years ago

kevintuhumury commented 11 years ago

The default is still 3 seconds. Whenever the duration parameter is set, it will be saved to the session and it will be used as the cycle duration.

If you would like the default to be 30 seconds, you can override this behavior by specifying the following in your Dashing config.ru:

configure do
  set :auth_token, 'YOUR_AUTH_TOKEN'
  set :routes_to_cycle_through, [:dashboard_1, :dashboard_2, :dashboard_3]
  set :cycle_duration, 30
  ...

You'll still be able to set the duration with the GET parameter. Once that's set, it will keep that value during the session.

vrish88 commented 11 years ago

I'll publish another version of the gem as well.

vrish88 commented 11 years ago

Thanks!

tdonelson commented 11 years ago

Great, thanks for this.

vrish88 commented 11 years ago

Gem released!