Skip to content

Instantly share code, notes, and snippets.

@lfryc
lfryc / Foo.java
Created February 5, 2014 10:19 — forked from jhuska/Foo.java
@Override
public boolean canEnhance(InstanceOrCallableInstance instance, Class<?> droneType, Class<? extends Annotation> qualifier) {
if (RemoteWebDriver.class == droneType || ReusableRemoteWebDriver.class == droneType) {
return true;
}
Class<?> realInstanceClass = instance.asInstance(droneType).getClass();
if (RemoteWebDriver.class == realInstanceClass || ReusableRemoteWebDriver.class == realInstanceClass)
@lfryc
lfryc / gist:9366205
Last active August 29, 2015 13:57
Docker for arquillian.github.com development with Awestruct
image based on paintedfox/ruby
download and run image (as root)
$ docker pull lfryc/arquillian-awestruct
$ docker run -p 4242:4242 -i -t lfryc/arquillian-awestruct /bin/bash
this has exposed the running system on your machine's port 4242
once in the image:
/**
* JBoss, Home of Professional Open Source
* Copyright 2012, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
@lfryc
lfryc / ByNG.java
Last active August 29, 2015 14:00
Graphene / Angular integration
package io.graphene.ng;
import java.lang.annotation.Annotation;
import java.util.List;
import org.jboss.arquillian.graphene.findby.ByJQuery;
import org.jboss.arquillian.graphene.spi.findby.LocationStrategy;
import org.openqa.selenium.By;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebElement;
@lfryc
lfryc / gist:2bd19370d59b66f0e7eb
Created May 1, 2014 13:23
Data Synchronization Projects
http://couchdb.apache.org/
https://cloudant.com/blog/pouchdb/#.U2I4w3Un9XM
http://remotestorage.io/
https://github.com/creationix/jsgit
12:55:20,952 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./ag-push: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ag-push: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:216)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
at org.wildfly.extension.undertow.de
Results :
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0
window.Graphene = window.Graphene || {};
window.Graphene.Page = window.Graphene.Page || {};
window.Graphene.Page.XHRHalter = (function() {
var STATE_CONSTRUCT = -3,
STATE_OPEN = -2,
STATE_SEND = -1,
STATE_UNITIALIZED = 0,
warp-rest/impl/impl-cxf/src/main/java/org/jboss/arquillian/extension/rest/warp/impl/cxf/interceptor/CxfContextBuilder.java
303: RestContextImpl restContext = (RestContextImpl) servletRequest.getAttribute(WarpRestCommons.WARP_REST_ATTRIBUTE);
308: servletRequest.setAttribute(WarpRestCommons.WARP_REST_ATTRIBUTE, restContext);
warp-rest/impl/impl-base/src/test/java/org/jboss/arquillian/extension/rest/warp/impl/provider/RestContextProviderTestCase.java
78: when(servletRequest.getAttribute(WarpRestCommons.WARP_REST_ATTRIBUTE)).thenReturn(restContext);
141: when(servletRequest.getAttribute(WarpRestCommons.WARP_REST_ATTRIBUTE)).thenReturn(null);
warp-rest/impl/impl-base/src/main/java/org/jboss/arquillian/extension/rest/warp/impl/provider/RestContextProvider.java
62: RestContext restContext = (RestContext) request.getAttribute(WarpRestCommons.WARP_REST_ATTRIBUTE);
{
"status": 401 // this doesn't have to be repeated, since it is in HTTP header
"message": "Something failed", // a client-facing meaningful/descriptive message
"exception": "SomeException", // this is helpful to nail down error message
"code": 10034 // this is helpful to point user to particular configuration section, etc.
"more_info": "http://www.." // where client can get more information