Skip to content

Instantly share code, notes, and snippets.

View forkdiffmerge's full-sized avatar

Fork / Diff / Merge forkdiffmerge

View GitHub Profile
system("heroku create #{30.times.map{ ('a'..'z').to_a.sample }.join}")
@forkdiffmerge
forkdiffmerge / Personal-Data-Spheres.md
Last active December 12, 2015 04:09
Exploring Personal Data Spheres Technologies

I've been digging into http://remotestorage.io/ a bit ...

Here's what the spec says a given implementation should do. I love the simplicity:

  • GET a folder: retrieve the names and current versions of the documents and subfolders currently contained by the folder
  • GET a document: retrieve its content type, current version, and contents
  • PUT a document: store a new version, its content type, and contents, conditional on the current version
  • DELETE a document: remove it from the storage, conditional on the current version

Like Git, folders are implicitly created as a side effect of creating documents, and empty folders do not exist.

@forkdiffmerge
forkdiffmerge / uncovered_spec.rb
Created November 7, 2012 17:52 — forked from mbj/uncovered_spec.rb
incomplete specs that trigger uncovered mutations
require 'spec_helper'
describe AliasSet, '#initialize' do
let(:prefix) { :songs }
let(:attributes) { Mapper::AttributeSet.new << attribute }
let(:attribute) { Mapper::Attribute.build(:id, :type => Integer) }
let(:excluded) { [ :id ] }
context 'with prefix passed to #initialize' do
subject { described_class.new(prefix) }