I hereby claim:
- I am gabrielg on github.
- I am gabriel (https://keybase.io/gabriel) on keybase.
- I have a public key whose fingerprint is 2338 5303 84AB 5B93 9FC7 67BF C0A1 00A4 D113 593F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Formats a man page for reading in a browser, and opens it. Example: | |
# | |
# hman xsltproc | |
# | |
stylesheet=$(cat <<eocss | |
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="html" encoding="UTF-8" indent="yes"/> |
class Module | |
def protocol(proto_name) | |
@current_protocol = proto_name.to_sym | |
end | |
def protocols | |
@protocols ||= Hash.new{|h,k| h[k] = []} | |
end | |
def method_added(name) |
total 8 | |
drwxr-xr-x 43 gabriel wheel 1462 Feb 24 23:01 Cellar | |
drwxr-xr-x 6 gabriel wheel 204 Aug 8 2010 Library | |
-rw-r--r-- 1 gabriel wheel 1613 Nov 4 22:54 README.md | |
drwxr-xr-x 364 gabriel wheel 12376 Feb 24 23:01 bin | |
drwxr-xr-x 11 gabriel wheel 374 Feb 15 22:46 etc | |
drwxr-xr-x 45 gabriel wheel 1530 Nov 4 23:03 include | |
drwxr-xr-x 219 gabriel wheel 7446 Feb 15 22:46 lib | |
drwxrwxr-x 11 gabriel wheel 374 Oct 6 19:24 libexec | |
drwxrwxr-x 7 gabriel wheel 238 Oct 12 11:37 sbin |
class Class | |
def seal! | |
class_eval do | |
def self.method_added(method_name) | |
Object.const_set(name, @sealed) if defined?(@sealed) | |
end | |
def self.singleton_method_added(method_name) | |
Object.const_set(name, @sealed) if defined?(@sealed) |
class Tricksy | |
def self.lulz | |
puts "denied" | |
end | |
def self.singleton_method_added(name) | |
Object.const_set(:Tricksy, RealTricksy) if defined?(RealTricksy) | |
end | |
RealTricksy = self.clone |
diff --git a/lib/riot/context.rb b/lib/riot/context.rb | |
index 8532ccd..324f395 100644 | |
--- a/lib/riot/context.rb | |
+++ b/lib/riot/context.rb | |
@@ -1,5 +1,10 @@ | |
module Riot | |
- RootContext = Struct.new(:setups, :teardowns) | |
+ RootContext = Struct.new(:setups, :teardowns) do | |
+ def assertion_class | |
+ Assertion |
diff --git a/lib/riot/context.rb b/lib/riot/context.rb | |
index a1231d7..8532ccd 100644 | |
--- a/lib/riot/context.rb | |
+++ b/lib/riot/context.rb | |
@@ -20,7 +20,7 @@ module Riot | |
def asserts_topic; asserts("topic") { topic }; end | |
def context(description, &definition) | |
- @contexts << Context.new("#{@description} #{description}", self, &definition) | |
+ @contexts << self.class.new("#{@description} #{description}", self, &definition) |
echoplex:rhino-test gabriel$ javagem install js | |
Successfully installed js-1.7.2 | |
1 gem installed | |
Installing ri documentation for js-1.7.2... | |
Installing RDoc documentation for js-1.7.2... | |
echoplex:rhino-test gabriel$ echo "gem 'js'" > Gemfile | |
echoplex:rhino-test gabriel$ jam org.mozilla.javascript.tools.shell.Main | |
Rhino 1.7 release 2 2009 03 22 | |
js> |
gabriels-vmware-virtual-platform:~ gabriel$ sudo gem update --system | |
Updating RubyGems... | |
ERROR: While executing gem ... (Gem::RemoteSourceException) | |
HTTP Response 403 fetching http://gems.rubyforge.org/yaml | |
gabriels-vmware-virtual-platform:~ gabriel$ |