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 stdout_readline(process): | |
| return process.stdout.readline() | |
| def make_web_readline(url): | |
| def web_readline(process): | |
| return urlopen(url).read() | |
| return web_readline | |
| def run_logger(server_process, name, readline): |
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
| from collections import deque | |
| from cherrypy import expose | |
| stdout = deque() | |
| def log(message): | |
| stdout.append(message) | |
| class WebServer: |
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 | |
| if [ $# -ne 1 ]; then | |
| echo "usage: $(basename $0) DB" | |
| exit 1 | |
| fi | |
| case $1 in | |
| -h | --help ) echo "usage: $(basename $0) DB"; exit;; | |
| esac |
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
| server { | |
| listen 4433; | |
| server_name localhost; | |
| location / { | |
| proxy_pass http://localhost:5984; | |
| proxy_intercept_errors on; | |
| proxy_redirect off; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; |
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/env python | |
| from urllib2 import urlopen | |
| class TooBig(Exception): pass | |
| def download(url, max_size): | |
| fo = urlopen(url) | |
| size = int(fo.headers.get("Content-Length", 0)) | |
| if size and (size > max_size): |
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
| curl -X PUT localhost:5984/chefs/_revs_limit -d '10' | |
| {"error":"{{badmatch,{error,enospc}},\n [{couch_db_updater,commit_data,2},\n {couch_db_updater,handle_call,3},\n {gen_server,handle_msg,5},\n {proc_lib,init_p_do_apply,3}]}","reason":"{gen_server,call,[<0.25490.10>,{set_revs_limit,10},infinity]}"} |
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 ValidatorException(Exception): pass | |
| class Validated: | |
| __fields__ = {} # field -> validator list | |
| def validate(self): | |
| errors = [] | |
| for field, validators in self.__fields__.iteritems(): | |
| if not hasattr(self, field): | |
| errors.append("field %s missing" % field) |
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 Validated: | |
| __fields__ = {} # field -> validator list | |
| def validate(self): | |
| errors = [] | |
| for field, validators in self.__fields__.iteritems(): | |
| if not hasattr(self, field): | |
| errors.append("field %s missing" % field) | |
| continue | |
| field_errors = [] |
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
| . | |
| |-- Makefile | |
| |-- README.rst | |
| |-- LICENSE.txt | |
| |-- build-cxfreeze | |
| |-- clean.py | |
| |-- cxfreeze_setup.py | |
| |-- docs | |
| | |-- images | |
| | | |-- SauceRC_config.png |
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
| >>> sel.get_text("css=.spec.failed") | |
| u"should show more bet activities when click on the more button for pagination: https://saucelabs.com/jobs/f00def4823cd53312bc71f9d11eba0ac execution expired\n /mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:19:in `string_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:56:in `boolean_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/generated_driver.rb:1088:in `is_element_present'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:260:in `assert_no_server_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:248:in `assert_no_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:183:in `wait_for_load'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:233: |
NewerOlder