Skip to content

Instantly share code, notes, and snippets.

# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
merb_gems_version = "1.0.6.1"
dm_gems_version = "0.9.8"
# For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components
dependency "merb-action-args", merb_gems_version
dependency "merb-assets", merb_gems_version
dependency "merb-cache", merb_gems_version
dependency "merb-helpers", merb_gems_version
dependency "merb-mailer", merb_gems_version
$ gh pull technomancy master
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:174:in `open_loop': redirection forbidden: http://github.com/badcarl/emacs-starter-kit/network/members.json -> https://github.com/badcarl/emacs-starter-kit/network/members.json (RuntimeError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:519:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:30:in `open'
from /Library/Ruby/Gems/1.8/gems/defunkt-github-0.3.4/lib/commands/helpers.rb:340:in `get_network_members'
from /Library/Ruby/Gems/1.8/gems/defunkt-github-0.3.4/lib/commands/helpers.rb:317:in `network_members'
from /Library/Ruby/Gems/1.8/gems/defunkt-github-0.3.4/lib/commands/commands.rb:101:in `command'
from /Library/Ruby/Gems/1.8/gems/defunkt-github-0.3.4/bin/../lib/github/command.rb:25:
carl@navi[master] sake dm:clone --trace
rake aborted!
can't convert true into String
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in `expand_path'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in `raw_load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:1993:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:1992:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:1976:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? Only two rules:
#
# 1. No mocks or stubs allowed. I'm looking for a other alternatives.
# Mocks can get messy in complex scenarios, and this is intended to
# be a high level test which executes all code. I don't think mocking
# would be a very clean solution anyway, but if you want to try it
# and prove me wrong feel free.
#
require 'rubygems'
# built off of next
gem 'dm-core', '0.10.0'
require 'dm-core'
DataMapper.setup(:default, :adapter => :in_memory)
module Blog
require 'forwardable'
module DataMapper::Adapters
class MasterSlaveAdapter < AbstractAdapter
extend Forwardable
extend DataMapper::Migrations::SingletonMethods
def_delegators :@master, :storage_exists?, :field_exists?,
:upgrade_model_storage, :create_model_storage, :destroy_model_storage, :alter_model_storage,
$ sudo gem install rip
Password:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Not Found 404 (http://gems.rubyforge.vm.bytemark.co.uk/gems/rip-0.0.1.gem)
@protocarl
protocarl / gist:135550
Created June 24, 2009 22:12
Typecasting / SEL issue
require 'rubygems'
gem 'dm-core', '0.10.0'
require 'dm-core'
class Post
include DataMapper::Resource
def self.default_repository_name
:post
ubuntu$ echo "Iñtërnâtiônàlizætiøn" | iconv -t 'ascii//translit//ignore' -f 'utf-8'
Internationalizaeti?n
osx$ echo "Iñtërnâtiônàlizætiøn" | iconv -t 'ascii//translit//ignore' -f 'utf-8'
I~nt"ern^ati^on`alizaetion
#!/usr/bin/env macruby
unless Kernel.respond_to? :framework
exec 'macruby', *ARGV.unshift(__FILE__)
end