Skip to content

Instantly share code, notes, and snippets.

@shageman
shageman / gist:ecc8d0ca17851c191fd9f15aaf537b22
Created January 11, 2024 15:07 — forked from venantius/gist:ba11dc49cc7a770a3420
Rubocop summary stats generator
#!/usr/bin/env python3
"""
A little script to quickly identify the worst offenders. Easily extensible to
find and sort by other issues. Expects you to have results available in an
easily consumable JSON file, which you can generate by running:
rubocop --format progress --format json --out rubocop.json
"""
class SignUpPage
def initialize
current_path.should == sign_up_path
end
def with_email(email)
fill_in "Login", :with => email
end
def with_password(password, confirmation = password)
@shageman
shageman / conductor.rb
Created November 17, 2011 01:20 — forked from paul/conductor.rb
class Conductor
include ActiveModel::Conversion
extend ActiveModel::Naming
include ActiveModel::Validations
class_attribute :object_names
def self.presents(*object_names)
self.object_names = object_names
object_names.each do |object_name|