Skip to content

Instantly share code, notes, and snippets.

View nomasprime's full-sized avatar

Rick Jones nomasprime

View GitHub Profile
{% set roleList = [
{
name: 'select.role.founder',
value: 'founder'
},
{
name: 'select.role.invester',
value: 'invester'
},
{
@nomasprime
nomasprime / gist:a1f785f855a1495dfce4
Last active August 29, 2015 14:19
No Fabricator defined for 'user' (Fabrication::UnknownFabricatorError) backtrace
Given I can start some tasks # features/step_definitions/task_steps.rb:1
No Fabricator defined for 'user' (Fabrication::UnknownFabricatorError)
/vagrant/vendor/bundle/ruby/2.1.0/gems/fabrication-2.13.1/lib/fabricate.rb:38:in `schematic'
/vagrant/vendor/bundle/ruby/2.1.0/gems/fabrication-2.13.1/lib/fabricate.rb:29:in `create'
/vagrant/vendor/bundle/ruby/2.1.0/gems/fabrication-2.13.1/lib/fabrication.rb:62:in `Fabricate'
/vagrant/features/step_definitions/task_steps.rb:2:in `block in <top (required)>'
/vagrant/vendor/bundle/ruby/2.1.0/gems/cucumber-1.3.18/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
/vagrant/vendor/bundle/ruby/2.1.0/gems/cucumber-1.3.18/lib/cucumber/core_ext/instance_exec.rb:48:in `block in cucumber_instance_exec'
/vagrant/vendor/bundle/ruby/2.1.0/gems/cucumber-1.3.18/lib/cucumber/core_ext/instance_exec.rb:69:in `cucumber_run_with_backtrace_filtering'
/vagrant/vendor/bundle/ruby/2.1.0/gems/cucumber-1.3.18/lib/cucumber/core_ext/in
@nomasprime
nomasprime / error
Last active September 14, 2015 16:47
/Users/rick/Organisations/playtimestudios/admin_bounds/spec/lib/install_generator_spec.rb:1:in `<top (required)>': uninitialized constant InstallGenerator (NameError)
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load'
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
from /Users/rick/Organisations/playtimestudios/admin_bounds/vendor/bundle/gems/rspec-core-3.3.2/lib/rspec/core/r
class Survey < ActiveRecord::Base
acts_as_paranoid
include Importable
###### Associations ########
belongs_to :project
belongs_to :publication, counter_cache: true
belongs_to :site
belongs_to :location_type, :class_name => ListItem, :foreign_key => "location_type_id"
belongs_to :study_design, :class_name => ListItem, :foreign_key => "study_design_id"
require 'rails/generators/active_record'
module ActiveRecord
module Generators
class AdminBoundsGenerator < ActiveRecord::Generators::Base
source_root File.expand_path('../templates', __FILE__)
def copy_migration
migration_template 'migration.rb', "db/migrate/admin_bounds_create_#{table_name}.rb"
binding.pry
class Application < Rails::Application
config.middleware.insert_after ActionDispatch::Session::CookieStore,
FayeRails::Middleware,
extensions: [Faye::Extensions::AuthenticationExtension.new],
engine: { type: Faye::Redis, host: 'localhost' },
mount: '/rt',
timeout: 25 do
map '/runbook/**' => RealtimeController
end
...
module Cucumber
module Ast
class TreeWalker
alias_method :visit_features_alias, :visit_features
def visit_features(features)
EM.synchrony do
visit_features_alias features
EM.stop
end
require 'rails/generators/active_record'
module ActiveRecord
module Generators
class AdminBoundsGenerator < ActiveRecord::Generators::Base
source_root File.expand_path('../templates', __FILE__)
puts 'here'
puts behavior
def copy_migration
migration_template 'migration.rb', "db/migrate/admin_bounds_create_#{table_name}.rb"
module AdminBounds
describe Osmosis do
context 'when pbf file does not exist' do
subject(:osmosis) { Osmosis.new('no.osm.pbf') }
before { osmosis.import_administrative_boundaries }
it { is_expected.to raise_error(RuntimeError) }
end
end
end
require 'spec_helper'
module AdminBounds
describe Osmosis do
context 'when pbf file does not exist' do
subject(:osmosis) { Osmosis.new('no.osm.pbf') }
it 'raises runtime error' do
expect { osmosis.import_administrative_boundaries }.to raise_error(RuntimeError)
end