Skip to content

Instantly share code, notes, and snippets.

config.generators do |g|
g.test_framework :rspec, :fixture => false
g.view_specs false
g.helper_specs false
end
StringLiterals:
Enabled: false
LineLength:
Max: 99
Encoding:
Enabled: false
HashSyntax:
Enabled: false
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
# mongo_template.rb
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
run "rm public/javascripts/dragdrop.js"
run "rm public/javascripts/effects.js"
run "rm public/javascripts/prototype.js"
class Feature
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Attributes::Dynamic
field :filename, type: String
field :title, type: String
field :description, type: String
field :tags, type: String
Large Object Motions:
(
)
{
}
[[
[]
][
]]
[m
@rocknrollMarc
rocknrollMarc / gist:6dc6de955276c2c13a64
Created August 15, 2014 09:37
ruby Step definition parser cucumber, gherkin
step_definition_dir = "../features/step_definitions"
steps = []
Dir.glob(File.join(step_definition_dir,'**/*.rb')).each do |step_file|
File.new(step_file).read.each_line do |line|
next unless line =~ /^\s*(?:Given|When|Then)\s+\//
matches = /(Given|When|Then)\s*\/(.*)\/([imxo]*)\s*do\s*(?:$|\|(.*)\|)/.match(line).captures
type = matches[0]
matches[1] = Regexp.new(matches[1])
step = matches[1].inspect
step = step[2..step.length-3]
@rocknrollMarc
rocknrollMarc / gist:39779fbb215b78f291f4
Created August 30, 2014 12:26
Padrino FactoryGirl Capybara spec_helper
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV)
require 'rubygems'
require 'spork'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
@rocknrollMarc
rocknrollMarc / apps.rb
Created September 1, 2014 15:58 — forked from achiurizo/apps.rb
# foo.rb
class Foo < ::Sinatra::Base
class << self
def dependencies; []; end
def setup_application!; end
end
get '/' do
'wubwub'
'use strict';
/**
* @ngdoc function
* @name hlApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the hlApp
*/
angular.module('hlApp')