View gui.txt
An UI has several parts:
1. The "Layout": Defines the space each control takes. "This button is 32x32 px and is located in 100,100"
2. The "Function": what happens when a control is used. "This needs to happen when this button is pressed"
3. The "Skin": how each control is displayed. "This button, with this state, is a red circle"
4. Bells and whistles: Things like state animations, or playing a sound when a button is hovered.
5. Current focus.
6. A way to handle input: Move focus to next item. "There is a pointer pressing on this position".
Problems:
View busted.md

What I would change about busted

This document describes my thoughts on busted. My opinion on the tool is an ever-evolving thing, so these are not set in stone. I am writing them here to encourage discussion, more than to convince anyone.

1. Remove the "automatic Lua detection logic"

(This might have been removed on latest busted versions)

busted does this thing where it "tries to be smart" and use the "most appropiate" version of Lua available on your system.

View wanderer error
Process: love [50818]
Path: /Users/USER/Downloads/*/Wanderer.app/Contents/MacOS/love
Identifier: com.RedCloakGames.Wanderer
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: love [50818]
User ID: 501
Date/Time: 2015-09-21 22:03:37.327 +0200
View kaminari_initializer.rb
Kaminari.configure do |config|
# config.default_per_page = 25
# config.max_per_page = nil
# config.window = 4
# config.outer_window = 0
# config.left = 0
# config.right = 0
# config.page_method_name = :page
# config.param_name = :page
end
View with_block.rb
class Comment < ActiveRecord::Base
validate do
validator = ActiveModel::Validations::LengthValidator.new(
attributes: :body,
minimum: 10,
maximum: Comment.body_max_length)
validator.validate(self)
end
View telemaco-vagrant vagrant up log
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
default: The Berkshelf shelf is at "/Users/kikito/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150731-16929-7x0hdo-default"
==> default: Sharing cookbooks with VM
==> default: Importing base box 'opscode_debian-8.1'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: participacion_default_1438338885807_45836
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'participacion' from source at chef/participacion
View categories.json
[ {"id": 1, "name": "First class"}, {"id": 2, "name": "Second class"} ]
View assert_contains.lua
local s = require("say")
local function contains(container, contained)
if container == contained then return true end
local t1,t2 = type(container), type(contained)
if t1 ~= t2 then return false end
if t1 == 'table' then
for k,v in pairs(contained) do
if not contains(container[k], v) then return false end
View yo_spec.lua
local spec = require 'spec'
local yo = require 'yo-api.yo'
describe("yo-api", function()
describe("when the uri is /", function()
it("sends an email and a notification", function()
local request = { method = 'GET', url = '/?username=peter' }
local expected_backend_request = { method = 'GET', url = '/?username=peter', headers = {['Content-Type'] = 'application/json'}}
local next_middleware = function(req, next_middleware)
assert.contains(req, expected_backend_request) -- new assertion
View yo_spec.lua
local spec = require 'spec'
local yo = require 'yo-api.yo'
describe("yo-api", function()
describe("when the uri is /", function()
it("sends an email and a notification", function()
local request = { method = 'GET', url = '/?username=peter' }
local expected_backend_request = { method = 'GET', url = '/?username=peter', headers = {['Content-Type'] = 'application/json'}}
local tester = spec.new(yo)