repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/helpers/sensors_helper_spec.rb | spec/helpers/sensors_helper_spec.rb | require "spec_helper"
describe SensorsHelper do
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/helpers/pages_helper_spec.rb | spec/helpers/pages_helper_spec.rb | require "spec_helper"
describe PagesHelper do
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/helpers/users_helper_spec.rb | spec/helpers/users_helper_spec.rb | require "spec_helper"
describe UsersHelper do
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/helpers/application_helper_spec.rb | spec/helpers/application_helper_spec.rb | require 'spec_helper'
describe ApplicationHelper do
describe "#navigation" do
it "puts the block inside a <ul> within <nav>" do
html = helper.navigation { "Home" }
html.should == "<nav><ul>Home</ul></nav>"
end
end
describe "#navigate_to" do
it "generates a link inside an <li> tag" do
... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/helpers/sites_helper_spec.rb | spec/helpers/sites_helper_spec.rb | require "spec_helper"
describe SitesHelper do
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/models/page_spec.rb | spec/models/page_spec.rb | require "spec_helper"
describe Page do
let :site do
Factory :site, :time_zone => "Helsinki"
end
let :page_counts do
Mongo.db["page_counts"]
end
describe "#site" do
it "is the site of the page" do
page = Page.new("s" => site.bson_id)
page.site.should == site
end
end
describ... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/models/site_spec.rb | spec/models/site_spec.rb | require "spec_helper"
describe Site do
let(:site) { Factory :site, :time_zone => "Helsinki" }
let(:site_counts_collection) { Mongo.db["site_counts"] }
let(:sites_collection) { Mongo.db["sites"] }
it { should validate_presence_of(:name) }
it { should have_many(:sensors).dependent(:destroy) }
describe "... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/models/sensor_spec.rb | spec/models/sensor_spec.rb | require "spec_helper"
describe Sensor do
it { should have_many(:hosts) }
it { should belong_to(:site) }
it { should validate_presence_of(:name) }
it { should validate_presence_of(:type) }
let(:site) { Factory :site }
let(:sensor_counts_collection) { Mongo.db["sensor_counts"] }
let :campaign do
Fac... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/models/sensor_host_spec.rb | spec/models/sensor_host_spec.rb | require "spec_helper"
describe SensorHost do
before do
Factory :sensor_host
end
it { should belong_to(:sensor) }
it { should validate_presence_of(:host) }
it { should validate_uniqueness_of(:host).scoped_to(:sensor_id) }
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/models/user_spec.rb | spec/models/user_spec.rb | require 'spec_helper'
describe User do
describe "on create" do
context "no password specified" do
it "generates a random password" do
user = Factory :user, :password => nil
user.password.should_not be_nil
user.password.should_not be_empty
end
end
context "password sp... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/pages_spec.rb | spec/acceptance/pages_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Pages" do
let :site do
site = Factory :site
end
background do
sign_in :user
Mongo.db["site_counts"].insert("s" => site.bson_id)
end
scenario "Viewing a page" do
Mongo.db["page_counts"].insert(
"s" => s... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/navigation_spec.rb | spec/acceptance/navigation_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Navigation" do
scenario "Signed out" do
visit sign_in_page
page.all("body > header nav ul li").should be_empty
end
scenario "Signed in" do
sign_in :user
within "body > header nav" do
page.should have_link("S... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/users_spec.rb | spec/acceptance/users_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Users" do
background do
@joe = sign_in :user, :email => "joe@snowfinch.net"
end
scenario "Browsing users" do
aaron = Factory :user, :email => "aaron@snowfinch.net"
ted = Factory :user, :email => "ted@snowfinch.net"
... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/sites_spec.rb | spec/acceptance/sites_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Sites" do
background do
sign_in :user
end
scenario "Browsing sites" do
blog = Factory :site, :name => "Blog"
api = Factory :site, :name => "API docs"
info = Factory :site, :name => "Info"
visit sites_page
... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/acceptance_helper.rb | spec/acceptance/acceptance_helper.rb | require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
require "steak"
# Put your acceptance spec helpers inside /spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/account_spec.rb | spec/acceptance/account_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Account" do
background do
sign_in :user, :email => "user@snowfinch.net", :password => "snowfinch"
end
scenario "Edit own account" do
visit homepage
click_link "Account"
page.should have_active_navigation("Account"... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/authentication_spec.rb | spec/acceptance/authentication_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Authentication" do
background do
Factory :user, :email => "jason@snowfinch.net", :password => "123456"
end
scenario "Signing in" do
visit sign_in_page
fill_in "Email", :with => "jason@snowfinch.net"
fill_in "Passw... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/monitoring_spec.rb | spec/acceptance/monitoring_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Monitoring" do
let(:site) { Factory :site }
background do
sign_in :user
end
scenario "No sensors exist" do
visit sensors_page(site)
message = %{You don't have any sensors. Click "Add a sensor" to create one.}
p... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/support/matchers.rb | spec/acceptance/support/matchers.rb | module AcceptanceMatchers
def has_title?(title)
has_css?("h1", :text => title)
end
def has_active_navigation?(link_text)
has_css?("body > header nav a.active", :text => link_text)
end
def has_notice?(text)
has_css?("#flash", :text => text)
end
end
Capybara::Node::Base.send :include, Accep... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/support/helpers.rb | spec/acceptance/support/helpers.rb | module HelperMethods
def sign_in(resource_name, factory_opts={})
resource = Factory(resource_name, factory_opts)
visit sign_in_page
fill_in "Email", :with => resource.email
fill_in "Password", :with => resource.password
click_button "Sign in"
resource
end
end
RSpec.configuration.include... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/spec/acceptance/support/paths.rb | spec/acceptance/support/paths.rb | module NavigationHelpers
def homepage
"/"
end
def sign_in_page
"/users/sign_in"
end
def sites_page
"/sites"
end
def site_page(site)
"/sites/#{site.id}"
end
def new_site_page
"/sites/new"
end
def edit_site_page(site)
"/sites/#{site.id}/edit"
end
def users_page
... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/lib/mongo_ext.rb | lib/mongo_ext.rb | require "mongo"
require "configuration"
module Mongo
def self.db
@db ||= Mongo::Connection.new.db(Snowfinch.configuration["mongo_database"])
end
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/lib/configuration.rb | lib/configuration.rb | require "yaml"
module Snowfinch
def self.configuration
@configuration ||= begin
yaml = File.read(Rails.root.join("config/snowfinch.yml"))
YAML.load(yaml)[Rails.env].with_indifferent_access
end
end
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/compass.rb | config/compass.rb | # This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here.
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "public/stylesheets"
sass_dir... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/application.rb | config/application.rb | require File.expand_path("../boot", __FILE__)
require "rails/all"
require "benchmark"
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Snowfinch
class Application < Rails::Application
require Rails.root.join("lib/configuration.rb")
# Custom directories with classes and modules you want to ... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/environment.rb | config/environment.rb | # Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Snowfinch::Application.initialize!
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/routes.rb | config/routes.rb | Snowfinch::Application.routes.draw do
devise_for :users
unless Snowfinch.configuration[:mount_collector] == false
match "/collector" => Snowfinch::Collector
end
resources :sites do
member do
get :counters
get :chart
end
resources :sensors do
member do
get :chart
... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/boot.rb | config/boot.rb | require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/snowfinch.rb | config/initializers/snowfinch.rb | require Rails.root.join("lib/configuration.rb")
require Rails.root.join("lib/mongo_ext.rb")
Snowfinch::Collector.db = Mongo.db
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
Mongo.db.connection.connect
end
end
end
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Snowfinch::Application.config.session_store :cookie_store, :key => '_snowfinch_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/devise.rb | config/initializers/devise.rb | require Rails.root.join("lib/configuration.rb")
# Use this hook to configure devise mailer, warden hooks and so forth. The first
# four configuration values can also be set straight in your models.
Devise.setup do |config|
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in DeviseMaile... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', ... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/simple_form.rb | config/initializers/simple_form.rb | # Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Components used by the form builder to generate a complete input. You can remove
# any of them, change the order, or even add your own components to the stack.
# config.components = [ :placeholder, :label_input... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a probl... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
| ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/initializers/secret_token.rb | config/initializers/secret_token.rb | # Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attac... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/environments/test.rb | config/environments/test.rb | Snowfinch::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the tes... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/environments/development.rb | config/environments/development.rb | Snowfinch::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jcxplorer/snowfinch | https://github.com/jcxplorer/snowfinch/blob/ffe6032de2adce64d3bea78cce401e7c9f75b701/config/environments/production.rb | config/environments/production.rb | Snowfinch::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned ... | ruby | MIT | ffe6032de2adce64d3bea78cce401e7c9f75b701 | 2026-01-04T17:48:47.586566Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/init.rb | init.rb | require 'wizardly'
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/image_submit_helper.rb | app/helpers/image_submit_helper.rb | module ImageSubmitHelper
def wizardly_submit
@@wizardly_submit ||= {}
step_id = "#{controller_name}_#{@step}".to_sym
unless @@wizardly_submit[step_id]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[step_id] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(bu... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/sandbox_helper.rb | app/helpers/sandbox_helper.rb | module SandboxHelper
def wizardly_submit
@@wizardly_submit ||= {}
unless @@wizardly_submit[@step]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[@step] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(button.name)
end.string
end
@@wizardly_submit[@... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/session_helper.rb | app/helpers/session_helper.rb | module SessionHelper
def wizardly_submit
@@wizardly_submit ||= {}
unless @@wizardly_submit[@step]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[@step] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(button.name)
end.string
end
@@wizardly_submit[@... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/callbacks_helper.rb | app/helpers/callbacks_helper.rb | module CallbacksHelper
def wizardly_submit
@@wizardly_submit ||= {}
unless @@wizardly_submit[@step]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[@step] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(button.name)
end.string
end
@@wizardly_submit... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/data_modes_helper.rb | app/helpers/data_modes_helper.rb | module DataModesHelper
def wizardly_submit
@@wizardly_submit ||= {}
unless @@wizardly_submit[@step]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[@step] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(button.name)
end.string
end
@@wizardly_submit... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/avatar_session_helper.rb | app/helpers/avatar_session_helper.rb | module AvatarSessionHelper
def wizardly_submit
@@wizardly_submit ||= {}
step_id = "#{controller_name}_#{@step}".to_sym
unless @@wizardly_submit[step_id]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[step_id] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/generated_helper.rb | app/helpers/generated_helper.rb | module GeneratedHelper
def wizardly_submit
@@wizardly_submit ||= {}
unless @@wizardly_submit[@step]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[@step] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(button.name)
end.string
end
@@wizardly_submit... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/application_helper.rb | app/helpers/application_helper.rb | # Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/helpers/scaffold_test_helper.rb | app/helpers/scaffold_test_helper.rb | module ScaffoldTestHelper
def wizardly_submit
@@wizardly_submit ||= {}
step_id = "#{controller_name}_#{@step}".to_sym
unless @@wizardly_submit[step_id]
buttons = @wizard.pages[@step].buttons
@@wizardly_submit[step_id] = buttons.inject(StringIO.new) do |io, button|
io << submit_tag(b... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/macro_controller.rb | app/controllers/macro_controller.rb | class MacroController < ApplicationController
act_wizardly_for :user, :form_data=>:sandbox,
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>{:controller=>:main, :action=>:canceled}
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/callbacks_module.rb | app/controllers/callbacks_module.rb | module Callbacks
# on_errors(:second) do
# end
# on_get(:second) do
# end
# on_post(:second) do
# end
# on_next(:second) do
# end
# on_cancel(:second) do
# end
# on_render do
# end
# on_cancel(:all) do
# end
def self.action_callbacks
[
:_on_get_init_form,
:_on_post_init_form,
:_o... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/session_controller.rb | app/controllers/session_controller.rb | class SessionController < ApplicationController
act_wizardly_for :four_step_user, :redirect=>'/main/index', :form_data=>:session, :skip=>true
end | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/main_controller.rb | app/controllers/main_controller.rb | class MainController < ApplicationController
def index
@links = {
:macro=>'/macro',
:avatar_session=>'/avatar_session',
:generated=>'/generated',
:scaffold_test=>'/scaffold_test',
:callbacks=>'/callbacks',
:session=>'/session',
:session_init=>'/session/init',
:sessi... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/data_modes_controller.rb | app/controllers/data_modes_controller.rb | class DataModesController < ApplicationController
act_wizardly_for :user, :persist_model=>:per_page, :form_data=>:session,
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>{:controller=>:main, :action=>:canceled}
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/scaffold_test_controller.rb | app/controllers/scaffold_test_controller.rb | class ScaffoldTestController < ApplicationController #< WizardForModelController
wizard_for_model :user, :skip=>true, :form_data=>:sandbox, :mask_passwords=>[:password, :password_confirmation],
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>{:controller=>:main, :action=>:canceled}
en... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/callbacks3_controller.rb | app/controllers/callbacks3_controller.rb | require 'wizardly'
class Callbacks3Controller < ApplicationController
act_wizardly_for :user, :skip=>true, :guard=>false, :mask_passwords=>[:password, :password_confirmation],
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>'/main/canceled'#{:controller=>:main, :action=>:canceled}
on_... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/data_modes2_controller.rb | app/controllers/data_modes2_controller.rb | class DataModes2Controller < ApplicationController
act_wizardly_for :user, :persist_model=>:per_page, :form_data=>:sandbox,
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>{:controller=>:main, :action=>:canceled}
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/generated_controller.rb | app/controllers/generated_controller.rb | #
# GeneratedController class generated by wizardly_controller
#
class GeneratedController < ApplicationController
before_filter :guard_entry
# finish action method
def finish
begin
@step = :finish
@wizard = wizard_config
@title = 'Finish'
@description = ''
_build_wizard_mod... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/avatar_session_controller.rb | app/controllers/avatar_session_controller.rb | require 'wizardly'
class AvatarSessionController < ApplicationController
#tests paperclip
act_wizardly_for :user_avatar, :form_data=>:session, :persist_model=>:per_page,
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>{:controller=>:main, :action=>:canceled}
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/callbacks_controller.rb | app/controllers/callbacks_controller.rb | require 'wizardly'
class CallbacksController < ApplicationController
require 'callbacks_module'
act_wizardly_for :user, :skip=>true, :guard=>false, :mask_passwords=>[:password, :password_confirmation],
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>'/main/canceled'#{:controller=>:main... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/sandbox_controller.rb | app/controllers/sandbox_controller.rb | class SandboxController < ApplicationController
act_wizardly_for :four_step_user, :redirect=>'/main/index', :form_data=>:sandbox, :skip=>true
end | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/application_controller.rb | app/controllers/application_controller.rb | # Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryPr... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/callbacks2_controller.rb | app/controllers/callbacks2_controller.rb | require 'wizardly'
class Callbacks2Controller < ApplicationController
act_wizardly_for :user, :skip=>true, :guard=>false, :mask_passwords=>[:password, :password_confirmation],
:completed=>{:controller=>:main, :action=>:finished},
:canceled=>'/main/canceled'#{:controller=>:main, :action=>:canceled}
#NO... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/controllers/image_submit_controller.rb | app/controllers/image_submit_controller.rb | class ImageSubmitController < ApplicationController
wizard_for_model :user, :redirect=>'/main/index', :skip=>true
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/models/user_avatar.rb | app/models/user_avatar.rb | class UserAvatar < User
has_attached_file :avatar
validates_attachment_presence :avatar
validation_group :init, :fields=>[:first_name, :last_name]
validation_group :second, :fields=>[:age, :gender, :programmer, :status, :avatar]
validation_group :finish, :fields=>[:username, :password, :password_confirmatio... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/models/four_step_user.rb | app/models/four_step_user.rb | require 'validation_group'
class FourStepUser < User
validation_group :init, :fields=>[:first_name, :last_name]
validation_group :second, :fields=>[:age, :gender]
validation_group :third, :fields=>[:programmer, :status]
validation_group :finish, :fields=>[:username, :password, :password_confirmation]
e... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/app/models/user.rb | app/models/user.rb | #require 'validation_group'
class User < ActiveRecord::Base
=begin
t.string :first_name
t.string :last_name
t.string :username
t.string :password
t.integer :age
t.string :gender
t.boolean :programmer
t.string :status
=end
validates_confirmation_of :password
validates... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/db/schema.rb | db/schema.rb | # This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your data... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/db/migrate/20090718171255_create_sessions.rb | db/migrate/20090718171255_create_sessions.rb | class CreateSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
end
def self.down
drop_table :sessions
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/db/migrate/20090718172749_create_users.rb | db/migrate/20090718172749_create_users.rb | class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :first_name
t.string :last_name
t.string :username
t.string :password
t.integer :age
t.string :gender
t.boolean :programmer
t.string :status
t.string :avatar_file_name... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/test_helper.rb | test/test_helper.rb | ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method in
# a transaction that's rolled back on completion. This ensures that the test
# ... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/performance/browsing_test.rb | test/performance/browsing_test.rb | require 'test_helper'
require 'performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionController::PerformanceTest
def test_homepage
get '/'
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/unit/user_test.rb | test/unit/user_test.rb | require 'test_helper'
class UserTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/unit/helpers/image_submit_helper_test.rb | test/unit/helpers/image_submit_helper_test.rb | require 'test_helper'
class ImageSubmitHelperTest < ActionView::TestCase
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/unit/helpers/callbacks_helper_test.rb | test/unit/helpers/callbacks_helper_test.rb | require 'test_helper'
class CallbacksHelperTest < ActionView::TestCase
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/functional/callbacks_controller_test.rb | test/functional/callbacks_controller_test.rb | require File.dirname(__FILE__) + '/../test_helper'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def third_page; "third"; end
def finish_page; "finish"; end
def blank_error; "*can't be blank"; end
def back_button; "back"; end
def next_button; "next"; end
def skip_button... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/test/functional/image_submit_controller_test.rb | test/functional/image_submit_controller_test.rb | require 'test_helper'
class ImageSubmitControllerTest < ActionController::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/spec_helper.rb | spec/spec_helper.rb | # This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
#require 'validation_group'
#require 'wizardly'
require 'spec/autorun'
require 'spec/rails'
requ... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/generated_spec.rb | spec/integrations/generated_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'step_helpers'
#require 'rails_generator'
#require 'rails_generator/scripts/generate'
#
#gen_argv = []
#gen_argv << "wizardly_controller" << "generated" << "user" << "/main/finished" << "/main/canceled" << "--force"
#Rails::Generator::Scripts::Generate.new.run... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/matchers.rb | spec/integrations/matchers.rb | #defines custom rspec matcher for this test
Spec::Matchers.define :be_blank do
match do |value|
value == nil || value == ''
end
end
Spec::Matchers.define :be_nil do
match do |value|
value == nil
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/macro_spec.rb | spec/integrations/macro_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "next"; end
def skip_button; "skip";... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/avatar_spec.rb | spec/integrations/avatar_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'avatar_step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "next"; end
def skip_button; ... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/session_spec.rb | spec/integrations/session_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'four_step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def third_page; "third"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "n... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/scaffold_test_spec.rb | spec/integrations/scaffold_test_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'step_helpers'
require 'rails_generator'
require 'rails_generator/scripts/generate'
scaf_argv = []
scaf_argv << "wizardly_scaffold" << "scaffold_test" << "--force"
Rails::Generator::Scripts::Generate.new.run(scaf_argv)
module TestVariables
def init_page;... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/data_modes2_spec.rb | spec/integrations/data_modes2_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "next"; end
def skip_button; "skip";... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/shared_examples.rb | spec/integrations/shared_examples.rb | shared_examples_for "form data using sandbox" do
it "should reset form data when leaving wizard and returning" do
step_to_finish_page
click_button cancel_button
click_link 'signup'
current_url.should include(init_page)
field_with_id(/first/).value.should be_blank
field_with_id(/last/).value.sh... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/step_helpers.rb | spec/integrations/step_helpers.rb | module StepHelpers
def step_to_init_page
visit init_page_path
end
def fill_in_init_page
fill_in(/first_name/, :with=>field_first_name)
fill_in(/last_name/, :with=>field_last_name)
end
def step_to_second_page
step_to_init_page
fill_in_init_page
click_button next_button
end
def fill_... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/four_step_helpers.rb | spec/integrations/four_step_helpers.rb | module FourStepHelpers
def step_to_init_page
visit init_page_path
end
def fill_in_init_page
fill_in(/first_name/, :with=>field_first_name)
fill_in(/last_name/, :with=>field_last_name)
end
def step_to_second_page
step_to_init_page
fill_in_init_page
click_button next_button
end
def f... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/data_modes_spec.rb | spec/integrations/data_modes_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "next"; end
def skip_button; "skip";... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/avatar_step_helpers.rb | spec/integrations/avatar_step_helpers.rb | module AvatarStepHelpers
def step_to_init_page
visit init_page_path
end
def fill_in_init_page
fill_in(/first_name/, :with=>field_first_name)
fill_in(/last_name/, :with=>field_last_name)
end
def step_to_second_page
step_to_init_page
fill_in_init_page
click_button next_button
end
def... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/integrations/sandbox_spec.rb | spec/integrations/sandbox_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require 'four_step_helpers'
module TestVariables
def init_page; "init"; end
def second_page; "second"; end
def third_page; "third"; end
def finish_page; "finish"; end
def blank_error; "can't be blank"; end
def back_button; "back"; end
def next_button; "n... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/controllers/callbacks_spec.rb | spec/controllers/callbacks_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../../app/controllers/callbacks_module'
#include Callbacks
Spec::Matchers.define :have_callback do |*expected_callbacks|
match do |value|
Callbacks::action_callbacks.each do |b|
value[b] == (expected_callbacks.include?(... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/controllers/callbacks2_spec.rb | spec/controllers/callbacks2_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
#require File.dirname(__FILE__) + '/../../app/controllers/callbacks_module'
describe Callbacks2Controller do
it "should redirect when getting the init form" do
get :init
response.should redirect_to('/main/index#on_get_init_form')
end
it "should raise ... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/controllers/callbacks3_spec.rb | spec/controllers/callbacks3_spec.rb | require File.dirname(__FILE__) + '/../spec_helper'
describe Callbacks3Controller do
it "should redirect when getting all forms" do
get :init
response.should redirect_to('/main/index#on_get_all')
get :second
response.should redirect_to('/main/index#on_get_all')
get :finish
response.should re... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/spec/models/user_specd.rb | spec/models/user_specd.rb | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe User do
before(:each) do
@valid_attributes = {
}
end
it "should create a new instance given valid attributes" do
User.create!(@valid_attributes)
end
end
| ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/lib/wizardly.rb | lib/wizardly.rb | require 'validation_group'
require 'wizardly/action_controller'
module Wizardly
module ActionController
module MacroMethods
def wizard_for_model(model, opts={}, &block)
include Wizardly::ActionController
#check for validation group gem
configure_wizard_for_model(model, opts, &block)... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/lib/jeffp-wizardly.rb | lib/jeffp-wizardly.rb | require 'wizardly' | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/lib/validation_group.rb | lib/validation_group.rb | module ValidationGroup
module ActiveRecord
module ActsMethods # extends ActiveRecord::Base
def self.extended(base)
# Add class accessor which is shared between all models and stores
# validation groups defined for each model
base.class_eval do
cattr_accessor :validation_gro... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/lib/wizardly/wizard.rb | lib/wizardly/wizard.rb | require 'wizardly/wizard/configuration'
module Wizardly
class WizardlyError < StandardError; end
class ModelNotFoundError < WizardlyError; end
class ValidationGroupError < WizardlyError; end
class CallbackError < WizardlyError; end
class MissingCallbackError < WizardlyError; end
class WizardConfigurationEr... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
jeffp/wizardly | https://github.com/jeffp/wizardly/blob/130f350f3916a5079bd3db1a55c292eeb4115122/lib/wizardly/action_controller.rb | lib/wizardly/action_controller.rb | require 'wizardly/wizard'
module Wizardly
module ActionController
def self.included(base)
base.extend(ClassMethods)
base.class_eval do
before_filter :guard_entry
class << self
attr_reader :wizard_config #note: reader for @wizard_config on the class (not the instance)
... | ruby | MIT | 130f350f3916a5079bd3db1a55c292eeb4115122 | 2026-01-04T17:48:58.245731Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.