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
# by bryan helmkamp with slight modification by chris wanstrath | |
# from http://www.brynary.com/2008/8/3/our-git-deployment-workflow | |
# I DO NOT RECOMMEND USING THIS WORKFLOW - IT DESTROYS HISTORY! - jesse andrews | |
module GitCommands | |
extend self | |
def diff_staging | |
`git fetch` |
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
# Git Sub-Trees Sake Tasks | |
# http://rubyurl.com/BwnY < - Read about the technique vs submodules | |
# | |
# This works super good with Rails plugins or when you are actively working | |
# on two related projects. | |
# | |
# Add these tasks with: | |
# sake -i http://pastie.caboo.se/213492.rb | |
# | |
# Example Usage: |
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
;;; Key Bindings ----------------------------------------------------- |
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
match(:first_subdomain => ":subdomain").namespace('newspapers') do |sd| | |
sd.match('/').to(:controller => :first_subdomain, :action => 'index') | |
end | |
match('/').to(:controller => 'basic_newspaper', :action => 'index') |
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
match(:subdomain => /(\w+)/).to(:namespace => 'newspapers') do |sd| | |
sd.match('/').to(:controller => ':subdomain[1]', :action => 'index') | |
end | |
match('/').to(:controller => 'basic_newspaper', :action => 'index') |
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
namespace :db do | |
desc "Bootstrap the application, readying it for use." | |
task :bootstrap => ['db:schema:load', | |
'db:users:create_admin', | |
'db:users:create_user'] do | |
puts "* #{configatron.name} bootstrap process complete." | |
end | |
namespace :users do |
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
[ebuild N ] dev-libs/apr-1.3.2 USE="-debug -doc -urandom" | |
[ebuild N ] app-misc/mime-types-7 | |
[ebuild N ] app-admin/php-toolkit-1.0.1 | |
[ebuild U ] dev-libs/libpcre-7.8 [7.7-r1] | |
[ebuild N ] dev-libs/libmcrypt-2.5.8 | |
[ebuild N ] app-admin/webapp-config-1.50.16-r1 | |
[ebuild N ] dev-libs/apr-util-1.3.2 USE="berkdb gdbm -doc -freetds -ldap -mysql -odbc -postgres -sqlite -sqlite3" | |
[ebuild N ] dev-lang/php-5.2.8-r1 USE="berkdb bzip2 cli crypt gdbm iconv ipv6 ncurses nls pcre readline reflection session spl ssl unicode zlib -adabas -apache2 -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hash -imap -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -oci8 -oci8-instan |
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
= form_for @subscription, :action => url(:create_mobile_alert_subscription), :method => 'post' do | |
= partial subscription_for_mobile_alert(@mobile_alert), :with => @subscription |
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
namespace(:mobile_edition, :name_prefix => 'topic', :namespace => 'topics') do | |
match('/subscriptions/edit/:id'). | |
to(:controller => 'subscriptions', :action => :edit). | |
name(:edit, :subscription) | |
match('/subscriptions/update'). | |
to(:controller => 'subscriptions', :action => :update). | |
name(:update, :subscription) | |
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
# make life in JavaScript more readable by wrapping the Objects needed | |
# to update after a {successful,failed} save in a named Hash, which will | |
# serialize an Object with key-named properties. big slick. | |
def pretty_json(subscription, params={}) | |
# camelCased ruby is heresy, and is merely following the naming | |
# conventions of its destination environment | |
if subscription.valid? | |
{ :newspaperName => @mobile_alert.newspaper.name, | |
:mobileAlert => @mobile_alert, | |
:editLink => edit_subscription_modal_window(@mobile_alert.id, |
OlderNewer