I hereby claim:
- I am josephbridgwaterrowe on github.
- I am freakyjoe (https://keybase.io/freakyjoe) on keybase.
- I have a public key whose fingerprint is A6F7 B2FF 058A EFA7 2FA0 11A5 AA45 1268 478B 9CFA
To claim this, I am signing this object:
# /config/initializers/airbrake.rb | |
Airbrake.configure do |config| | |
config.api_key = Figaro.env.airbrake_api_key | |
config.host = Figaro.env.airbrake_host | |
config.port = 80 | |
config.secure = config.port == 443 | |
end |
module StringExtensions | |
refine String do | |
# "Brute force" underscore the string. | |
# Removes any non-alpha characters for clean symbol ready strings. | |
def brute_underscore | |
self.gsub(/::/, '/'). | |
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). | |
gsub(/([a-z\d])([A-Z])/,'\1_\2'). | |
gsub(/([\\][\"])/,''). | |
tr('-', '_'). |
lock '3.3.5' | |
set :application, 'app' | |
set :repo_url, '' | |
set :branch, 'master' | |
set :user, 'deploy' | |
set :deploy_to, '/var/www/app' |
export JAVA_HOME=`/usr/libexec/java_home -v '1.8'` | |
export JAVA_PATH=`which java` | |
export JAVACMD=`which java` |
### BEGIN INIT INFO | |
# Provides: promiscuous subscribe | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Execute the promiscuous subscriber | |
# Description: Execute the promiscuous subscriber | |
### END INIT INFO | |
set -e | |
# Feel free to change any of the following variables for your app: |
# /app/models/interface/interface_factory.rb | |
module Interface | |
class InterfaceFactory | |
class << self | |
def build(context) | |
new(context).build | |
end | |
end | |
def initialize(context) |
# /app/form_objects/my_form_object.rb | |
class MyFormEntry < FormEntry | |
attribute :reference, String | |
validate :unique_reference | |
def unique_reference | |
errors.add(:reference, "must be unique") if \ | |
MyObject.find_by(reference: self.reference) | |
end |
<% html = render partial: 'partial_to_render', | |
locals: { my_model: my_model } %> | |
$.unblockUI(); | |
$('.modal').modal('hide'); | |
$('#my-element').html('<%=j html %>'); | |
$.jGrowl('<%= t(message) %>', { theme: 'alert-success' }); |
AllCops: | |
Exclude: | |
- "vendor/**/*" | |
- "db/schema.rb" | |
UseCache: false | |
Style/CollectionMethods: | |
Description: Preferred collection methods. | |
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size | |
Enabled: true | |
PreferredMethods: |
I hereby claim:
To claim this, I am signing this object: