Skip to content

Instantly share code, notes, and snippets.

View jomag's full-sized avatar

Jonatan Magnusson jomag

View GitHub Profile
require "HTTParty"
class Foo
include HTTParty
base_uri "https://someserver.com/foo"
def initialize(api_key)
@api_key = api_key
@headers = { "X-API-Key" => @api_key }
end
This test complains that @controller is nil:
# -*- coding: utf-8 -*-
require 'test_helper'
class Admin::ProductGroupsControllerTest < ActionController::TestCase
test "should show new product group form" do
login_with_role 'employee'
get :new
@jomag
jomag / linux-amun
Last active September 14, 2016 20:46
Build Configuration:
BB_VERSION = "1.30.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Debian-8.5"
TARGET_SYS = "arm-oe-linux-gnueabi"
MACHINE = "amun-bbg"
DISTRO = "griffin"
DISTRO_VERSION = "0.0.1"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa8"
TARGET_FPU = "hard"
ERROR: griffin-dev-image-1.0-r0 do_rootfs: Error executing a python function in exec_python_func() autogenerated: │~
│~
The stack trace of python calls that resulted in this exception/failure was: │~
File: 'exec_python_func() autogenerated', lineno: 2, function: <module> │~
Code:
<%= form_tag admin_product_path(@next), :method => :get, :style => 'display: inline' do %>
<%= hidden_field_tag 'p', params[:p] %>
<button class="icon-button flat" style="margin-top: 3px;">
<%= image_tag 'icons/next.png' %>
</button>
<% end %>