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
#!/usr/bin/ruby | |
class BasicShell | |
attr_reader :env | |
def initialize | |
@env={ } | |
@env["prompt"] = "b> " | |
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
# this is a test script | |
ls "/Users" | |
cd "/Users/franco" | |
cat ".zshrc" | |
pwd | |
let "foo", "bar" | |
echo "lets all goto the $foo" | |
let "x", (1+1) | |
echo "$x should be two" | |
echo "done" |
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
#!/usr/bin/ruby | |
class BasicShell | |
attr_reader :env | |
def initialize | |
@env={ } | |
@env["prompt"] = "b> " | |
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
XML::Error.set_handler(&XML::Error::QUIET_HANDLER) |
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
<premis xmlns="info:lc/xmlns/premis-v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"> | |
<object xsi:type="representation"> | |
<objectIdentifier> | |
<objectIdentifierType>URI</objectIdentifierType> | |
<objectIdentifierValue>info:fcla/daitss/E20090225_AAAIWH</objectIdentifierValue> | |
</objectIdentifier> | |
</object> | |
<event> | |
<eventIdentifier> | |
<eventIdentifierType>URI</eventIdentifierType> |
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
# demonstrate how to extract schema locations and stylesheets from an xml document | |
# also show how to resolve namespaces against pre determined schema implementations | |
# references used: | |
# http://libxml.rubyforge.org/rdoc/index.html | |
# http://www.w3.org/TR/xml-stylesheet/ | |
require 'libxml' | |
require 'enumerator' |
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
# Changed but not updated: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: test-packages/aips/good/file-md/FILE-0/.keep | |
# | |
# Untracked files: | |
# (use "git add <file>..." to include in what will be committed) | |
# | |
# DescribeService.log |
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
md5 = Digest::MD5.new | |
md5 << File.read(filename) | |
puts [md5.hexdigest.scan(/../).pack("H2" * 16)].pack("m").chomp |
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
last_response.body.should have_selector('h2') do |tag| | |
tag.should match_selector('.disabled') | |
tag.should contain('document is not well-formed') | |
end | |
# cucumber/rack-test output | |
expected following output to contain a <.disabled/> tag: | |
<h2 class="disabled">document is not well-formed</h2> (Spec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/validation/validation_heading_steps.rb:8:in `__instance_exec0' | |
./features/step_definitions/validation/validation_heading_steps.rb:7:in `/^all headings except well formedness are visually disabled$/' |
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
Given I navigate to the validation form page # features/step_definitions/validation/input_steps.rb:3 | |
undefined method `assert' for #<Rack::Lint:0x1a13d70 @app=Sinatra::Application> (NoMethodError) | |
(eval):7:in `get' | |
(eval):2:in `visit' | |
./features/step_definitions/validation/input_steps.rb:4:in `/^I navigate to the validation form page$/' | |
features/validationinput.feature:5:in `Given I navigate to the validation form page' |