Skip to content

Instantly share code, notes, and snippets.

View jcmfernandes's full-sized avatar

João Fernandes jcmfernandes

View GitHub Profile
[Unit]
Description=Share local port(s) with ngrok
After=syslog.target network.target
[Service]
PrivateTmp=true
Type=simple
Restart=always
RestartSec=1min
StandardOutput=null
@jcmfernandes
jcmfernandes / best_practices_for_when_declaring_ruby_gem_dependencies.md
Created May 31, 2017 14:45
Best practices for when declaring gem dependencies in Ruby

Declaring gem dependencies in Ruby

For gems that follow semantic versioning the process is as follows:

  • Is the major number greater than 0?
    • If not, lock to a specific version
      • E.g., gem 'timecop', '= 0.8.1'
    • If so, lock the minor number with the approximate version specifier, and declare a greater or equal then dependency to a patch number when necessary
  • E.g., gem 'concurrent-ruby', '~> 1.0', '>= 1.0.2'