Skip to content

Instantly share code, notes, and snippets.

View stevenheidel's full-sized avatar

Steven Heidel stevenheidel

View GitHub Profile
@stevenheidel
stevenheidel / changelog_maker.rb
Created July 1, 2010 01:58
Used to generate the initial refinerycms changelog
require 'rubygems'
require 'octopi'
include Octopi
refinerycms = {:user => "resolve", :repo => "refinerycms"}
tags = Tag.all(refinerycms)
puts "Getting tags.........."
tags.map! do |tag|
Using the default profile...
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:8: warning: already initialized constant VERSION
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:9: warning: already initialized constant BINARY
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:10: warning: already initialized constant LIBDIR
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:11: warning: already initialized constant JRUBY
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:12: warning: already initialized constant IRONRUBY
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:13: warning: already initialized constant WINDOWS
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cucumber/platform.rb:14: warning: already initialized constant OS_X
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/cucumber-0.8.3/lib/cu
steven@steven-laptop ~/refinerycms/master $ cucumber
Using the default profile...
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/json_pure-1.4.6/lib/json/common.rb:65: warning: already initialized constant State
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/json_pure-1.4.6/lib/json/common.rb:66: warning: already initialized constant SAFE_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/json_pure-1.4.6/lib/json/common.rb:67: warning: already initialized constant FAST_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/json_pure-1.4.6/lib/json/common.rb:74: warning: already initialized constant PRETTY_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/json_pure-1.4.6/lib/json/ext.rb:14: warning: already initialized constant JSON_LOADED
...........................................................................................F------.....Error during failsafe response: ActionView::Template::Error
/home/steven/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.0.rc/lib/active_support/whiny_
steven@steven-laptop ~/refinerycms/master $ irb
ruby-1.9.2-p0 > `false`
=> ""
ruby-1.9.2-p0 > $?.to_i
=> 256
ruby-1.9.2-p0 > `rails new` # empty
Options should be given after the application name. For details run: rails --help
=> ""
ruby-1.9.2-p0 > $?.to_i
=> 0
(Not running features. To run features in autotest, set AUTOFEATURE=true.)
(Not running features. To run features in autotest, set AUTOFEATURE=true.)
loading autotest/rails_rspec2
style: RailsRspec2
/home/steven/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -rrubygems /home/steven/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.0.0.beta.19/bin/rspec /home/steven/refinerycms/master/spec/models/refinery/page_spec.rb
/home/steven/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:65: warning: already initialized constant State
/home/steven/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:66: warning: already initialized constant SAFE_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:67: warning: already initialized constant FAST_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:74: warning: already initialized constant PRETTY_STATE_PROTOTYPE
/home/steven/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/pure.rb
actionpack (3.0.0.rc2) lib/action_view/helpers/asset_tag_helper.rb:905:in `asset_file_path!'
actionpack (3.0.0.rc2) lib/action_view/helpers/asset_tag_helper.rb:871:in `block in ensure_stylesheet_sources!'
actionpack (3.0.0.rc2) lib/action_view/helpers/asset_tag_helper.rb:870:in `each'
actionpack (3.0.0.rc2) lib/action_view/helpers/asset_tag_helper.rb:870:in `ensure_stylesheet_sources!'
actionpack (3.0.0.rc2) lib/action_view/helpers/asset_tag_helper.rb:508:in `stylesheet_link_tag'
vendor/refinerycms/core/app/views/admin/_head.html.erb:19:in `_vendor_refinerycms_core_app_views_admin__head_html_erb__255557334_92312660__357920664'
actionpack (3.0.0.rc2) lib/action_view/template.rb:135:in `block in render'
activesupport (3.0.0.rc2) lib/active_support/notifications.rb:54:in `instrument'
actionpack (3.0.0.rc2) lib/action_view/template.rb:127:in `render'
actionpack (3.0.0.rc2) lib/action_view/render/partials.rb:294:in `render_partial'
require 'rubygems'
require 'octopi'
include Octopi
project2 = "resolve/refinerycms"
project1 = "radiant/radiant"
def toolbox_score(path)
repo = Repository.find(:user => path.split("/").first, :repo => path.split("/").last)
score = repo.forks * 4 + repo.watchers
(::) failed steps (::)
undefined method `name' for nil:NilClass (NoMethodError)
<internal:prelude>:10:in `synchronize'
./features/step_definitions/web_steps.rb:35:in `block (2 levels) in <top (required)>'
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:34:in `/^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/'
features/refinery/manage_inquiries.feature:26:in `And I follow "Update who gets notified"'
undefined method `name' for nil:NilClass (NoMethodError)
# Go through all the engine's locales
Dir["vendor/refinerycms/**/config/locales"].each do |dir|
# Open the en and lolcat locales to an array
english = IO.readlines(dir + "/en.yml")
lolcat = IO.readlines(dir + "/lolcat.yml")
english.size.times do |i|
# Make sure keys are correct
lolcat[i].sub!(/(.*:)/, english[i].match(/(.*:).*/)[1]) rescue nil
@stevenheidel
stevenheidel / ar_object_count.rb
Created October 26, 2010 22:46
Return Number of AR Objects with same start_at property
looked_at = []
count = 0
Object.all.each do |obj|
if looked_at.include?(obj.start_at)
count += 1
else
looked_at << obj.start_at
end
end