Skip to content

Instantly share code, notes, and snippets.

View phiggins's full-sized avatar

pete higgins phiggins

View GitHub Profile
@phiggins
phiggins / broken_sexp_sort.rb
Created August 1, 2012 06:17
broken_sexp_sort.rb
require 'rubygems'
require 'sexp_processor'
#def uses_if
# if some_func
# if some_other_func
# return
# end
# end
#end
@phiggins
phiggins / gist:2958393
Created June 20, 2012 06:10
heckle ruby_parser failures
pete@balloon ~/projects/heckle $ rake
/home/pete/.rvm/rubies/ruby-1.8.7-p358/bin/ruby -w -I../../ParseTree/dev/lib:../../ParseTree/dev/test:../../RubyInline/dev/lib:../../ruby2ruby/1.3.1/lib:../../ZenTest/dev/lib:../../sexp_processor/dev/lib:lib:lib:bin:test:. -e 'require "rubygems"; require "test/unit"; require "test/test_heckle.rb"' --
Loaded suite -e
Started
...............EE........F..F..............
Finished in 14.142885 seconds.
1) Error:
test_default_structure(TestHeckleClassMethod):
NoMethodError: undefined method `first' for nil:NilClass
@phiggins
phiggins / gist:2296350
Created April 3, 2012 23:35
Refinery failures without refinery_pages slug field.
[16:33:04 refinerycms (master *)]$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: pages/db/migrate/20100913234708_create_refinerycms_pages_schema.rb
#
no changes added to commit (use "git add" and/or "git commit -a")
[16:33:06 refinerycms (master *)]$ git diff
[16:37:44 refinerycms (2-0-stable u=)]$ rvm --force gemset empty && rm Gemfile.lock && rm -rf spec/dummy/ && bundle && rake refinery:testing:dummy_app && rake spec
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2)
Installing i18n (0.6.0)
Installing multi_json (1.1.0)
Installing activesupport (3.2.2)
Installing builder (3.0.0)
Installing activemodel (3.2.2)
Installing erubis (2.7.0)
@phiggins
phiggins / gist:1893991
Created February 23, 2012 17:46
Ruby2Ruby
$ irb
rubinius-2.0.0dev :001 > some_code = "a = 123"
=> "a = 123"
rubinius-2.0.0dev :002 > some_code.to_sexp
=> [:lasgn, :a, [:lit, 123]]
rubinius-2.0.0dev :003 > require 'ruby2ruby'
=> true
rubinius-2.0.0dev :004 > Ruby2Ruby.new.process(some_code.to_sexp)
=> "a = 123"
@phiggins
phiggins / bar_test.rb
Created February 4, 2012 23:09
MiniTest commandline
require 'minitest/autorun'
describe "bar" do
it "tests stuff" do
assert true
end
end
[14:18:47 tera-refinery (substantial-mvp u=)]$ for i in 1.9.2 1.9.3 1.9.3-perf ; do rvm use "$i"@tera-refinery && time rspec ; doneUsing /Users/pete/.rvm/gems/ruby-1.9.2-p290 with gemset tera-refinery
:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /Users/pete/.rvm/gems/ruby-1.9.2-p290@tera-refinery/gems/resque-1.18.6/lib/resque/server.rb:12:in `<class:Server>'
...................................................................................
Finished in 11.24 seconds
83 examples, 0 failures
real 0m33.571s
user 0m26.964s
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2N1G10hpUUPw0TRrn4TiLWVi9DIxWG1JfEjrhYo1aX8A4g9L6Ur+ttC+tIqKmTad+xeg3QnIG8V8u1ld/Q+z8kUXvBAfBCtTHKsFFPF6i+FbYyOznDjtvLmHS9+YzKZJXLqtwi5cN766bzaGHfxv0pF6iP3x1idiQo6h25muopWfsxapWGph7Gaanv/cXuCW+qc6LoIIOLwO0veyfpT3sdk9rQN3WqVdKuCJcght0x7ROpgNsuUkFPUNpu1fR4/Jjd1X3YKR0G6aHBlyP0vG9lsSBNkr0gZJTVfWiRFmzz2rwK+3Sg0jTybq5eh+xJ2l/dJXKkNFFuqwiBCmifUVX pete@peterhiggins.org
pete@balloon ~/work/refinerycms-blog $ bundle
Updating git://github.com/resolve/refinerycms.git
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "railties":
In Gemfile:
refinerycms-testing (>= 0) ruby depends on
railties (< 5.0, >= 3.2.0.beta) ruby
rails (~> 3.1.3) ruby depends on
railties (3.1.3)
[19:17:58 refinerycms-blog (rails-3-1 u=)]$ rm Gemfile.lock ; rvm --force gemset empty && bundle
rm: Gemfile.lock: No such file or directory
Updating git://github.com/resolve/refinerycms.git
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "coffee-rails":
In Gemfile:
refinerycms-blog (>= 0) ruby depends on
coffee-rails (~> 3.2.1) ruby
coffee-rails (3.1.0)