Skip to content

Instantly share code, notes, and snippets.

Steven Noble snoblenet

Block or report user

Report or block snoblenet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View url2png-v6.php
<?php
function url2png_v6($url, $args) {
# Get your apikey from http://url2png.com/plans
$URL2PNG_APIKEY = "PXXXX";
$URL2PNG_SECRET = "SXXXX";
# urlencode request target
$options['url'] = urlencode($url);
View gist:282263
syntax error on line 4, col 0: `wip: --tags @wip:3 --wip features'
YAML:
default: --format pretty /Users/steven/Drominay/features/3_part_tasks.feature:1:39
39
--format rerun --out rerun.txt --strict --tags ~@wip
wip: --tags @wip:3 --wip features
(ArgumentError)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load'
View gist:282265
module Cucumber
module Cli
class ProfileLoader
def initialize
@cucumber_yml = nil
end
def args_from(profile)
View gist:282274
Scenario: view part index
Given a project, part, solution and image exist
And a user called "Droboy" is logged in
When I am at the "Projects" page
And I follow "Shower system"
And I follow "Browse Parts"
Then the main heading should be "Browse Parts"
And the breadcrumbs should include "This Project"
And the final breadcrumb should be "Browse Parts"
View gist:282685
You can only pass a proc to #World once, but it's happening
in 2 places:
Ruby/Gems/1.8/gems/cucumber-0.6.2/examples/ramaze/features/support/env.rb:32:in `World'
Ruby/Gems/1.8/gems/cucumber-0.6.2/examples/selenium_webrat/features/support/env.rb:25:in `World'
Use Ruby modules instead to extend your worlds. See the Cucumber::RbSupport::RbDsl#World RDoc
or http://wiki.github.com/aslakhellesoy/cucumber/a-whole-new-world.
(Cucumber::RbSupport::MultipleWorld)
View gist:301455
NoMethodError in ProjectsController#update
undefined method `class_name' for nil:NilClass
RAILS_ROOT: /Users/steven/Dropbox/Drominay
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:316:in `derive_class_name'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:112:in `class_name'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:156:in `klass'
View create_projectparts.rb
class CreateProjectparts < ActiveRecord::Migration
def self.up
create_table :projectparts do |t|
t.string :name
t.text :description
t.integer :user_id
t.integer :parent_id
t.integer :lft
t.integer :rgt
t.integer :project_id
View create_projects.rb
class CreateProjects < ActiveRecord::Migration
def self.up
create_table :projects do |t|
t.string :name
t.text :description
t.integer :user_id
t.timestamps
end
end
View create_slugs.rb
class CreateSlugs < ActiveRecord::Migration
def self.up
create_table :slugs do |t|
t.string :name
t.integer :sluggable_id
t.integer :sequence, :null => false, :default => 1
t.string :sluggable_type, :limit => 40
t.string :scope, :limit => 40
t.datetime :created_at
end
View create_images.rb
class CreateImages < ActiveRecord::Migration
def self.up
create_table :images do |t|
t.references :solution
t.string :data_file_name
t.string :data_content_type
t.integer :data_file_size
t.datetime :data_updated_at
t.string :description
t.integer :part_id
You can’t perform that action at this time.