GEMSThursday, February 7, 13
@markbatesThursday, February 7, 13
Thursday, February 7, 13
http://www.metacasts.tv                           PROJNIGHT213Thursday, February 7, 13
1. Konacha                              http://www.metacasts.tv                                  PROJNIGHT213Thursday, Feb...
JavaScript/CoffeeScript                               testing for Rails                                http://www.metacast...
CoffeeScript                                                                     JavaScript                           desc...
More Info                                     https://github.com/jfirebaugh/konacha                                     htt...
2. SideKiq                             http://www.metacasts.tv                                 PROJNIGHT213Thursday, Febru...
Super fast                           background workers                              http://www.metacasts.tv              ...
class	  MyWorker                           	  	  include	  Sidekiq::Worker                           	  	  sidekiq_options...
http://www.metacasts.tv                               PROJNIGHT213Thursday, February 7, 13
More Info                                   http://sidekiq.org/                           https://github.com/mperham/sidek...
3. SunSpot                             http://www.metacasts.tv                                 PROJNIGHT213Thursday, Febru...
Simple full-text                           search using Solr                            http://www.metacasts.tv           ...
class	  Post	  <	  ActiveRecord::Base                           	  	  searchable	  do                           	  	  	  	...
More Info                               http://sunspot.github.com/                           https://github.com/sunspot/su...
4. Sinatra                             http://www.metacasts.tv                                 PROJNIGHT213Thursday, Febru...
A DSL for quickly                           creating Ruby Web Apps                               http://www.metacasts.tv  ...
require	  sinatra                              	                                get	  /	  do                              ...
require	  sinatra                             	                               get	  /	  do                             	  ...
require	  sinatra/base                            require	  ./todo                            require	  sinatra/twitter-­‐...
More Info                                              http://www.sinatrarb.com/                                          ...
5. Foreman                             http://www.metacasts.tv                                 PROJNIGHT213Thursday, Febru...
Manage Application                              Commands                              http://www.metacasts.tv             ...
web:	  bundle	  exec	  thin	  start	  -­‐p	  3000                           solr:	  bundle	  exec	  rake	  sunspot:solr:ru...
More Info                           https://github.com/ddollar/foreman                              http://www.metacasts.t...
@markbatesThursday, February 7, 13
Upcoming SlideShare
Loading in …5
×

5 Favorite Gems (Lightning Talk(

2,658 views

Published on

Presented at BostonRB Project Night, February 5th, 2013

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,658
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

5 Favorite Gems (Lightning Talk(

  1. 1. GEMSThursday, February 7, 13
  2. 2. @markbatesThursday, February 7, 13
  3. 3. Thursday, February 7, 13
  4. 4. http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  5. 5. 1. Konacha http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  6. 6. JavaScript/CoffeeScript testing for Rails http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  7. 7. CoffeeScript JavaScript describe  "Calculator",  -­‐> describe("Calculator",  function()  {        beforeEach  -­‐>    beforeEach(function()  {        @calculator  =  new  Calculator()        this.calculator  =  new  Calculator();      });    context  "add",  -­‐>        context("add",  function()  {        it  "adds  two  numbers",  -­‐>              @calculator.add(2,  2).should.eql(4)        it("adds  two  numbers",  function()  {              this.calculator.add(2,  2).should.eql(4);        context  "null  numbers",  -­‐>        });                it  "throws  an  exception",  -­‐>        context("null  numbers",  function()  {                expect(=>                      @calculator.add(1,  null)            it("throws  an  exception",  function()  {                ).to.throw(NullNumberError)                var  _this  =  this;                expect(function()  {                    _this.calculator.add(1,  null);                }).to["throw"](NullNumberError);            });          });      });   }); http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  8. 8. More Info https://github.com/jfirebaugh/konacha http://visionmedia.github.com/mocha/ http://chaijs.com/ http://www.metacasts.tv/casts/unit-testing-javascript-in-rails http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  9. 9. 2. SideKiq http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  10. 10. Super fast background workers http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  11. 11. class  MyWorker    include  Sidekiq::Worker    sidekiq_options  unique:  true      def  perform(some_attributes)        #  do  some  work  here    end   end   MyWorker.perform_async(some_attributes) http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  12. 12. http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  13. 13. More Info http://sidekiq.org/ https://github.com/mperham/sidekiq http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  14. 14. 3. SunSpot http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  15. 15. Simple full-text search using Solr http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  16. 16. class  Post  <  ActiveRecord::Base    searchable  do        text  :title,  :body        text  :comments  do Post.search  do            comments.map  {  |comment|  comment.body  }    fulltext  best  pizza        end    with  :blog_id,  1        integer  :blog_id    with(:published_at).less_than  Time.now        integer  :author_id    order_by  :published_at,  :desc        integer  :category_ids,  multiple:  true    paginate  page:  2,  per_page:  15        time  :published_at    facet  :category_ids,  :author_id        string  :sort_title  do end            title.downcase.gsub(/^(an?|the)b/,  )        end    end end http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  17. 17. More Info http://sunspot.github.com/ https://github.com/sunspot/sunspot http://lucene.apache.org/solr/ http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  18. 18. 4. Sinatra http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  19. 19. A DSL for quickly creating Ruby Web Apps http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  20. 20. require  sinatra   get  /  do    Hello  world! end http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  21. 21. require  sinatra   get  /  do    erb  :index end   __END__   @@  index <div>Hello  World!</div> http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  22. 22. require  sinatra/base require  ./todo require  sinatra/twitter-­‐bootstrap require  ./url_helpers   class  TodoApp  <  Sinatra::Base    register  Sinatra::Twitter::Bootstrap::Assets      helpers  UrlHelpers      get  "/todos"  do        @todos  =  Todo.all        erb  :index    end      get  "/todos/new"  do        @todo  =  Todo.new        erb  :form    end      get  "/todos/:id"  do        @todo  =  Todo.find(params[:id])        redirect  edit_todo_path(@todo)    end      get  "/todos/:id/edit"  do        @todo  =  Todo.find(params[:id])        erb  :form    end      post  "/todos"  do        Todo.create(params[:todo])        redirect  todos_path    end      put  "/todos/:id"  do        @todo  =  Todo.find(params[:id])        @todo.update_attributes(params[:todo])        redirect  todos_path    end      delete  "/todos/:id"  do        @todo  =  Todo.find(params[:id])        @todo.destroy        redirect  todos_path    end   end   use  Rack::MethodOverride run  TodoApp http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  23. 23. More Info http://www.sinatrarb.com/ https://github.com/sinatra/sinatra http://www.metacasts.tv/casts/building-a-sinatra-application-pt-1 http://www.metacasts.tv/casts/building-a-sinatra-application-pt-2 http://www.metacasts.tv/casts/gettings-started-with-sinatra http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  24. 24. 5. Foreman http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  25. 25. Manage Application Commands http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  26. 26. web:  bundle  exec  thin  start  -­‐p  3000 solr:  bundle  exec  rake  sunspot:solr:run worker:  bundle  exec  sidekiq http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  27. 27. More Info https://github.com/ddollar/foreman http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  28. 28. @markbatesThursday, February 7, 13

×