Skip to content

Instantly share code, notes, and snippets.

View tisto's full-sized avatar

Timo Stollenwerk tisto

View GitHub Profile
@tisto
tisto / pre-commit
Created August 17, 2012 06:30
Git pre-commit hook for Plone development
#!/usr/bin/python
# http://tech.yipit.com/2011/11/16/183772396/
import os
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
@tisto
tisto / gist:3766288
Created September 22, 2012 14:12
p.a.toolbar act
*** Settings ***
Resource plone/act/keyword.txt
*** Test cases ***
Anonymous shouldn't see toolbar
Log out
Page Should Not Contain Element id=plone-toolbar
Logged in should see toolbar
@tisto
tisto / gist:4997466
Created February 20, 2013 17:48
plone jenkins master
deco plone-4.3-plone-app-contenttypes
deco-acceptance plone-4.3-plone-app-multilingual
deco-docs plone-4.3-pull-requests
Deco-robot plone-4.3-python-2.6
Dexterity_Plone_4.0 plone-4.3-python-2.7
Dexterity_Plone_4.1 plone-4.3-python-2.7-base
mockup plone-4.3-python-2.7-robot
plone-4.0 plone-4.3-python-2.7-robot-windows-2003-chrome24
plone-4.0-git plone-4.3-python-2.7-robot-windows-2003-ie9
plone-4.1 plone-4.3-python-2.7-tests
@tisto
tisto / gist:5394676
Created April 16, 2013 09:38
p.a.discussion edit-comment-form
configure.zcml::
<browser:page
for="plone.app.discussion.interfaces.IComment"
name="edit-comment"
class=".comment.EditComment"
permission="cmf.ModifyPortalContent"
/>
comment.py::
File "/home/timo/.buildout/eggs/robotsuite-1.3.2-py2.7.egg/robotsuite/__init__.py", line 306, in runTest
shutil.copyfile(path, "%s%s" % (prefix, filename))
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: u'robot_test_acceptance_2034_As_editor_I_can_compare_three_audiences_../../../../docs/source/_screenshots/2034_audience_text_comparison.png'
/*jshint strict: true, undef: true*/
/*global $,jQuery,window,document,localStorage,confirm,location,portal_url*/
(function ($) {
"use strict";
$("form#searchform").on("click", "input[type='submit']", function (event) {
event.preventDefault();
$('#solr-suggestions').remove();
var SearchableText = $("input[name='SearchableText']").val();
var url = portal_url + "/@@suggest-terms?term=" + SearchableText;
/test_acceptance_1826.robot': Calling dynamic method 'get_keyword_names' failed: Connecting remote server at http://localhost:55001/plone/RobotRemote failed: <Fault -1: "Unexpected Zope exception: <class 'zExceptions.NotFound'> - Site Error \n An error was encountered while publishing this resource.\n \n Resource not found \n\n Sorry, the requested resource does not exist. Check the URL and try again. Resource: http://localhost:55001/plone/RobotRemote \n \n\n Troubleshooting Suggestions \n\n \n The URL may be incorrect. \n The parameters passed to this resource may be incorrect. \n A resource that this resource relies on may be\n encountering an error. \n \n\n For more detailed information about the error, please\n refer to the error log.\n \n\n If the error persists please contact the site maintainer.\n Thank you for your patience.\n ">
<string>:1: DeprecationWarning: Using len() for getting the actual pagesize is deprecated. Use the `pagesize` attribute instead.
timo@rudolf:~/workspace/krebswegweiser-tmp$ bin/test --all
Running dkg.addresscontenttypes.testing.DkgaddressesLayer:Integration tests:
Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
Set up plone.testing.z2.Startup in 0.199 seconds.
Set up plone.app.testing.layers.PloneFixture in 7.202 seconds.
Set up dkg.addresscontenttypes.testing.DkgaddressesLayer in 6.586 seconds.
Set up dkg.addresscontenttypes.testing.DkgaddressesLayer:Integration in 0.000 seconds.
Ran 91 tests with 0 failures and 0 errors in 1.730 seconds.
Running dkg.consulting.testing.DkgconsultingLayer:Integration tests:
Tear down dkg.addresscontenttypes.testing.DkgaddressesLayer:Integration in 0.000 seconds.
# Install Node 0.8.9
wget http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
tar xfvz node-v0.8.9.tar.gz
cd node-v0.8.9/
./configure
make
make install
npm config set registry http://registry.npmjs.org/
timo@Ubuntu-1204-precise-32-minimal ~ $ npm install -g grunt-cli
npm http GET http://registry.npmjs.org/grunt-cli
npm http 304 http://registry.npmjs.org/grunt-cli
npm ERR! Error: No compatible version found: grunt-cli
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)