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
Install RVM | |
$ \curl -L https://get.rvm.io | bash -s stable | |
Install latest version of ruby version 2.0.0 (today: ruby-2.0.0-p247 | |
$ rvm install 2.0.0 | |
Go in your application folder & create file for RVM (specific ruby version and Gemset: .ruby-gemset & .ruby-version) |
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
module StrongParamsHelpers | |
extend Grape::API::Helpers | |
def permitted_params | |
@permitted_params ||= declared(params, include_missing: false, include_parent_namespaces: false) | |
end | |
end |
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
#!/usr/bin/env ruby | |
exit 0 if ARGV.include?('--no-verify') | |
keywords = %w(\.pry console.log) | |
files_changed = %x(git diff-index --name-only HEAD --).split | |
%x(git grep -q -E "#{keywords.join('|')}" #{files_changed.join(' ')}) | |
if $?.exitstatus.zero? |