Skip to content

Instantly share code, notes, and snippets.

@yjean
yjean / Gemfile
Created March 22, 2012 14:37
Gemfile "minimal?" pour un framework de test
source 'https://rubygems.org'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
@yjean
yjean / api_posts_integration_test.rb
Created March 22, 2012 14:39
Simple use of capybara-json
require "test_helper"
describe "Posts APIJSon" do
describe Post do
it "returns list of posts in json format" do
10.times {|i| Post.create!(:subject => "Post #{i}", :body => "...", :user => User.new)}
expected_count = Post.all.size
get posts_path(:format => :json)
body.first["id"].must_equal 1
body.size.must_equal expected_count
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
<!-- Happyfication -->
<noscript>
<iframe src="//api-test.hpfy.me/_/ns" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<script>
(function() { var scripts = document.getElementsByTagName('script')[0]; var s = document.createElement('script'); s.async = true; s.src = "//s3.amazonaws.com/happyfier-assets/api_staging.js"; scripts.parentNode.insertBefore(s, scripts); }());
</script>
<!-- End Happyfication -->
utils.js|31 col 4 warning 89| The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
utils.js|28 col 1 warning 117| 'beforeEach' is not defined.
utils.js|49 col 1 warning 117| 'afterEach' is not defined.
utils.js|12 col 5 warning 98| 'sinon' is defined but never used.
models/short_url_domain_spec.js|6 col 1 warning 117| 'describe' is not defined.
models/short_url_domain_spec.js|7 col 3 warning 117| 'describe' is not defined.
models/short_url_domain_spec.js|8 col 5 warning 117| 'it' is not defined.
models/short_url_domain_spec.js|3 col 5 warning 98| 'utils' is defined but never used.
{
"name": "happyfier-apis",
"version": "2.2.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"debug": "DEBUG=happyfier-apis:* node-debug ./bin/www",
"dev": "DEBUG=happyfier-apis:* NODE_ENV=development nodemon ./bin/www",
"test": "DEBUG=happyfier-apis:* NODE_ENV=test mocha --recursive --growl",
"testing": "DEBUG=happyfier-apis:* NODE_ENV=test mocha --recursive --growl -w",

GWI Introduction

Introduction

This document presents GlobalWebIndex data integration with Happyfication trading tool.

Happyfication allows traders to create activations that will trigger some impressions / clicks by internet users. GlobalWebIndex exposes a pixel API to match an Happyfication Internet User with a GWI Panelist.

Linking GWI / Hpfyr