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
| commit f143e8dd0ffd018b59476dd885a9d922b6ca4dd6 | |
| Author: David Henry <dw_henry@yahoo.com.au> | |
| Date: Tue Apr 22 18:30:47 2014 +0100 | |
| Hack on the command line for zsh | |
| diff --git a/lib/history.zsh b/lib/history.zsh | |
| index 6559451..04db917 100644 | |
| --- a/lib/history.zsh | |
| +++ b/lib/history.zsh |
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 ExamplesController < ApplicationController | |
| include Pagination | |
| def index | |
| @examples = Example.order(id: :desc) | |
| render json: { pagination: paginate(@examples), examples: @examples } | |
| end | |
| 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 'file' | |
| class TextToSpec | |
| def initialize(path) | |
| @path = path | |
| end | |
| def run | |
| Dir["#{@path}/test/**/*_test.rb"].each do |path| | |
| next if path =~ %r{/support/} |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 7.
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
| INFO,Downloaded https://docs.google.com/spreadsheet/pub?key=0AmD7K4ab1dYrdDR5c2tITTNHRUZqajFTTU8wODAzZ1E&single=true&output=csv&gid=1400194374 | |
| INFO,Wrote bin/../data//search-results.csv | |
| INFO,Downloaded https://docs.google.com/spreadsheet/pub?key=0AmD7K4ab1dYrdDR5c2tITTNHRUZqajFTTU8wODAzZ1E&single=true&output=csv&gid=9 | |
| INFO,Wrote bin/../data//suggestions.csv | |
| vagrant@development:/var/govuk/rummager$ b bin/health_check -a betademo:nototbeshared | |
| INFO,Connecting to JSON endpoint https://www.gov.uk/api/search.json [auth=yes] | |
| ERROR,Overwriting duplicate check ["dvla contact", "/contact-the-dvla"] | |
| ERROR,Overwriting duplicate check ["travel to brazil", "/foreign-travel-advice/brazil"] | |
| ERROR,Overwriting duplicate check ["ot tax code", "/tax-codes"] | |
| ERROR,Skipping invalid or incomplete row: ,,,,,,,,,,, because: undefined method `split' for nil:NilClass |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 7.
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
| INFO,Downloaded https://docs.google.com/spreadsheet/pub?key=0AmD7K4ab1dYrdDR5c2tITTNHRUZqajFTTU8wODAzZ1E&single=true&output=csv&gid=1400194374 | |
| INFO,Wrote bin/../data//search-results.csv | |
| INFO,Downloaded https://docs.google.com/spreadsheet/pub?key=0AmD7K4ab1dYrdDR5c2tITTNHRUZqajFTTU8wODAzZ1E&single=true&output=csv&gid=9 | |
| INFO,Wrote bin/../data//suggestions.csv | |
| + bundle exec bin/health_check --json=https://www-origin.publishing.service.gov.uk/api/search.json --type=results --auth=betademo:[*******] --rate_limit_token=[*******] | |
| INFO,Connecting to JSON endpoint https://www-origin.publishing.service.gov.uk/api/search.json [auth=yes] | |
| ERROR,Overwriting duplicate check ["dvla contact", "/contact-the-dvla"] | |
| ERROR,Overwriting duplicate check ["travel to brazil", "/foreign-travel-advice/brazil"] | |
| ERROR,Overwriting duplicate check ["ot tax code", "/tax-codes"] | |
| ERROR,Skipping invalid or incomplete row: ,,,,,,,,,,, because: undefined method `split' for nil:NilClass |
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
| # sort by example | |
| class Counter | |
| def initialize | |
| @count = 0 | |
| end | |
| def inc | |
| @count += 1 | |
| end |