Gert Thiel GertThiel

View lifecycle_sample.rb
1 2 3 4 5 6
# Consider a program managing tasks, each reservable by an author and a reviewer.
# The author and the reviewer of one task must not be the same
#
transition :reserve, { :available => :reserved }, :available_to => :users,
:user_becomes => :author,
:if => Proc.new { |task| task.acting_user != task.reviewer }
View gist:850952
1 2 3 4 5 6 7 8 9 10
mbp:torquebox-1.0.0.CR1-SNAPSHOT gertthiel$ ./jboss/bin/run.sh
=========================================================================
 
JBoss Bootstrap Environment
 
JBOSS_HOME: /Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.CR1-SNAPSHOT/jboss
 
JAVA: /Library/Java/Home/bin/java
 
JAVA_OPTS: -Xms256m -Xmx1024m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh -Djava.library.path=/Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.CR1-SNAPSHOT/jboss/bin/native/lib64
View gist:848050
1 2 3 4 5 6 7 8 9 10
Errno::ENOENT in Front#index
 
Showing /Users/gertthiel/Documents/Workspaces/textprovider/Stanza-Torquebox/app/views/front/index.dryml where line # raised:
 
No such file or directory - vfs:/Users/gertthiel/Documents/Workspaces/textprovider/Stanza-Torquebox/vendor/plugins/hobo/hobo/rails/../lib/hobo/static_tags
Extracted source (around line #):
 
RAILS_ROOT: vfs:/Users/gertthiel/Documents/Workspaces/textprovider/Stanza-Torquebox
 
Application Trace | Framework Trace | Full Trace
View gist:847902
1 2 3 4 5 6 7 8 9 10
mbp:Stanza-Torquebox gertthiel$ ./debug.sh
pwd: /Users/gertthiel/Documents/Workspaces/textprovider/Stanza-Torquebox
 
>>> environment <<<
 
$TORQUEBOX_HOME: /Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.Beta23
$JRUBY_HOME: /Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.Beta23/jruby
$GEM_HOME:
 
>>> bundler <<<
View gist:847893
1 2 3 4 5 6 7 8 9 10
mbp:Stanza-Torquebox gertthiel$ ./debug.sh
$TORQUEBOX_HOME:
/Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.Beta23
$JRUBY_HOME:
/Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.Beta23/jruby
$GEM_HOME:
 
which jruby:
/Users/gertthiel/Documents/Workspaces/textprovider/torquebox-1.0.0.Beta23/jruby/bin/jruby
jruby -S gem list:
View Gemfile
1
gem 'rsolr-direct', '~> 0.1.0', :require => nil
View Gemfile.rb
1 2 3 4 5 6 7 8 9 10
#############################################################################
# #
# This Gemfile depends on Bundler 0.9.10 and RubyGems 1.3.6 #
# #
#############################################################################
 
 
source "http://rubygems.org"
source "http://gems.github.com"
source "http://gemcutter.org"
View gist:306555
1 2 3 4 5 6 7 8 9 10
module Hobo
module Scopes
class ScopeBuilder
 
 
def exists_sql_condition(reflection, any=false)
owner = @klass
owner_primary_key = "#{owner.table_name}.#{owner.primary_key}"
 
if reflection.options[:through]
View idioms.rb
1 2 3 4 5 6 7 8 9 10
class UserSession
def viewable_posts
# By using Post.scoped({}) rather than Post.all, you get a named scope proxy back,
# meaning that you can chain other scopes onto it
# and that the query is not executed until necessary.
admin? ? Post.scoped({}) : Post.published
end
end
 
class User
Something went wrong with that request. Please try again.