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
package com.vetstreet; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
/** | |
* If we pull this JAR in via JRuby, we don't get the sexy OSGI Blueprint magic, so let's | |
* boot the context and provide accessors. Make it a singleton so we don't go blasting out contexts. | |
* @author jcalvert | |
* |
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 'java' | |
require './cxf-deps.jar' | |
require './client.jar' | |
require 'benchmark' | |
context = com.vetstreet.Context.instance | |
hello_dao = context.get_bean "helloDao" | |
Benchmark.bm do |x| | |
x.report do | |
t = [] | |
1000.times do |
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
Nokogiri::XML::XPath::SyntaxError: s0:definitions/s0:binding/s0:operation | |
from nokogiri/XmlXpathContext.java:122:in `evaluate' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/nokogiri-1.5.0-java/lib/nokogiri/xml/node.rb:159:in `xpath' | |
from org/jruby/RubyArray.java:2344:in `collect' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/nokogiri-1.5.0-java/lib/nokogiri/xml/node.rb:150:in `xpath' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/wasabi-2.0.0/lib/wasabi/parser.rb:76:in `parse_operations' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/wasabi-2.0.0/lib/wasabi/parser.rb:41:in `parse' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/wasabi-2.0.0/lib/wasabi/document.rb:117:in `parse' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/wasabi-2.0.0/lib/wasabi/document.rb:103:in `parser' | |
from /Users/jcalvert/.rvm/gems/jruby-1.6.3/gems/wasabi-2.0.0/lib/wasabi/document.rb:25:in `endpoint' |
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
module ActiveRecord | |
module NamedScope | |
module ClassMethods | |
alias_method :original_scope, :scope | |
def scope(name, scope_options = {}) | |
original_scope(name, scope_options) | |
boolean_scope = lambda do | |
send(name).any? | |
end | |
singleton_class.send(:redefine_method, "#{name}?".to_sym, &boolean_scope) |
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
Dir.glob('/mnt/smb/images/pp_uploads/*').each do |glob| | |
hid = glob.split("/").last | |
next unless hid == "2882" | |
Dir.glob("#{glob}/*").each do |cglob| | |
client_id=cglob.split("/").last | |
Dir.glob("#{cglob}/*").each do |plob| | |
patient_id =plob.split("/").last | |
if(Patient.where(:id => patient_id).nil? || Patient.where(:id => patient_id).empty?) | |
next | |
end |
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
71vzn91:tmp jcalvert$ rvm use jruby-1.6.5 | |
Using /Users/jcalvert/.rvm/gems/jruby-1.6.5 | |
71vzn91:tmp jcalvert$ gem install bundler | |
Successfully installed bundler-1.0.21 | |
1 gem installed | |
71vzn91:tmp jcalvert$ rvm use jruby-head | |
Using /Users/jcalvert/.rvm/gems/jruby-head | |
71vzn91:tmp jcalvert$ gem install bundler | |
JRuby limited openssl loaded. http://jruby.org/openssl | |
gem install jruby-openssl for full support. |
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
alias_chained_method :columns, :query_cache, :pg_columns | |
def pg_columns(table_name, name=nil) | |
val = nil | |
Benchmark.bm do |r| | |
r.report do | |
schema_name = @config[:schema_search_path] | |
if table_name =~ /\./ | |
parts = table_name.split(/\./) | |
table_name = parts.pop |
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
ruby-1.9.2-p290 :001 > u = User.last.name | |
=> "Jon Calvert" | |
ruby-1.9.2-p290 :002 > require 'benchmark' | |
=> nil | |
ruby-1.9.2-p290 :003 > Benchmark.bm do | x| | |
ruby-1.9.2-p290 :004 > x.report do | |
ruby-1.9.2-p290 :005 > 1000.times do | |
ruby-1.9.2-p290 :006 > u = User.last.name | |
ruby-1.9.2-p290 :007?> end | |
ruby-1.9.2-p290 :008?> end |
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
13:16:29,375 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "Auth-knob.yml" | |
13:16:29,375 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Replacement of deployment "Auth-knob.yml" by deployment "Auth-knob.yml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"Auth-knob.yml\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Auth-knob.yml\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"Auth-knob.yml\""}} | |
13:16:29,376 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."Auth-knob.yml".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Auth-knob.yml".STRUCTURE: Failed to process phase STRUCTURE of deployment "Auth-knob.yml" | |
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Beta1.jar:] |
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
16:34:27,353 INFO [org.jboss.as.cmp.subsystem.CmpSubsystemAdd] (ServerService Thread Pool -- 38) Activating EJB CMP Subsystem | |
16:34:27,361 INFO [org.jboss.as.jacorb] (ServerService Thread Pool -- 44) Activating JacORB Subsystem | |
16:34:27,367 INFO [org.jboss.as.clustering] (ServerService Thread Pool -- 43) JBAS010300: Activating Infinispan subsystem. | |
16:34:27,392 INFO [org.jboss.as.security] (ServerService Thread Pool -- 58) Activating Security Subsystem | |
16:34:27,400 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 52) JBAS011800: Activating Naming Subsystem | |
16:34:27,406 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 53) JBAS011910: Activating OSGi Subsystem | |
16:34:27,466 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 62) JBAS015537: Activating WebServices Extension | |
16:34:27,492 INFO [org.torquebox.core.as] (ServerService Thread Pool -- 64) Welcome to TorqueBox AS - http://torquebox.org/ | |
16:34:27,494 INFO [org.jboss.as.security] (MSC service thread 1-6) Picketbox version=4 |