Dashing widget to display a different gem from ruby-toolbox.com every minute
Live demo:
http://camilledashing.herokuapp.com/dashboard
Put the ruby_toolbox.rb file in your /jobs folder
Create a new ruby_toolbox folder in your /widgets folder, and add the three following files to that folder:
- ruby_toolbox.scss
- ruby_toolbox.html
- ruby_toolbox.coffee
Add the following two gems to your Gemfile:
gem 'nokogiri'
gem 'typhoeus'
then run:
bundle
To include the widget in a dashboard, add the following snippet:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="ruby_toolbox" id="ruby_toolbox" data-view="RubyToolbox" data-moreinfo="Random gems from Ruby-toolbox.com"></div>
</li>
A new gem is chosen every minute by default, but you can easily change it on line 5 of ruby_toolbox.rb.