This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For simpler use cases, see the UsesTracker instead: | |
| # https://gist.github.com/christhekeele/e858881d0ca2053295c6e10d8692e6ea | |
| ### | |
| # A way to know, at runtime, what modules a module has used at compile time. | |
| # In this case, you include `IndirectUsesTracker` into a module. When that module gets | |
| # used in some other module, it makes that module registerable under a namespace of your choosing. | |
| # When the registerable module is used into a third module, that third module will know at runtime which | |
| # registerables were `use`d in it at compile time, via a function titled after the namespace. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :deploy do | |
| desc "Notifies Honeybadger locally using curl" | |
| task :notify_honeybadger do | |
| require 'json' | |
| require 'honeybadger' | |
| begin | |
| require './config/initializers/honeybadger' | |
| rescue LoadError | |
| logger.info 'Honeybadger initializer not found' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defadvice ruby-indent-line (after unindent-closing-paren activate) | |
| (let ((column (current-column)) | |
| indent offset) | |
| (save-excursion | |
| (back-to-indentation) | |
| (let ((state (syntax-ppss))) | |
| (setq offset (- column (current-column))) | |
| (when (and (eq (char-after) ?\)) | |
| (not (zerop (car state)))) | |
| (goto-char (cadr state)) |