Your SlideShare is downloading. ×
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
5 Favorite Gems (Lightning Talk(
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

5 Favorite Gems (Lightning Talk(

2,215

Published on

Presented at BostonRB Project Night, February 5th, 2013

Presented at BostonRB Project Night, February 5th, 2013

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,215
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GEMSThursday, February 7, 13
  • 2. @markbatesThursday, February 7, 13
  • 3. Thursday, February 7, 13
  • 4. http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 5. 1. Konacha http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 6. JavaScript/CoffeeScript testing for Rails http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 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. 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. 2. SideKiq http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 10. Super fast background workers http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 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. http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 13. More Info http://sidekiq.org/ https://github.com/mperham/sidekiq http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 14. 3. SunSpot http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 15. Simple full-text search using Solr http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 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. 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. 4. Sinatra http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 19. A DSL for quickly creating Ruby Web Apps http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 20. require  sinatra   get  /  do    Hello  world! end http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 21. require  sinatra   get  /  do    erb  :index end   __END__   @@  index <div>Hello  World!</div> http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 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. 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. 5. Foreman http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 25. Manage Application Commands http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 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. More Info https://github.com/ddollar/foreman http://www.metacasts.tv PROJNIGHT213Thursday, February 7, 13
  • 28. @markbatesThursday, February 7, 13

×