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
class WorkingTwelveHourFormat < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
unless value =~ /\A(?>(?>1[0-2]|0[1-9]):[0-5][0-9] pm|(?>1[01]|0[0-9]):[0-5][0-9] am)\z/ | |
record.errors[attribute] << (options[:message] || "is not a valid working twelve hour format") | |
end | |
end | |
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
DEFAULT_RUBY_VERSION="2.0.0-p195" | |
sudo apt-get -y install curl git-core bzip2 build-essential zlib1g-dev libssl-dev autoconf | |
if [ -x /usr/local/rvm/bin/rvm ]; then | |
echo "RVM Found..nothing to do"; | |
else | |
echo "Installing RVM"; | |
curl -L https://get.rvm.io | bash -s -- --autolibs=read-fail; | |
fi |
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/bash | |
IGNORE_TABLES=( core_url_rewrite dataflow_batch_export dataflow_batch_import log_customer log_quote log_summary log_summary_type log_url log_url_info log_visitor log_visitor_info log_visitor_online report_viewed_product_index report_compared_product_index report_event index_event enterprise_logging_event_changes core_cache core_cache_tag enterprise_customer_sales_flat_quote enterprise_customer_sales_flat_quote_address sales_flat_quote sales_flat_quote_address sales_flat_quote_shipping_rate ) | |
CONFIG_FILE="./app/etc/local.xml" | |
IGNORE_STRING="" | |
TMP_FILE="./var/.tmp.local.xml" | |
if [ ! -f "$CONFIG_FILE" ]; then | |
echo "$CONFIG_FILE does not exist" | |
exit |