This file contains 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
middle_name = case full_name | |
when /^.*\s(.*)\s.*$/ | |
$1 | |
else | |
"Peatrice" | |
end |
This file contains 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
This file contains 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
rails_root = File.expand_path('../../', __FILE__) | |
$LOAD_PATH.unshift(rails_root) unless $LOAD_PATH.include?(rails_root) | |
require 'bundler/setup' | |
require 'active_record' | |
require 'rspec/rails/extensions/active_record/base' | |
require 'spec/support/require_helper' | |
require 'spec/support/helpers' | |
require 'ostruct' | |
Bundler.require :models |