5 Awesome Gems
                            ...and some fun with MemeGenerator




                                                             Custom Software, Simplified

Wednesday, February 6, 13
Hi!
                    • I’m Dan
                     • Co-Organizer @ BostonRB
                     • Principal Consultant @ LaunchWare
                     • Head of Instruction @ Launch
                              Academy

                            • dpickett on Twitter / GitHub/
                              everyHub

                                                              Custom Software, Simplified

Wednesday, February 6, 13
Some Favorites

                    • inherited_resources
                    • kaminari
                    • guard
                    • configatron
                    • bourbon
                                            Custom Software, Simplified

Wednesday, February 6, 13
Inherited Resources




                                Custom Software, Simplified

Wednesday, February 6, 13
Why?

                    • Makes writing boilerplate controllers
                            easier

                    • Easy internationalization of flash text
                            with the Responders gem

                    • Easy API generation for JSON and XML

                                                         Custom Software, Simplified

Wednesday, February 6, 13
Why Not?

                    • Another DSL/Library to Learn
                    • Can sometimes get in your way for
                            nonstandard controller actions

                    • Not good for beginners - feel the pain
                            of repetition in your controllers, first



                                                                 Custom Software, Simplified

Wednesday, February 6, 13
class	
  AccountsController	
  <	
  ApplicationController
            	
  	
  respond_to	
  :json
            	
  	
  inherit_resources	
  #gives	
  you	
  all	
  RESTful	
  actions	
  for	
  Account
            end




                                                                                           Custom Software, Simplified

Wednesday, February 6, 13
Kaminari




                                       Custom Software, Simplified

Wednesday, February 6, 13
Why?
                    • Easily customizable/themed
                            •   great configuration options

                            •   awesome generators

                    • Scope-Based
                    • Doesn’t hack core objects
                    • I18n ready for localization
                                                             Custom Software, Simplified

Wednesday, February 6, 13
Why Not?

                    • Other engines might express alternative
                            decisions (refinery, ie)

                    • Can be painful to paginate non-scope/
                            AREL collections



                                                       Custom Software, Simplified

Wednesday, February 6, 13
#in	
  your	
  controller
             @users	
  =	
  User.
             	
  	
  page(params[:page]).
             	
  	
  per(50)

             #in your view
             <%= paginate @users %>




                                            Custom Software, Simplified

Wednesday, February 6, 13
guard




                                    Custom Software, Simplified

Wednesday, February 6, 13
Why?

                    • Don’t constantly have to run tests
                            manually

                    • Invokes tests for files that change
                    • Extensible plugin architecture
                    • Extensible notification architecture

                                                           Custom Software, Simplified

Wednesday, February 6, 13
Why Not?


                    • Minor issue where guard plugins can
                            lag behind on dependencies




                                                         Custom Software, Simplified

Wednesday, February 6, 13
Configatron




                                         Custom Software, Simplified

Wednesday, February 6, 13
Why?

                    • Easy, dynamic configuration for gems
                            and applications

                    • Configure via manual code, hash or
                            YAML

                    • Plays nicely with Rails Application
                            configuration


                                                            Custom Software, Simplified

Wednesday, February 6, 13
Why Not?


                    • nulls vs. blanks can be confusing


                                                          Custom Software, Simplified

Wednesday, February 6, 13
module	
  Facebook
         	
  	
  def	
  self.secret_key=(key)
         	
  	
  	
  
                  	
  configatron.facebook.secret_key	
  =	
  key
         	
  	
  end

         	
  	
  def	
  self.secret_key
         	
  	
  	
  
                  	
  configatron.facebook.secret_key
         	
  	
  end
         end




                                                             Custom Software, Simplified

Wednesday, February 6, 13
Bourbon




                                      Custom Software, Simplified

Wednesday, February 6, 13
Why?

                    • Handy shortcuts for common CSS
                            idioms

                    • Beautiful documentation
                    • Exposes you to lots of great/creative
                            CSS uses



                                                        Custom Software, Simplified

Wednesday, February 6, 13
Why Not?

                    • Can be difficult to install/configure as
                            part of the asset pipeline

                    • You still need to be an informed
                            consumer of experimental CSS
                            features



                                                           Custom Software, Simplified

Wednesday, February 6, 13
http://bourbon.io




                                                Custom Software, Simplified

Wednesday, February 6, 13
To Learn More...




                               http://launchacademy.co
                            The Fun Begins May 1st
                                                         Custom Software, Simplified

Wednesday, February 6, 13
For More Gems...


                    • Ignition, our rails template is available
                            •   http://github.com/LaunchWare/ignition




                                                                 Custom Software, Simplified

Wednesday, February 6, 13
Questions?



                                         Custom Software, Simplified

Wednesday, February 6, 13

5 Of Our Favorite Ruby Gems

  • 1.
    5 Awesome Gems ...and some fun with MemeGenerator Custom Software, Simplified Wednesday, February 6, 13
  • 2.
    Hi! • I’m Dan • Co-Organizer @ BostonRB • Principal Consultant @ LaunchWare • Head of Instruction @ Launch Academy • dpickett on Twitter / GitHub/ everyHub Custom Software, Simplified Wednesday, February 6, 13
  • 3.
    Some Favorites • inherited_resources • kaminari • guard • configatron • bourbon Custom Software, Simplified Wednesday, February 6, 13
  • 4.
    Inherited Resources Custom Software, Simplified Wednesday, February 6, 13
  • 5.
    Why? • Makes writing boilerplate controllers easier • Easy internationalization of flash text with the Responders gem • Easy API generation for JSON and XML Custom Software, Simplified Wednesday, February 6, 13
  • 6.
    Why Not? • Another DSL/Library to Learn • Can sometimes get in your way for nonstandard controller actions • Not good for beginners - feel the pain of repetition in your controllers, first Custom Software, Simplified Wednesday, February 6, 13
  • 7.
    class  AccountsController  <  ApplicationController    respond_to  :json    inherit_resources  #gives  you  all  RESTful  actions  for  Account end Custom Software, Simplified Wednesday, February 6, 13
  • 8.
    Kaminari Custom Software, Simplified Wednesday, February 6, 13
  • 9.
    Why? • Easily customizable/themed • great configuration options • awesome generators • Scope-Based • Doesn’t hack core objects • I18n ready for localization Custom Software, Simplified Wednesday, February 6, 13
  • 10.
    Why Not? • Other engines might express alternative decisions (refinery, ie) • Can be painful to paginate non-scope/ AREL collections Custom Software, Simplified Wednesday, February 6, 13
  • 11.
    #in  your  controller @users  =  User.    page(params[:page]).    per(50) #in your view <%= paginate @users %> Custom Software, Simplified Wednesday, February 6, 13
  • 12.
    guard Custom Software, Simplified Wednesday, February 6, 13
  • 13.
    Why? • Don’t constantly have to run tests manually • Invokes tests for files that change • Extensible plugin architecture • Extensible notification architecture Custom Software, Simplified Wednesday, February 6, 13
  • 14.
    Why Not? • Minor issue where guard plugins can lag behind on dependencies Custom Software, Simplified Wednesday, February 6, 13
  • 15.
    Configatron Custom Software, Simplified Wednesday, February 6, 13
  • 16.
    Why? • Easy, dynamic configuration for gems and applications • Configure via manual code, hash or YAML • Plays nicely with Rails Application configuration Custom Software, Simplified Wednesday, February 6, 13
  • 17.
    Why Not? • nulls vs. blanks can be confusing Custom Software, Simplified Wednesday, February 6, 13
  • 18.
    module  Facebook    def  self.secret_key=(key)        configatron.facebook.secret_key  =  key    end    def  self.secret_key        configatron.facebook.secret_key    end end Custom Software, Simplified Wednesday, February 6, 13
  • 19.
    Bourbon Custom Software, Simplified Wednesday, February 6, 13
  • 20.
    Why? • Handy shortcuts for common CSS idioms • Beautiful documentation • Exposes you to lots of great/creative CSS uses Custom Software, Simplified Wednesday, February 6, 13
  • 21.
    Why Not? • Can be difficult to install/configure as part of the asset pipeline • You still need to be an informed consumer of experimental CSS features Custom Software, Simplified Wednesday, February 6, 13
  • 22.
    http://bourbon.io Custom Software, Simplified Wednesday, February 6, 13
  • 23.
    To Learn More... http://launchacademy.co The Fun Begins May 1st Custom Software, Simplified Wednesday, February 6, 13
  • 24.
    For More Gems... • Ignition, our rails template is available • http://github.com/LaunchWare/ignition Custom Software, Simplified Wednesday, February 6, 13
  • 25.
    Questions? Custom Software, Simplified Wednesday, February 6, 13