Skip to content

Instantly share code, notes, and snippets.

require Spec::Runner::Options::EXAMPLE_FORMATTERS["profile"].first
Spec::Runner::Formatter::ProgressBarFormatter.class_eval do
def example_failed(example, counter, failure)
@output.print colourise('F', failure)
exception = failure.exception
@output.print "\n#{exception.message}\n#{exception.backtrace.join("\n\t")}\n"
@output.flush
end
end
@@ -18,6 +18,10 @@ require "desert"
require 'hmac-sha1'
require "extensions/string"
+# Turn NewRelic into a non-autoloaded constant, so new relic doesn't
+# try to call const_missing in a thread
+module NewRelic; end
+
Rails::Initializer.run do |config|
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
---
defaults:
install_options: --include-dependencies
gems:
<%= include_config("#{File.expand_path(File.dirname(__FILE__))}/../vendor/plugins/pivotal_core_bundle/lib/geminstaller/geminstaller_geminstaller.yml") %>
- name: rails
version: 2.1.0
- name: activesupport
version: 2.1.0
- name: activerecord
# require_here.rb
# by Josh Susser
class String
# __FILE__.require_here 'foo' # => require 'CURRENT_DIR/foo'
# __FILE__.require_here %w(lib foo) # joins path segments so you don't have to
# __FILE__.require_here # add the current file's directory to the load path
def require_here(path=nil)
here = File.expand_path(File.dirname(self))
if path
# Require slash
# by Aaron Patterson
# inspired by Josh Susser
# use to require files relative to the current file:
#
# require __FILE__/"lib"/"foo"
# require __FILE__/%{lib foo}
class String
require '/Users/pivotal/workspace/honk/spec/chrome_export/chrome_exporter_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/access_control_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/application_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/authenticated_system_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/dashboards_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/direct_models_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/direct_styles_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/explore_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/invites_controller_spec.rb'
require '/Users/pivotal/workspace/honk/spec/controllers/makes_controller_spec.rb'
#!/usr/bin/env ruby
# solo
def usage(message)
$stderr.puts message
$stderr.puts
$stderr.puts "#{File.basename($0)} envname [commit] [migrate]"
exit 1
end
# config/plugins/plugins_to_test.yml
- user_auth
- social_pivots
# lib/plugin_dependency_limiter.rb
class Rails::Initializer
def load_plugins
# Only load the plugin under test
Rails::Plugin.new("vendor/plugins/#{ENV['PLUGIN']}").load(self)
#!/usr/bin/env ruby
# This script copies all .gem files for all versions of a gem from gems.github.com to gemcutter.org.
# For all versions of a gem, it does a gem fetch, repackages the gem with the non-namespaced name,
# and does a gem push. You must have permission to push the gem, so your gemcutter key must be
# set in ~/.gemrc
require 'rubygems'
require 'yaml'
require 'fileutils'
@pivotal-legacy
pivotal-legacy / gist:594121
Created September 23, 2010 18:45
Vendor Jasmine gem for Rails3
require 'fileutils'
FileUtils.mkdir_p('vendor/gems')
Dir.chdir('vendor/gems') do
%x[git clone git://github.com/pivotal/jasmine-gem.git jasmine]
Dir.chdir('jasmine') do
%x[git submodule update --init]
%x[git fetch origin rspec2-rails3]