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
| /* | |
| linq.js -- a simple LINQ implementation for javascript | |
| Author: Nate Kohari <[email protected]> | |
| Copyright (C) 2009 Enkari, Ltd. | |
| Released under the Apache 2.0 license (http://www.opensource.org/licenses/apache2.0.php) | |
| */ | |
| Array.prototype.all = function(func) { | |
| var result = true; | |
| this.iterate(function(item) { |
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
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |
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
| ENV["RAILS_ENV"] ||= "test" | |
| require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
| require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support | |
| require 'cucumber/rails/rspec' | |
| require 'cucumber/rails/world' | |
| require 'cucumber/web/tableish' | |
| require 'capybara/rails' | |
| require 'capybara/cucumber' |
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
| God.watch do |w| | |
| w.uid = "git" | |
| w.gid = "git" | |
| w.name = "asset-proxy" | |
| w.pid_file = "/data/camouflage/tmp/camo.pid" | |
| w.interval = 30.seconds | |
| w.env = { | |
| "PORT" => '8080', | |
| "CAMOUFLAGE_KEY" => '0x24FEEDFACEDEADBEEFCAFE' |
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 'rubygems' | |
| require 'rack' | |
| class Object | |
| def webapp | |
| class << self | |
| define_method :call do |env| | |
| func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
| [200, {}, send(func, *attrs)] | |
| 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
| #!/usr/bin/env rackup | |
| require File.expand_path('app', File.dirname(__FILE__)) | |
| Ramaze.start(:file => __FILE__, :started => true) | |
| run Ramaze |
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
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } 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
| # | |
| # = Capistrano database.yml task | |
| # | |
| # Provides a couple of tasks for creating the database.yml | |
| # configuration file dynamically when deploy:setup is run. | |
| # | |
| # Category:: Capistrano | |
| # Package:: Database | |
| # Author:: Simone Carletti <[email protected]> | |
| # Copyright:: 2007-2010 The Authors |
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
| config.metals = ["Gridfs"] |
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 "test/unit" | |
| require "rubygems" | |
| require "mongoid" | |
| Mongoid.configure do |config| | |
| name = "embed_hash_test" | |
| host = "localhost" | |
| config.master = Mongo::Connection.new.db(name) | |
| config.persist_in_safe_mode = false | |
| end |
OlderNewer