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
1) deleteing your account user deletes all of @bob2s aspect visiblites | |
Failure/Error: AspectVisibility.where(:id => @aspect_vis.map(&:id)).should be_empty | |
expected empty? to return true, got false | |
# ./spec/integration/account_deletion_spec.rb:78:in `block (3 levels) in <top (required)>' | |
2) NotificationsController#index special case for start sharing notifications should provide a contacts menu for start sharing notifications | |
Failure/Error: Nokogiri(response.body).css('.aspect_membership').should_not be_empty | |
expected empty? to return false, got true | |
# ./spec/controllers/notifications_controller_spec.rb:121:in `block (4 levels) in <top (required)>' |
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
-- | |
provider: twitter | |
uid: '15280529' | |
info: | |
nickname: penguinbusiness | |
name: Charlie Moseley | |
location: Bellevue, WA | |
image: http://a1.twimg.com/profile_images/281933747/kitamura_ava_normal.gif | |
description: Developer, Otaku, Geek. | |
urls: |
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
#If you don't have Postgres installed yet: | |
# https://github.com/tsaleh/tammer-saleh/blob/master/views/posts/installing-postgresql-for-rails-3-1-on-lion.html.textil | |
#1. Install postgis 1.5.3. Latest is 2.0.0, so using url old formula on github | |
brew install https://raw.github.com/mxcl/homebrew/8a04a43763906e6a9bef68881acf997f3a6f6687/Library/Formula/postgis.rb | |
#2. Create a template to be used on creating GIS-enabled databases | |
createdb template_postgis | |
#3. Import Postgis Data |
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 :god do | |
namespace :restart do | |
task :default, :roles => :app, :except => { :no_release => true } do | |
run "rvmsudo #{bin_god} restart #{application}" | |
end | |
desc "|capistrano-recipes| Restarts the app server" | |
task :app, :roles => :app, :except => { :no_release => true } do | |
run "rvmsudo #{bin_god} restart #{application}-#{app_server.to_s.downcase}" | |
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
-- open terminal sessions | |
tell application "iTerm 2" | |
activate | |
set myterm to (make new terminal) | |
tell myterm | |
-- start mongo | |
launch session "Default" |
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 OpeningHours | |
include MongoMapper::EmbeddedDocument | |
[:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday].each do |weekday| | |
class_eval <<-KEYS_AND_ACCESSORS | |
key :#{weekday}_opening, :default => "CLOSED" | |
key :#{weekday}_closing | |
def #{weekday} | |
#{weekday}_opening == "CLOSED" ? #{weekday}_opening : \"\#\{#{weekday}_opening\} - \#\{#{weekday}_closing\}\" |
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
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc # --> Read /etc/bashrc, if present. | |
fi | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/mongodb/bin:$PATH" | |
export RUBYLIB=".:test:$RUBYLIB" |
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
Profile.all({:username => /\s/}).each do |p| | |
old_username = p.username | |
p.set(:username => p.username.gsub(/\s+/, "")) | |
p.reload | |
msg = "Notify: #{p.full_name} <#{p.email}>" | |
msg << " - Old username: \"#{old_username}\"" | |
msg << " => New username: \"#{p.username}\"" | |
puts msg |
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
<script type="text/javascript" charset="utf-8"> | |
$(function() { | |
{% if item.root? %} | |
$.jStorage.flush(); | |
{% endif %} | |
$('#nav').columnview({ | |
preview: function(element) { | |
$.jStorage.flush(); | |
if($.browser.msie) { |
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
#From rspec-rails readme on github | |
describe "widgets resource" do | |
describe "GET index" do | |
it "contains the widgets header" do | |
get "/widgets/index" | |
response.should have_selector("h1", :content => "Widgets") | |
end | |
end | |
end |