This file contains hidden or 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
"{\"id\":\"ExampleProject/customers\",\"properties\":{\"discount\":\"number\",\"credit\":\"string\",\"payment_count\":\"integer\",\"phone\":\"string\",\"street1\":\"string\",\"zip\":\"string\",\"ytd_payments\":\"number\",\"city\":\"string\",\"since\":\"string\",\"warehouse_id\":\"integer\",\"balance\":\"number\",\"delivery_count\":\"integer\",\"first\":\"string\",\"data\":\"string\",\"middle\":\"string\",\"district_id\":\"integer\",\"credit_limit\":\"number\",\"state\":\"string\",\"street2\":\"string\",\"last\":\"string\"}}" |
This file contains hidden or 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
# rvm-install added line: | |
if [[ -s /Users/lamb/.rvm/scripts/rvm ]] && [[ $rvm_loaded_flag != 1 ]] ; then source /Users/lamb/.rvm/scripts/rvm ; fi | |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" |
This file contains hidden or 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
#!/usr/bin/env jruby | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper.setup(:default, 'postgres://localhost/test') | |
# DataMapper.setup(:default, 'mysql://localhost/test') | |
class Square | |
include DataMapper::Resource | |
This file contains hidden or 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 Sweatshop | |
self.record_map = Hash.new {|h,k| h[k] = Hash.new {|h,k| h[k] = 0}} | |
def self.record(klass, name, instance) | |
# self.record_map[klass][name.to_sym] << instance | |
self.record_map[klass][name.to_sym] += 1 | |
instance | |
end | |
def self.pick(klass, name) |
This file contains hidden or 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
require "rubygems" | |
require "dm-core" | |
require "dm-migrations" | |
DataMapper.setup(:default, { :adapter => 'mysql', | |
:database => 'test', | |
:username => 'test', | |
:password => '', |
This file contains hidden or 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
Exception in thread "Thread-2" java.lang.NoSuchMethodError: data_objects.RubyType.getRubyType(Ljava/lang/String;)Ldata_objects/RubyType; | |
at do_sqlite3.Sqlite3DriverDefinition.setPreparedStatementParam(Sqlite3DriverDefinition.java:163) | |
at data_objects.Command.prepareStatementFromArgs(Command.java:610) | |
at data_objects.Command.execute_reader(Command.java:252) | |
at data_objects.Command$i_method_0_1$RUBYINVOKER$execute_reader.call(data_objects/Command$i_method_0_1$RUBYINVOKER$execute_reader.gen) | |
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:631) | |
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192) | |
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:350) | |
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:229) | |
at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:71) |
NewerOlder