Skip to content

Instantly share code, notes, and snippets.

View nomasprime's full-sized avatar

Rick Jones nomasprime

View GitHub Profile
Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.5:
https://xquartz.macosforge.org
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libmacfuse_i32.2.dylib
freetype: stable 2.5.1 (bottled)
http://www.freetype.org
/opt/boxen/homebrew/Cellar/freetype/2.5.1 (59 files, 2.6M) *
Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/freetype.rb
==> Dependencies
Required: libpng ✔
==> Options
--universal
Build a universal binary
Notice: /Stage[main]/Habitullence::Vim/File[/Users/rick/.vim/vundle/ctrlp.vim]/content: content changed '{md5}c6fc3a3a23ae4d832fcc697ecf8282cd' to '{md5}bcce34f6ad5be39b736c573ec94213d8'
Notice: /Stage[main]/Homebrew/File[/opt/boxen/cache/homebrew]/group: group changed 'staff' to 'admin'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `materialize': Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from
/o/b/homebrew git:master ❯❯❯ brew install php54 -v ✚ ◼
==> Downloading http://www.php.net/get/php-5.4.22.tar.bz2/from/this/mirror
Already downloaded: /opt/boxen/cache/homebrew/php54-5.4.22
tar xf /opt/boxen/cache/homebrew/php54-5.4.22
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file configure
Hunk #1 succeeded at 39208 (offset 931 lines).
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
class AdminBound < ActiveRecord::Base
scope :sites, -> {
where(arel_table[:iso].eq('BRA').and(Arel::Nodes::NamedFunction.new('st_contains', [arel_table[:geom], Site.arel_table[:lonlat]]))).project(Site.arel_table[Arel.star])
}
end
class CreateAdminBoundsSchema < ActiveRecord::Migration
def change
reversible do |dir|
dir.up do
execute <<-SQL
CREATE SCHEMA IF NOT EXISTS admin_bounds;
CREATE EXTENSION IF NOT EXISTS postgis SCHEMA admin_bounds;
CREATE EXTENSION IF NOT EXISTS hstore SCHEMA admin_bounds;
SQL
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
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 '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 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