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
| package silly; | |
| import org.junit.Test; | |
| public class ReallyDont { | |
| public boolean doIt() { return true; } | |
| public void reallyReally() { | |
| if ( !!!doIt() ) { |
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' | |
| $alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
| $rot13 = 'nopqrstuvwxyzabcdefghijklm' | |
| class Rot13 < Test::Unit::TestCase | |
| @@message = "the quick brown fox jumps over the lazy dog" | |
| @@encoded = "gur dhvpx oebja sbk whzcf bire gur ynml qbt" |
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 'set' | |
| class FileParser | |
| def initialize filename | |
| @set = IO.readlines(filename).collect{ |s| s.split(',').map!{ |t| t.strip } }.flatten.to_set | |
| end | |
| def match? value | |
| @set.include? value |
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
| class Filter | |
| def initialize directory | |
| @directory = directory | |
| end | |
| def filter regex=".*" | |
| entries = Dir.entries @directory | |
| entries.reject { |e| !( e =~ /#{regex}/ ) } | |
| 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
| #I'm having a verify issue with gimme, I don't know if I've written the verify wrong or if gimme | |
| # does not support matches against Java classes. | |
| # | |
| require 'gimme' | |
| require 'orchestrator' | |
| java_import java.util.Calendar | |
| describe Orchestrator 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
| require 'gimme' | |
| require 'demeter' | |
| BASE_DIR = "/tmp" | |
| module DemeterHelper | |
| def default_config | |
| config = Hash.new | |
| config[:service] = :service | |
| 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
| require 'my' | |
| module MyHelper | |
| def default_config | |
| config = Hash.new | |
| config[:stuff] = :stuff | |
| end | |
| end | |
| module My |
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
| [user] | |
| name = Rich Dammkoehler | |
| email = rpd@noradltd.com | |
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| showbranch = auto | |
| [alias] | |
| b = branch |
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
| (global-auto-revert-mode 1) | |
| (global-linum-mode 1) | |
| (set-cursor-color "red") | |
| (set-mouse-color "goldenrod") | |
| (set-face-background 'region "blue") | |
| (set-foreground-color "white") | |
| (set-background-color "black") |
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
| def read filename | |
| @logger.info "reading #{filename}" | |
| rows = CSV.read filename | |
| @keys = rows.shift | |
| @keys.collect! { |key| key.strip.intern } | |
| rows.each { |row| | |
| row_hash = {} | |
| row.each_index { |index| | |
| row_hash[@keys[index]] = row[index] | |
| } |