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_helper' | |
class FlowchartsControllerTest < ActionController::TestCase | |
include Devise::TestHelpers | |
test "it sets defaults" do | |
get 'show' | |
assert assigns(:jurisdiction) == "gb" | |
assert assigns(:type) == "Practical" |
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
{ | |
"bot_id": "now-you-was-just-the-kind-of-girl-to-break-my-heart-in-two", | |
"title": "My simple bot", | |
"description": "This is a simple bot", | |
"language": "ruby", | |
"data_type": "address", | |
"files": [ | |
"scraper.rb" | |
], | |
"frequency": "monthly", |
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
{ | |
"bot_id": "test-address-bot", | |
"title": "My simple bot", | |
"description": "This is a simple bot", | |
"language": "ruby", | |
"data_type": "address", | |
"files": [ | |
"scraper.rb" | |
], | |
"frequency": "monthly", |
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
E, [2015-02-13T13:04:17.546047 #223] ERROR -- : Hit error when running container: No such file or directory @ rb_sysopen - /data/output/draft/b/bacon/461/scraper.out | |
E, [2015-02-13T13:04:17.546150 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `initialize' | |
E, [2015-02-13T13:04:17.546244 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `open' | |
E, [2015-02-13T13:04:17.546316 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:94:in `process_script_output' | |
E, [2015-02-13T13:04:17.546377 #223] ERROR -- : /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/turbot-runner-0.1.18/lib/turbot_runner/runner.rb:41:in `process_output' | |
E, [2015-02-13T13:04:17.546455 #223] ERROR -- : /app/lib/turbot_docker_runner.rb:189:in `process_output' | |
E, [2015-02-13T13:04:17.546530 #223] ERROR -- : /app/lib/turbot_docker_runner.rb:35:in ` |
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 'rubygems' | |
require 'httparty' | |
total = 0 | |
success = 0 | |
failure = 0 | |
CSV.open("responses.csv") do |rows| | |
rows.each do |r| | |
response = HTTParty.post("http://sorting-office.openaddressesuk.org/address", body: { |
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
#!/bin/bash | |
for i in 2014-12-10-openaddressesuk*; do | |
open $i | |
cd ${i/\.zip//} | |
ls -a | |
for a in *.csv.zip; do | |
open $a | |
sed -i.bak 's/http:\/\/alpha\./http:\/\//g' *.csv/*.csv | |
sed -i.bak 's/http:\/\/alpha\./http:\/\//g' *.csv |
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
{ | |
"saon": { | |
"name": "823 SALISBURY HOUSE" | |
}, | |
"paon": { | |
"name": "29" | |
}, | |
"street": { | |
"name": "FINSBURY CIRCUS", | |
"geometry": { |
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
Scenario: API call returns pending initially | |
When I request a certificate via the API | |
And I request the results via the API | |
Then the API response should return pending | |
When the certificate is created | |
And I request the results via the API | |
Then the API response should return sucessfully |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 5 columns, instead of 6 in line 5.
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
Username,Age,Height,Weight,Secret | |
,20,,, | |
derp,20,,, | |
derpderpington,20,,, | |
derp-derp,20,,, | |
derpina,20,,,, | |
derpina,25,, | |
derpette,4,,600, | |
grandderp,103,13,, |
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
if [ -f "$rvm_path/scripts/rvm" ]; then | |
source "$rvm_path/scripts/rvm" | |
rvm use . | |
fi |