Hoboken Rails Meetup



Hoboken Rails Meetup

1 0


1-suspenders

Presentation for Hoboken Rails Meetup #1- Suspenders

On Github mwenger1 / 1-suspenders

Hoboken Rails Meetup

Grab pizza while we're waiting to kick things off

Housekeeping Before We Start

  • Bathrooms
  • We're a new meetup. Would love your feedback
  • Tonight's Sponsor:

Tonight's Gameplan

  • Icebreaker to get to know each other
  • PRESENTATION: Kicking Off a New Project
  • Gem "Show and Tell"
  • Ask the group anything
  • Wrap up around 8:45. Can continue the conversation at the bar downstairs

Ice Breaker Questions

  • What's your name?
  • What do you do?
  • Programming Experience(i.e "Just graduated dev camp" OR "Been writing Ruby on Rails for 20+ years")
  • TMIL - "This Month I Learned"

Kick Off a New Project

rails new <project>
  • Ask questions at any point
  • I will email everyone the presentation link

Jumpstart A Blank Canvas

  • Grab my standard laundry list of gems
  • Automate default steps

Rails Application Template

Application templates are simple Ruby files containing DSL for adding gems/initializers etc. to your freshly created Rails project or an existing Rails project.

rails new blog -m ~/template.rb

My Initial Template

# template.rb

gem_group :development do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'rails-erd'
  gem 'meta_request'
end

gem_group :development, :test do
  gem 'rspec-rails'
  gem 'pry-rails'
  gem 'pry-debugger'
  gem 'dotenv-rails'
  gem 'guard'
  gem 'guard-rspec'
  gem 'factory_girl_rails'
  gem 'faker'
end

gem_group  :test do
  gem 'capybara'
end

rails generate rspec:install

after_bundle do
  git :init
  git add: "."
  git commit: %Q{ -m 'Initial commit' }
end

Debug in the Browser

  gem 'better_errors'
  gem 'binding_of_caller'

Rails Panel

  gem 'meta_request'

Debug in the Command Line

  gem 'pry-rails'
  gem 'pry-debugger'

Environment Variables

  gem 'dotenv-rails'
    # .env file
    GOOGLE_MAPS_KEY=asdfhkjasefea
    GOOGLE_MAPS_SECRET=a98324jase93
    FACEBOOK_KEY=ejawerjes2ase32
    FACEBOOK_PASSWORD=j3ifdsjfasdfas

Test Driven Development (TDD)

Test Driven Development (TDD)

gem_group :development
  gem 'spring'
  gem 'spring-commands-spec'
end

gem_group :development, :test do
  gem 'factory_girl_rails'
  gem 'faker'
  gem 'guard'
  gem 'guard-rspec'
  gem 'rspec-rails'
end

gem_group  :test do
  gem 'capybara-webkit'
  gem 'database_cleaner'
  gem 'shoulda-matchers'
  gem 'timecop'
end

Works with Legacy Apps

  bin/rake rails:template LOCATION=~/template.rb
  gem 'rails-erd'

Suspenders

A Rails template with our standard defaults, ready to deploy to Heroku.

Lightweight Alternative to Bootstrap

  • Bourbon - mixin library for Sass
  • Neat - semantic grid framework
  • Bitters - scaffold styles, variables and structure
  • Refills - prepackaged patterns and components

If interested, talk to Hannah about the learning curve.

Paid Services

Codeclimate

$99/month for small team. Free for open source

Hound

Style guide reviews for $12/month per repo

Travis

Continuous Integration: $129/month & open source is free

Airbrake

Detailed stack traces: $39/month

Questions???

What gems/services are missing?

Feel free to plug in to demo for the group.

ATGA

"Ask the Group Anything"

  • A specific bug you are stuck on
  • Tooling Questions
  • Educational Resources
  • Share what you are learning

Wrapping Up

  • Feedback. What topics/speakers would you like to see?
  • Next Meetup is February 3rd
  • Thanks to Tonight's Sponsor:
  • Keep the conversation going over drinks at Wicked Wolf

Have a great night!