Skip to content

Instantly share code, notes, and snippets.

jruby-1.5.6 - #fetching
jruby-1.5.6 - #downloading jruby-bin-1.5.6, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.9M 100 10.9M 0 0 280k 0 0:00:40 0:00:40 --:--:-- 290k
jruby-1.5.6 - #extracting jruby-bin-1.5.6 to /Users/mark/.rvm/src/jruby-1.5.6
jruby-1.5.6 - #extracted to /Users/mark/.rvm/src/jruby-1.5.6
Building Nailgun
jruby-1.5.6 - #installing to /Users/mark/.rvm/rubies/jruby-1.5.6
jruby-1.5.6 - #importing default gemsets (/Users/mark/.rvm/gemsets/)
PATH=/Users/mark/.rvm/gems/jruby-1.6.0@we_build_pages/bin:/Users/mark/.rvm/gems/jruby-1.6.0@global/bin:/Users/mark/.rvm/rubies/jruby-1.6.0/bin:/Users/mark/.rvm/bin:.:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/local/bin:/Users/mark/git/bin:/Users/mark/bin:/Users/mark/opt/apache-ant-1.7.0/bin:/Users/mark/opt/maven-2.0.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/groovy/bin:/usr/local/mysql/bin
TMPDIR=/var/folders/h8/h8j2hFP-2RWj-k+1YvZsj++++TI/-Tmp-/
SHELL=/bin/zsh
HOME=/Users/mark
USER=mark
LOGNAME=mark
DISPLAY=:0
Apple_PubSub_Socket_Render=/tmp/launch-ySs7fu/Render
COMMAND_MODE=unix2003
__CF_USER_TEXT_ENCODING=0x1F5:0:0
/Users/mark/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/bundler-1.0.10/lib/bundler/cli.rb:351 warning: executable? does not in this environment and will return a dummy value
/Users/mark/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/bundler-1.0.10/lib/bundler.rb:203: warning: instance variable @checked_for_sudo not initialized
/Users/mark/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/bundler-1.0.10/lib/bundler.rb:207: warning: Insecure world writable dir /Users/mark/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/bin in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/dependency.rb:52: warning: instance variable @type not initialized
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError)
from /Users/mark/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/bundler-1.0.10/lib/bundler/resolver.rb:359:in `new'
from /Users/mark/.rvm/gems/jruby-1.6.0.R
LocalJumpError: unexpected return
from org/jruby/RubyProc.java:272:in `call'
from org/jruby/RubyProc.java:228:in `call'
from /Users/enablelabs/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/doc_wrapper-0.9.0/lib/doc_wrapper/raw_property_definition.rb:4:in `transform'
from /Users/enablelabs/.rvm/gems/jruby-1.6.0.RC2@we_build_pages/gems/doc_wrapper-0.9.0/lib/doc_wrapper/base_property_definition.rb:15:in `property'
from (eval):2:in `adsense_domains'
from org/jruby/RubyKernel.java:2039:in `send'
from /Users/enablelabs/projects/we_build_pages/lib/doc_wrapper_helpers.rb:5:in `adsense_domains'
from org/jruby/RubyProc.java:268:in `call'
from org/jruby/RubyKernel.java:2039:in `send'
# My first attempt at using both Mocha and RSpec mocks in a project.
module Spec
module Adapters
module MockFramework
# Mocha::Standalone was deprecated as of Mocha 0.9.7.
begin
include Mocha::API
rescue NameError
org.jruby.rack.RackInitializationException: Valid types are [:development, :runtime], not nil
from /Users/enablelabs/opt/jboss/server/default/tmp/deploy/tmp2213791091804345453mori.ear-contents/mori.war/WEB-INF/gems/gems/bundler-1.0.7/lib/bundler/resolver.rb:359:in `new'
from /Users/enablelabs/opt/jboss/server/default/tmp/deploy/tmp2213791091804345453mori.ear-contents/mori.war/WEB-INF/gems/gems/bundler-1.0.7/lib/bundler/resolver.rb:359:in `search'
from /Users/enablelabs/opt/jboss/server/default/tmp/deploy/tmp2213791091804345453mori.ear-contents/mori.war/WEB-INF/gems/gems/bundler-1.0.7/lib/bundler/resolver.rb:354:in `gems_size'
from /Users/enablelabs/opt/jboss/server/default/tmp/deploy/tmp2213791091804345453mori.ear-contents/mori.war/WEB-INF/gems/gems/bundler-1.0.7/lib/bundler/resolver.rb:179:in `resolve'
from /Users/enablelabs/opt/jboss/server/default/tmp/deploy/tmp2213791091804345453mori.ear-contents/mori.war/WEB-INF/gems/gems/bundler-1.0.7/lib/bundler/resolver.rb:175:in `each'
from /Users/enablelabs/op
import org.springframework.beans.BeanUtils
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@Category(Object)
class PropertyUtils {
def getPropertyValue (Class clazz, String name, Object ob) {
Method getter = BeanUtils.findDeclaredMethod(clazz, getGetterName(name), null)
try {
// With the Category annotation this throws a ValidationError
// Without the annotation everything runs as exepected
@Category(Object)
class Base {
def errors = []
def foo () {
errors = []
}
public class A {
private String foo = "A";
public void printFoo () {
System.out.println(foo);
}
}
public class B extends A {
class A {
def foo = "A"
def printFoo () {
println foo
}
}
class B extends A {
def foo = "B"
def printFoo () {