Evaluate current gem defaults #107

Closed
calebthompson opened this Issue Oct 5, 2012 · 23 comments

Projects

None yet

7 participants

@calebthompson
thoughtbot, inc. member

The idea is that suspenders is a collection of reasonable starting points and best practices - @mjankowski

Following up on an internal discussion at thoughtbot, we should reevaluate the choices for gems that we include in suspenders to ensure its continued usefulness.

Specifically, gems such as flutie and formtastic could be replaced by bourbon+neat and simple_form, respectively.

I'd like to open this up for discussion. What changes do we see ourselves making to a fresh suspenders install? What do we always add when we don't use suspenders, just rails new?

@joshuaclayton
thoughtbot, inc. member

I think we can remove airbrake and sham_rack from the Gemfile and add jasminerice and guard-jasmine. We may want to consider removing cucumber-rails, especially if moving away from Cucumber for new projects.

@joshuaclayton
thoughtbot, inc. member

For backbone-heavy apps, I always end up adding ejs, backbone-support, active_model_serializers, and capybara-webkit as well.

@croaky
thoughtbot, inc. member

+1 remove Cucumber.

+1 replace Flutie with Bourbon and Bourbon Neat.

@jferris
thoughtbot, inc. member

simple_form is definitely better than formtastic.

I'd like a designer's opinion on flutie vs bourbon/neat. Is seems like flutie is just different. Does bourbon come with any default styles?

@calebthompson
thoughtbot, inc. member

I really like having draper, pry-rails, cancan, paper_trail, haml-rails, and autotest-rails. Several of those are more than a little controversial here, though.

@gabebw
thoughtbot, inc. member
  • pry-rails is lovely. I see no reason not to have that.
  • cancan, paper_trail, and draper, while nice, are used infrequently and in specific use cases. I think those should remain default gems that we use when people ask "How do I do XYZ?" in Campfire, but we shouldn't have them there by default.

+1 on removing sham-rack - I haven't used it in ages.

We should remove DatabaseCleaner as well - I only used it when I used Cucumber, and I don't use Cucumber anymore.

I'm not sure about jasminerice and guard-jasmine - I haven't been on JS-heavy apps recently so I haven't interacted with them - well, ever. I don't have a strong opinion for or against including them, but I do want to note that they're not universally needed.

@gabebw
thoughtbot, inc. member

I think having capybara-webkit as the default will probably help us find bugs better, and I like using it. It's certainly faster.

@calebthompson
thoughtbot, inc. member

I'm not sure about jasminerice and guard-jasmine - I haven't been on JS-heavy apps recently so I haven't interacted with them - well, ever. I don't have a strong opinion for or against including them, but I do want to note that they're not universally needed.

That's true. I should put those into the backbone.js section.

@gabebw
thoughtbot, inc. member
@gabebw
thoughtbot, inc. member

I just looked at your wip commit - please keep thin in there. Without it, Heroku runs your app on Webrick (!).

@calebthompson
thoughtbot, inc. member

I actually just alphabetized that section and it was moved down, Gabe.

@mike-burns
thoughtbot, inc. member

What would I use pry for?

Agreed with not adding cancan, draper, paper_trail, and autotest. We simply don't use these everywhere. Some of these we simply don't use anywhere.

Do not add HAML at all. To anything. Get off my lawn.

@calebthompson calebthompson added a commit that referenced this issue Oct 11, 2012
@calebthompson calebthompson Update the gems we add to the Gemfile
[#107]

* Added: simple_form, neat, pry-rails
* Removed: formtastic, airbrake, sham_rack, database_cleaner
* Moved asset-related gems into the :assets, :development group:
  bourbon, flutie
3653a28
@calebthompson
thoughtbot, inc. member

To anything. Get off my lawn.

lol

What would I use pry for?

debugger and ruby-debug really just don't cut it when you need to do anything more than print out a variable. pry can show the source of methods with show-method, cd into classes so that you can inspect internal variables, and you don't have to import and drop down into irb like you do with debugger.

@jferris
thoughtbot, inc. member

debugger and pry are totally different tools. I use debugger for stepping through a program and inspecting what's going on. I've only ever used pry when exploring a new gem. I'd like to see debugger in there, but I'm not opposed to pry if people like it.

@calebthompson
thoughtbot, inc. member
@calebthompson calebthompson added a commit that referenced this issue Oct 11, 2012
@calebthompson calebthompson Add backbone.js flag
[#107]

* Installs active_model_serializers, backbone-support, ejs
* For development and test, installs guard-jasmine and jasminerice
180d92c
@gabebw
thoughtbot, inc. member

I use pry for what I used to use debugger for. I don't have a good reason for it though - the "cool name" factor may be in play here.

@jayroh

I've found pry to be a better alternative. Works just fine w/spork whereas debugger will freak the hell on out w/spork.

Do not add HAML at all. To anything. Get off my lawn.

^^ this

@jferris
thoughtbot, inc. member

I'll give pry-debugger a try next time I need to debug something.

@mike-burns
thoughtbot, inc. member

@jferris have you debugged something in the past three months? Did you try pry-debugger?

@jferris
thoughtbot, inc. member

I haven't used pry-debugger yet. I'll try playing with that today.

@gabebw
thoughtbot, inc. member

I retract my "I only use DatabaseCleaner with Cucumber" comment above. What I really meant was that I only use it when I do integration testing - so let's keep it.

Summary of proposed changes so far:

ADD

  • pry-rails

REMOVE

  • sham_rack
  • Airbrake

REPLACE

  • flutie -> bourbon/neat (DONE)
  • formtastic -> simple_form

My reactions:

  • pry_rails: Sure, why not. I don't use the advanced features, though.
  • sham_rack: I haven't use it in ages. Sure, let's remove it.
  • airbrake: I use this all the time, let's keep it.
  • formtastic -> simple_form: We already officially switched to simple_form, let's make it super-duper official
@jferris
thoughtbot, inc. member

Did some research and playing around with pry-debugger:

  • You don't use pry-debugger instead of debugger. pry-debugger depends on the debugger gem and delegates to it.
  • The debugging interface you get when doing binding.pry is fine. The things I commonly use from the debugger work.
  • Since it depends on debugger, you can always do debugger instead if something isn't supported through pry.

In short, I'd be happy having just 'pry-debugger' in our Gemfile, which would include pry and debugger. Pry users will get debugging commands like "next" and "step," and debugger users will get syntax highlighting.

@croaky
thoughtbot, inc. member

Created a pull request for this thread:

#139

I think I captured the non-controversial ones. I left ShamRack out because it seems like it should be replaced with Webmock or an alternative. That one and Pry Debugger seem like they can be separate pull requests.

@croaky croaky closed this Jan 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment