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
<html> | |
<head> | |
<script id="form-element-template" type="text/x-handlebars-template"> | |
<td> | |
<label for='{{id}}'>{{label}}</label> | |
</td> | |
<td> | |
<input {{#options}}data-{{name}}='{{value}}' {{/options}} id='{{id}}' type='{{type}}'></input> | |
</td> | |
</script> |
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
<html> | |
<head> | |
<script id="form-element-template" type="text/x-handlebars-template"> | |
<td> | |
<label for='{{id}}'>{{label}}</label> | |
</td> | |
<td> | |
<input {{#options}}data-{{name}}='{{value}}' {{/options}} id='{{id}}' type='{{type}}'></input> | |
</td> | |
</script> |
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
<html> | |
<head> | |
<script id="form-template" type="text/x-handlebars-template"> | |
{{#formElements}} | |
<tr> | |
<td> | |
<label for='{{id}}'>{{label}}</label> | |
</td> | |
<td> | |
<input {{#options}}data-{{name}}='{{value}}' {{/options}} id='{{id}}' type='{{type}}'></input> |
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
<html> | |
<head> | |
<script id="form-template" type="text/x-handlebars-template"> | |
{{#formElements}} | |
<tr> | |
<td> | |
<label for='{{id}}'>{{label}}</label> | |
</td> | |
<td> | |
<input {{options}} id='{{id}}' type='{{type}}'></input> |
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 'nokogiri' | |
require 'open-uri' | |
require 'couchrest' | |
database_uri = "http://mikeymckay.couchone.com/capital-bikeshare" | |
#database_uri = "http://mikeymckay:cln7qzw.@mikeymckay.cloudant.com/capital-bikeshare" | |
#database_uri = "http://localhost:5984/test" | |
current_time = Time.now.to_i |
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
[remote "origin"] | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
url = git@github.com:mikeymckay/capital-bikeshare-station-monitor.git | |
push = +refs/heads/master:refs/heads/master | |
push = +refs/heads/master:refs/heads/gh-pages |
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
#!/bin/bash | |
while read line; do | |
echo $line | |
if [[ "$line" =~ In ]]; then | |
echo $line | |
mplayer "/home/crazy/Old Home Folders/crazy/src/GPRS_Easy_Connect_301/data/share/gprsec/sounds/error.wav" | |
notify-send "$line" | |
fi | |
done |
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
After do |scenario| | |
if scenario.exception and scenario.exception.message.match(/(expected #has_content)|(found)/) | |
name = File.join(*["/tmp", "capybara-#{Time.new.strftime("%Y%m%d%H%M%S")}.html"].compact) | |
unless Capybara.save_and_open_page_path.nil? || File.directory?(Capybara.save_and_open_page_path ) | |
FileUtils.mkdir_p(Capybara.save_and_open_page_path) | |
end | |
FileUtils.touch(name) unless File.exist?(name) | |
tempfile = File.new(name,'w') |
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
Then /^lynxdump the page$/ do | |
name = File.join(*[Capybara.save_and_open_page_path, "capybara-#{Time.new.strftime("%Y%m%d%H%M%S")}.html"].compact) | |
unless Capybara.save_and_open_page_path.nil? || File.directory?(Capybara.save_and_open_page_path ) | |
FileUtils.mkdir_p(Capybara.save_and_open_page_path) | |
end | |
FileUtils.touch(name) unless File.exist?(name) | |
tempfile = File.new(name,'w') | |
tempfile.write(body) |