To start with you should subclass [Foreman::Export::Base]
and your subclass should exist within the [Foreman::Export]
namespace.
class Foreman::Export::MyRunitExporter < Foreman::Export::Base
end
class Admin::SpacesController < AdminController | |
def preview | |
space = Space.find(params[:id]) | |
prepend_view_path 'app/views/spaces' # Ensures our `:template` is found. | |
lookup_context.prefixes = ['spaces', 'application'] # Ensures that our templates partials are pulled from the right places. | |
render template: 'show', layout: 'application', locals: { space: space } | |
end | |
end |
# implementation at http://gist.github.com/3350 | |
require 'spec_helper' | |
describe HoptoadErrors do | |
describe '.find :all' do | |
before(:each) do | |
@errors = HoptoadErrors.find :all | |
end |
commit 0f2b9f95b905cbebb9573e36f9ff0ef78a0b8024 | |
Author: Chris Lowder <clowder@gmail.com> | |
Date: Mon Apr 4 17:46:17 2011 +0100 | |
A failing example | |
diff --git a/.gitignore b/.gitignore | |
new file mode 100644 | |
index 0000000..08a8ac9 | |
--- /dev/null |
# A polymorphic has_many :through relationship in Rails 2.3 | |
# based on Josh Susser's "The other side of polymorphic :through associations" | |
# http://blog.hasmanythrough.com/2006/4/3/polymorphic-through | |
class Authorship < ActiveRecord::Base | |
belongs_to :author | |
belongs_to :publication, :polymorphic => true | |
end | |
class Author < ActiveRecord::Base | |
has_many :authorships |
:redis: redis://172.25.13.95:6379 |
createuser --password USERNAME | |
createdb --owner=USERNAME DATABASE_NAME |
Gem::Specification.new do |gem| | |
gem.name = '' | |
gem.version = '' | |
gem.date = Date.today.to_s | |
# gem.add_dependency 'hpricot', '~> 0.8.2' | |
# gem.add_development_dependency 'rspec', '~> 1.2.9' | |
gem.summary = "" | |
gem.description = "" |
To start with you should subclass [Foreman::Export::Base]
and your subclass should exist within the [Foreman::Export]
namespace.
class Foreman::Export::MyRunitExporter < Foreman::Export::Base
end
static void i_fail(VALUE self) | |
{ | |
rb_raise(rb_eRuntimeError, "Oh knowz!"); | |
} | |
static void rescue(VALUE self, VALUE exception) | |
{ | |
/* This function _is not_ in <ruby.h> | |
* http://clalance.blogspot.co.uk/2011/01/writing-ruby-extensions-in-c-part-5.html | |
*/ |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |