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 'camping' | |
require 'lazy' | |
class Endless | |
include Enumerable | |
def initialize | |
make_a_promise Lazy.promise &Proc.new | |
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
-- | |
-- make sure that the Apache (Web Server) user or group has read/write | |
-- access to the sqlite file _and_ folder | |
-- | |
DROP TABLE TreePaths; | |
DROP TABLE ePages; | |
DROP TABLE KindConstants; | |
-- |
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
# | |
# include the CampingHooks module in TheApp | |
# | |
module CampingHooks | |
module ClassMethods | |
def set_hook_key(k) | |
@hooks ||= {} | |
@hooks[k] ||= [] | |
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
# convert the index.html of html5 boilerplate to markaby | |
# html5 boilerplate repo: https://github.com/h5bp/html5-boilerplate | |
# needs HTML5 additions from my fork of markaby: https://github.com/igravious/markaby | |
def layout | |
comments = [] | |
comments << '[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]' |
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
# put the following into safe_ar.rb our hack ar.rb or whatever takes your fancy | |
$SAFE_AR_EXTRAS = %{ | |
# really, assumption is a terrible name | |
def self.schemify(assumption) | |
unless SchemaInfo.table_exists? | |
ActiveRecord::Schema.define do | |
create_table SchemaInfo.table_name do |t| | |
t.column :version, :float |
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
# test/lib/triples_create_test.rb | |
require 'test_helper' | |
# assert_nil | |
# assert_equal | |
# | |
# http://guides.rubyonrails.org/testing.html | |
class CreateTriple < ActiveSupport::TestCase |