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 MongoidAdapter | |
class InstanceAdapter < Sunspot::Adapters::InstanceAdapter | |
def id | |
@instance.id | |
end | |
end | |
class DataAccessor < Sunspot::Adapters::DataAccessor | |
def load(id) | |
@clazz.find(id) |
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 Book | |
include MongoMapper::Document | |
CONTEXTS = ['authors', 'rating','keywords', 'genre'] | |
CONTEXTS.each do |context| | |
key context, Array, :index => true | |
end | |
key :title, String<br /> | |
key :contexts, Array<br /> | |
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
require 'rubygems' | |
require 'mongo_mapper' | |
MongoMapper.connection = Mongo::Connection.new('localhost') | |
MongoMapper.database = 'books' | |
class Book | |
include MongoMapper::Document | |
CONTEXTS = ['authors', 'rating','keywords', 'genre'] | |
CONTEXTS.each do |context| |
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 Base | |
end | |
class A < Base | |
end | |
class Base | |
class << self | |
attr_accessor :bar | |
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
<ReplicationFactor>2</ReplicationFactor> | |
<ListenAddress>127.0.0.1</ListenAddress> | |
<CommitLogDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/commitlog</CommitLogDirectory> | |
<DataFileDirectories> | |
<DataFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/data</DataFileDirectory> | |
</DataFileDirectories> | |
<CalloutLocation>/path/to/cassandra/bin/var.1/lib/cassandra/callouts</CalloutLocation> | |
<StagingFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/staging</StagingFileDirectory> | |
<ThriftAddress>127.0.0.1</ThriftAddress> |
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
<ReplicationFactor>2</ReplicationFactor> | |
<ListenAddress>127.0.0.1</ListenAddress> | |
<CommitLogDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/commitlog</CommitLogDirectory> | |
<DataFileDirectories> | |
<DataFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/data</DataFileDirectory> | |
</DataFileDirectories> | |
<CalloutLocation>/path/to/cassandra/bin/var.1/lib/cassandra/callouts</CalloutLocation> | |
<StagingFileDirectory>/path/to/cassandra/bin/var.1/lib/cassandra/staging</StagingFileDirectory> | |
<ThriftAddress>127.0.0.1</ThriftAddress> |
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
[client] | |
socket=/tmp/mysql.sock | |
[mysqld] | |
socket=/tmp/mysql.sock | |
datadir=/Users/ian/Apps/mysql5 |
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
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
95b1e56 HEAD@{2}: checkout: moving from 57bc4b4b0e698f808df979ceaec922777196aa03 to master | |
804d8f2 HEAD@{0}: checkout: moving from master to input_refactor_4664 | |
422df39 HEAD@{1}: pull : Fast forward | |
95b1e56 HEAD@{2}: checkout: moving from 57bc4b4b0e698f808df979ceaec922777196aa03 to master | |
57bc4b4 HEAD@{3}: checkout: moving from input_refactor_4664 to 57bc4b4b0e698f808df979ceaec922777196aa03 |
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
#!/usr/bin/env ruby | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
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
Author: ian <ian@rightscale.com> | |
Date: Tue Sep 15 17:12:05 2009 -0500 | |
refs #4568 - a deployment can have ST that do not belong to the account. do not be so restrictive on the STE (server template executabl | |
diff --git a/app/controllers/deployments_controller.rb b/app/controllers/deployments_controller.rb | |
index 09cd380..7a9a565 100644 | |
--- a/app/controllers/deployments_controller.rb | |
+++ b/app/controllers/deployments_controller.rb | |
@@ -435,7 +435,7 @@ class DeploymentsController < ApplicationController |