This file contains 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
Rails::Initializer.run do |config| | |
ActiveSupport::Cache::Store.class_eval do | |
def initialize(options = {});end | |
end | |
# | |
require 'torquebox-cache' | |
ActiveSupport::Cache::TorqueBoxStore.class_eval do | |
def initialize(options = {}) | |
@options = options |
This file contains 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
TorqueSpec.local { | |
TorqueSpec::Configurator.configure do |config| | |
config.after(:suite) do | |
Thread.current[:app_server].stop unless Thread.current[:app_server].nil? | |
end | |
end | |
} |
This file contains 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
# istead of originally | |
require 'rspec/core' | |
# this supports RSpec 1 | |
begin | |
# RSpec v2 | |
require 'rspec/core' | |
rescue Exception | |
# RSpec v1 | |
require 'spec' | |
end |
This file contains 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 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 |
This file contains 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 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] |
This file contains 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
############################################################################# | |
# # | |
# 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" |
This file contains 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
gem 'rsolr-direct', '~> 0.1.0', :require => nil |
This file contains 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
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 <<< |
This file contains 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
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 |
This file contains 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
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: |
OlderNewer