GithubHelp home page GithubHelp logo

nww_devtools's Introduction

Nww-Devtools

Here at Nix-wie-weg® we use some common supporting gems and configuration for our Ruby projects. We document the actual list here.

Pry

Gemfile

group :development do
  gem 'pry'
  gem 'pry-doc'
  gem 'pry-byebug'
  gem 'awesome_print'
end

Rails

Gemfile

gem 'better_errors'
gem 'binding_of_caller'
gem 'require_reloader'

Initializer

BetterErrors::Middleware.allow_ip! '10.1.0.0/16' if Rails.env.development?

RuboCop

Gemfile

gem 'rubocop', '~> 0.39.0', require: false

We agreed on the cops of the specific version 0.39.

.rubocop.yml

(In project directory)

AllCops:
  TargetRubyVersion: 2.2
  Exclude:
    - 'vendor/bundle/**/*'
  DisplayCopNames: true
Rails:
  Enabled: true
Style/Encoding:
  EnforcedStyle: when_needed
  Enabled: true
Style/AsciiComments:
  Enabled: false
Style/Documentation:
  Enabled: false
Metrics/MethodLength:
  Enabled: false
Style/MethodDefParentheses:
  Enabled: false
Style/MultilineOperationIndentation:
  EnforcedStyle: aligned
Style/MultilineMethodCallIndentation:
  EnforcedStyle: indented
Style/MultilineMethodDefinitionBraceLayout:
  Enabled: true
Style/MultilineHashBraceLayout:
  Enabled: true
Style/SignalException:
  Enabled: false
Metrics/ClassLength:
  Enabled: false
Lint/AssignmentInCondition:
  Enabled: false
Metrics/ParameterLists:
  Enabled: false
Style/MultilineBlockChain:
  Enabled: false
Style/CommentAnnotation:
  Enabled: false
Style/GuardClause:
  Enabled: false

Notes

  • The TargetRubyVersion has to be set to the corresponding Ruby version used in the project.
  • Style/Encoding should be disabled in projects with Ruby >=2.0, which assumes UTF-8 encoding by default.
  • The remaining entries are team consensus.

What about the meta-gems?

In the past we used meta-gems (nww_devtools for Ruby 1.9.x and Ruby 2.x, nww_devtools_rails, rubocop-nww) to incorporate all the common gems and settings we needed in almost every Ruby project. It turned out that we found us in dependency hell quickly. Every small change in e. g. our RuboCop settings involved a bump of four gems. This effectivly slowed us down maintaining these gems actively.

We want more activity and creativity so we concluded simply describing these dependencies in a document and regularly checking our projects against it could be a much cheaper solution. We'll see how this works out.

Credits

nww_devtools's People

Contributors

der-flo avatar hoffi avatar nmax avatar

Watchers

Florian Unglaub avatar  avatar Sven Winkler avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.