3 | <% end %>
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/implicit_helper.rhtml:
--------------------------------------------------------------------------------
1 | <%= method_in_plugin_application_helper %>
2 | <%= method_in_helper %>
3 |
--------------------------------------------------------------------------------
/vendor/plugins/rows_logger/tasks/rows_logger_tasks.rake:
--------------------------------------------------------------------------------
1 | # desc "Explaining what the task does"
2 | # task :rows_logger do
3 | # # Task goes here
4 | # end
--------------------------------------------------------------------------------
/script/performance/benchmarker:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/performance/benchmarker'
4 |
--------------------------------------------------------------------------------
/stories/helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] = "test"
2 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3 | require 'spec/rails/story_adapter'
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/runner/examples.txt:
--------------------------------------------------------------------------------
1 | Sir, if you were my husband, I would poison your drink.
2 | Madam, if you were my wife, I would drink it.
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/story/story_helper.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/../../spec_helper'
2 | require File.dirname(__FILE__) + '/builders'
3 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/replace_html_with_partial.rjs:
--------------------------------------------------------------------------------
1 | page.replace_html 'mydiv', :partial => 'rjs_spec/replacement_partial'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/lib/nonce.rb:
--------------------------------------------------------------------------------
1 | class Nonce < ActiveRecord::Base
2 | set_table_name 'open_id_nonces'
3 | end
4 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/controllers/action_view_base_spec_controller.rb:
--------------------------------------------------------------------------------
1 | class ActionViewBaseSpecController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/addition_helper.rb:
--------------------------------------------------------------------------------
1 | module AdditionHelper
2 | def plus(addend)
3 | @addend + addend
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/explicit_helper.rhtml:
--------------------------------------------------------------------------------
1 | <%= method_in_plugin_application_helper %>
2 | <%= method_in_explicit_helper %>
3 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/about:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/about'
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/expectations/extensions.rb:
--------------------------------------------------------------------------------
1 | require 'spec/expectations/extensions/object'
2 | require 'spec/expectations/extensions/string_and_symbol'
3 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/models/animal.rb:
--------------------------------------------------------------------------------
1 | class Animal < ActiveRecord::Base
2 | belongs_to :person
3 | validates_uniqueness_of :name
4 | end
5 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/console'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/destroy:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/destroy'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/generate:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/generate'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/plugin:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/plugin'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/runner:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/runner'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/server'
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | log/*.log
2 | tmp/**/*
3 | config/database.yml
4 | config/config.yml
5 | doc/api
6 | doc/app
7 | doc/plugins
8 | config/initializers/site_keys.rb
9 | *~
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/story/extensions.rb:
--------------------------------------------------------------------------------
1 | require 'spec/story/extensions/main'
2 | require 'spec/story/extensions/string'
3 | require 'spec/story/extensions/regexp'
4 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/should_not_receive.rhtml:
--------------------------------------------------------------------------------
1 | <% if @obj.render_partial? %>
2 | <%= render :partial => 'some_partial' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/breakpointer:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../config/boot'
3 | require 'commands/breakpointer'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/lib/open_id_setting.rb:
--------------------------------------------------------------------------------
1 | class OpenIdSetting < ActiveRecord::Base
2 |
3 | validates_uniqueness_of :setting
4 | end
5 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/autorunner.rb:
--------------------------------------------------------------------------------
1 | class Test::Unit::AutoRunner
2 | remove_method :process_args
3 | def process_args(argv)
4 | true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/reaper:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/process/reaper'
4 |
--------------------------------------------------------------------------------
/app/views/user_mailer/signup_notification.erb:
--------------------------------------------------------------------------------
1 | Your account has been created.
2 |
3 | Username: <%=h @user.login %>
4 |
5 | Visit this url to activate your account:
6 |
7 | <%=h @url %>
8 |
--------------------------------------------------------------------------------
/public/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // Place your application-specific JavaScript functions and classes here
2 | // This file is automatically included by javascript_include_tag :defaults
3 |
4 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/bin/spec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
3 | require 'spec'
4 | exit ::Spec::Runner::CommandLine.run
5 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/ruby.rb:
--------------------------------------------------------------------------------
1 | module Spec
2 | module Ruby
3 | class << self
4 | def version
5 | RUBY_VERSION
6 | end
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/rspec_suite.rb:
--------------------------------------------------------------------------------
1 | if __FILE__ == $0
2 | dir = File.dirname(__FILE__)
3 | Dir["#{dir}/**/*_spec.rb"].reverse.each do |file|
4 | require file
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/runner/resources/utf8_encoded.rb:
--------------------------------------------------------------------------------
1 | module Custom
2 | class ExampleUTF8ClassNameVarietà
3 | def self.è
4 | così = :però
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/spawner:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/process/spawner'
4 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/spinner:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/process/spinner'
4 |
--------------------------------------------------------------------------------
/vendor/plugins/rows_logger/adapters/mysql.rb:
--------------------------------------------------------------------------------
1 | ActiveRecord::ConnectionAdapters::MysqlAdapter.class_eval do
2 | protected
3 | def count_result(result)
4 | result.num_rows
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/.autotest:
--------------------------------------------------------------------------------
1 | Autotest.add_hook :initialize do |at|
2 | at.add_exception("spec/interop/test/unit/resources")
3 | at.add_exception("spec/spec/runner/drb_command_line_spec.rb")
4 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/multiple_helpers.rhtml:
--------------------------------------------------------------------------------
1 | <%= method_in_plugin_application_helper %>
2 | <%= method_in_explicit_helper %>
3 | <%= method_in_more_explicit_helper %>
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/performance/profiler:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/performance/profiler'
4 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | # Methods added to this helper will be available to all templates in the application.
2 | module ApplicationHelper
3 | end
4 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/performance/benchmarker:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require File.dirname(__FILE__) + '/../../config/boot'
3 | require 'commands/performance/benchmarker'
4 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/lib/openid/protocolerror.rb:
--------------------------------------------------------------------------------
1 | require 'openid/util'
2 |
3 | module OpenID
4 |
5 | # An error in the OpenID protocol
6 | class ProtocolError < OpenIDError
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/spec_helper.rb:
--------------------------------------------------------------------------------
1 | lib_path = File.expand_path(File.dirname(__FILE__) + "/../../lib")
2 | $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
3 | require "spec"
4 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/passing/spec_helper.rb:
--------------------------------------------------------------------------------
1 | lib_path = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
2 | $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
3 | require 'spec'
4 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/testresult.rb:
--------------------------------------------------------------------------------
1 | class Test::Unit::TestResult
2 | alias_method :tu_passed?, :passed?
3 | def passed?
4 | return tu_passed? & ::Spec::Runner.run
5 | end
6 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec/matchers'
2 | require 'spec/expectations'
3 | require 'spec/example'
4 | require 'spec/runner'
5 | require 'spec/version'
6 | require 'spec/dsl'
7 | require 'spec/ruby'
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/features/step_definitions/people.rb:
--------------------------------------------------------------------------------
1 | When "I add a Person" do
2 | Person.create!(:name => "Foo")
3 | end
4 | Then "there should be one person" do
5 | Person.count.should == 1
6 | end
7 |
--------------------------------------------------------------------------------
/app/controllers/root_controller.rb:
--------------------------------------------------------------------------------
1 | class RootController < ApplicationController
2 |
3 | def index
4 |
5 | respond_to do |format|
6 | format.html # index.html.erb
7 | end
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/story/extensions/string.rb:
--------------------------------------------------------------------------------
1 | class String
2 | def step_name
3 | self
4 | end
5 |
6 | def arg_regexp
7 | ::Spec::Story::Step::PARAM_OR_GROUP_PATTERN
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/vendor/gems/ctran-annotate-2.0.0/lib/tasks/annotate_routes.rake:
--------------------------------------------------------------------------------
1 | desc "Prepends the route map to the top of routes.rb"
2 | task :annotate_routes do
3 | require 'annotate/annotate_routes'
4 | AnnotateRoutes.do_annotate
5 | end
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/rails_suite.rb:
--------------------------------------------------------------------------------
1 | dir = File.dirname(__FILE__)
2 | Dir["#{dir}/**/*_example.rb"].each do |file|
3 | require file
4 | end
5 | Dir["#{dir}/**/*_spec.rb"].each do |file|
6 | require file
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/plugins/rows_logger/test/rows_logger_test.rb:
--------------------------------------------------------------------------------
1 | require 'test/unit'
2 |
3 | class RowsLoggerTest < Test::Unit::TestCase
4 | # Replace this with your real tests.
5 | def test_this_plugin
6 | flunk
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/views/members/index.html.erb:
--------------------------------------------------------------------------------
1 |
Members
2 |
3 |
4 | <% for user in @users -%>
5 |
<%= link_to h(user.login), member_path(user) %>
6 | <% end -%>
7 |
8 |
9 | <%= will_paginate @users %>
10 |
--------------------------------------------------------------------------------
/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
3 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/init.rb:
--------------------------------------------------------------------------------
1 | # might using the ruby-openid gem
2 | begin
3 | require 'rubygems'
4 | rescue LoadError
5 | nil
6 | end
7 | require 'openid'
8 | require 'openid_ar_store'
9 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-Agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/more_explicit_helper.rb:
--------------------------------------------------------------------------------
1 | module MoreExplicitHelper
2 | def method_in_more_explicit_helper
3 | "
This is text from a method in the MoreExplicitHelper
"
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/template_with_partial_using_collection.rhtml:
--------------------------------------------------------------------------------
1 | <%= render :partial => 'partial',
2 | :collection => ['Alice', 'Bob'],
3 | :spacer_template => 'spacer' %>
4 |
--------------------------------------------------------------------------------
/vendor/gems/ctran-annotate-2.0.0/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | begin
2 | require 'spec'
3 | rescue LoadError
4 | require 'rubygems'
5 | gem 'rspec'
6 | require 'spec'
7 | end
8 |
9 | require File.dirname(__FILE__) + '/../lib/annotate'
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/resources/rake/examples.rake:
--------------------------------------------------------------------------------
1 | require 'rake'
2 | require 'spec/rake/spectask'
3 |
4 | desc "Run all examples"
5 | Spec::Rake::SpecTask.new('examples') do |t|
6 | t.spec_files = FileList['examples/**/*.rb']
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/resources/rake/verify_rcov.rake:
--------------------------------------------------------------------------------
1 | require 'rake'
2 | require 'spec/rake/verify_rcov'
3 |
4 | RCov::VerifyTask.new(:verify_rcov => :spec) do |t|
5 | t.threshold = 100.0
6 | t.index_html = 'coverage/index.html'
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/helpers/server_helper.rb:
--------------------------------------------------------------------------------
1 |
2 | module ServerHelper
3 |
4 | def url_for_user
5 | url_for :controller => 'user', :action => session[:username]
6 | end
7 |
8 | end
9 |
10 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/images/openid_login_bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/activefx/restful_authentication_tutorial/HEAD/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/images/openid_login_bg.gif
--------------------------------------------------------------------------------
/app/models/four_oh_four.rb:
--------------------------------------------------------------------------------
1 | class FourOhFour < ActiveRecord::Base
2 | def self.add_request(url, referer)
3 | request = find_or_initialize_by_url_and_referer(url, referer)
4 | request.count += 1
5 | request.save
6 | end
7 | end
8 |
9 |
--------------------------------------------------------------------------------
/script/spec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib"))
3 | require 'spec'
4 | exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))
5 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/mocks/errors.rb:
--------------------------------------------------------------------------------
1 | module Spec
2 | module Mocks
3 | class MockExpectationError < StandardError
4 | end
5 |
6 | class AmbiguousReturnError < StandardError
7 | end
8 | end
9 | end
10 |
11 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/story/extensions/regexp.rb:
--------------------------------------------------------------------------------
1 | class Regexp
2 | def step_name
3 | self.source.gsub '\\$', '$$'
4 | end
5 |
6 | def arg_regexp
7 | ::Spec::Story::Step::PARAM_OR_GROUP_PATTERN
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/runner/output_one_time_fixture.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/../../spec_helper.rb'
2 |
3 | describe "Running an Example" do
4 | it "should not output twice" do
5 | true.should be_true
6 | end
7 | end
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/failure_in_after.rb:
--------------------------------------------------------------------------------
1 | describe "This example" do
2 |
3 | it "should be listed as failing in after" do
4 | end
5 |
6 | after(:each) do
7 | NonExistentClass.new
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/failure_in_before.rb:
--------------------------------------------------------------------------------
1 | describe "This example" do
2 |
3 | before(:each) do
4 | NonExistentClass.new
5 | end
6 |
7 | it "should be listed as failing in each" do
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/resources/spec/simple_spec.rb:
--------------------------------------------------------------------------------
1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2 | require 'spec'
3 |
4 | describe "Running an Example" do
5 | it "should not output twice" do
6 | true.should be_true
7 | end
8 | end
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake appdoc" to generate API documentation for your models and controllers.
--------------------------------------------------------------------------------
/vendor/gems/ctran-annotate-2.0.0/spec/annotate_spec.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/spec_helper.rb'
2 |
3 | describe Annotate do
4 |
5 | it "should have a version" do
6 | Annotate::VERSION.should be_instance_of(String)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/timeout_behaviour.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/spec_helper'
2 |
3 | describe "Something really slow" do
4 | it "should be failed by RSpec when it takes longer than --timeout" do
5 | sleep(2)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/passing/legacy_spec.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/spec_helper'
2 | context "A legacy spec" do
3 | setup do
4 | end
5 |
6 | specify "should work fine" do
7 | end
8 |
9 | teardown do
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/bin/autospec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['RSPEC'] = 'true' # allows autotest to discover rspec
3 | ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
4 | system (RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV
--------------------------------------------------------------------------------
/app/controllers/admin/controls_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::ControlsController < ApplicationController
2 | before_filter :login_required
3 | require_role :admin
4 |
5 | def index
6 | @users = User.count
7 | @exceptions = LoggedException.count
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/views/user/invitations/new.html.erb:
--------------------------------------------------------------------------------
1 |
Send invitation
2 |
3 | <%= error_messages_for :invitation %>
4 | <% uberform_for [:user, @invitation] do |f| %>
5 | <%= f.text_field :email, :label => "Friend's email address:" %>
6 | <%= f.submit "Invite!" %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/template_with_partial.rhtml:
--------------------------------------------------------------------------------
1 | <%= method_in_template_with_partial %>
2 | <%= render :partial => 'partial' %>
3 |
4 | <%= render :partial => 'partial_used_twice' %>
5 | <%= render :partial => 'partial_used_twice' %>
6 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/spec/rails/sample_spec.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/../../spec_helper'
2 |
3 | describe "A sample spec", :type => :model do
4 | fixtures :animals
5 | it "should pass" do
6 | animals(:pig).name.should == "Pig"
7 | end
8 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/passing/dynamic_spec.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/spec_helper'
2 |
3 | describe "The square root" do
4 | (1..10).each do |n|
5 | it "of #{n*n} should be #{n}" do
6 | Math.sqrt(n*n).should == n
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/passing/io_processor.rb:
--------------------------------------------------------------------------------
1 | class DataTooShort < StandardError; end
2 |
3 | class IoProcessor
4 | # Does some fancy stuff unless the length of +io+ is shorter than 32
5 | def process(io)
6 | raise DataTooShort if io.read.length < 32
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/spec/rails/sample_modified_fixture.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/../../spec_helper'
2 |
3 | describe "A sample spec", :type => :model do
4 | fixtures :animals
5 | it "should pass" do
6 | animals(:pig).name.should == "Piggy"
7 | end
8 | end
--------------------------------------------------------------------------------
/vendor/plugins/rows_logger/adapters/postgresql.rb:
--------------------------------------------------------------------------------
1 | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
2 | protected
3 | def count_result(result)
4 | if result.is_a?(PGresult)
5 | result.num_tuples
6 | else
7 | nil
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/controllers/members_controller.rb:
--------------------------------------------------------------------------------
1 | class MembersController < ApplicationController
2 | before_filter :login_required
3 |
4 | def index
5 | @users = User.member_list(params[:page])
6 | end
7 |
8 | def show
9 | @user = User.find_by_login(params[:id])
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/app/views/sessions/new.rjs:
--------------------------------------------------------------------------------
1 | if @bad_visitor
2 | page.redirect_to login_path
3 | else
4 | page['logins'].hide
5 | page['logins'].replace_html :partial => "shared/login"
6 | page['logins'].appear
7 | page.delay(1) do
8 | page << focus_on_div("login")
9 | end
10 | end
11 |
12 |
13 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/resources/test/spec_including_test_but_not_unit.rb:
--------------------------------------------------------------------------------
1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2 | require 'spec'
3 |
4 | module Test
5 | end
6 |
7 | describe "description" do
8 | it "should description" do
9 | 1.should == 1
10 | end
11 | end
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/lib/openid/extras.rb:
--------------------------------------------------------------------------------
1 | class String
2 | def starts_with?(other)
3 | head = self[0, other.length]
4 | head == other
5 | end
6 |
7 | def ends_with?(other)
8 | tail = self[-1 * other.length, other.length]
9 | tail == other
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/autotest/autotest_helper.rb:
--------------------------------------------------------------------------------
1 | require "rubygems"
2 | require 'autotest'
3 | dir = File.dirname(__FILE__)
4 | require File.expand_path("#{dir}/../spec_helper")
5 | require File.expand_path("#{dir}/../../lib/autotest/rspec")
6 | require File.expand_path("#{dir}/autotest_matchers")
7 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/spec/rails/mocks/ar_classes.rb:
--------------------------------------------------------------------------------
1 | class MockableModel < ActiveRecord::Base
2 | has_one :associated_model
3 | end
4 |
5 | class SubMockableModel < MockableModel
6 | end
7 |
8 | class AssociatedModel < ActiveRecord::Base
9 | belongs_to :mockable_model
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/controllers/application.rb:
--------------------------------------------------------------------------------
1 | # Filters added to this controller will be run for all controllers in the application.
2 | # Likewise, all the methods added will be available for all controllers.
3 | class ApplicationController < ActionController::Base
4 | end
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/no-xrd.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/lib/hmac/sha1.rb:
--------------------------------------------------------------------------------
1 | require 'hmac/hmac'
2 | require 'digest/sha1'
3 |
4 | module HMAC
5 | class SHA1 < Base
6 | def initialize(key = nil)
7 | super(Digest::SHA1, 64, 20, key)
8 | end
9 | public_class_method :new, :digest, :hexdigest
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/syntax_error_example.rb:
--------------------------------------------------------------------------------
1 | describe "when passing a block to a matcher" do
2 | it "you should use {} instead of do/end" do
3 | Object.new.should satisfy do
4 | "this block is being passed to #should instead of #satisfy - use {} instead"
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/accessor.rhtml:
--------------------------------------------------------------------------------
1 |
8 |
9 | <%= submit_tag 'Reset Password' %>
10 | <% end %>
11 |
12 |
13 |
--------------------------------------------------------------------------------
/vendor/gems/yfactorial-utility_scopes-0.2.2/spec/abstract_spec.rb:
--------------------------------------------------------------------------------
1 | require File.join(File.dirname(__FILE__), *%w[spec_helper])
2 | require 'activerecord'
3 |
4 | $:.unshift "#{File.dirname(__FILE__)}/../lib"
5 | require 'utility_scopes'
6 |
7 | # Load a test class
8 | def uses_fixture(fixture_name)
9 | require File.join(File.dirname(__FILE__), 'fixtures', fixture_name.to_s)
10 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/test_case_with_errors.rb:
--------------------------------------------------------------------------------
1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib"
2 | $:.unshift rspec_lib unless $:.include?(rspec_lib)
3 | require 'test/unit'
4 | require 'spec'
5 |
6 | class TestCaseWithErrors < Test::Unit::TestCase
7 | def test_with_error
8 | raise "error raised in TestCaseWithErrors"
9 | end
10 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/spec_with_errors.rb:
--------------------------------------------------------------------------------
1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib"
2 | $:.unshift rspec_lib unless $:.include?(rspec_lib)
3 | require 'test/unit'
4 | require 'spec'
5 |
6 | describe "example group with errors" do
7 | it "should raise errors" do
8 | raise "error raised in example group with errors"
9 | end
10 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/script/autospec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['RSPEC'] = 'true' # allows autotest to discover rspec
3 | ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
4 | system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) ||
5 | $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH")
6 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
3 |
4 | require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5 |
6 | require 'rake'
7 | require 'rake/testtask'
8 | require 'rake/rdoctask'
9 |
10 | require 'tasks/rails'
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/500.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
Application error (Apache)
6 |
Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html
7 |
8 |
--------------------------------------------------------------------------------
/app/views/shared/_login_with_openid.html.erb:
--------------------------------------------------------------------------------
1 | <% form_tag session_path do -%>
2 | <%= label_tag 'openid_indentifier', 'OpenID Url' %>
3 | <%= text_field_tag "openid_identifier", @openid_identifier %>
4 | <%= label_tag 'remember_me', 'Remember me' %><%= check_box_tag 'remember_me', '1', @remember_me %>
5 | <%= submit_tag 'Log in', :disable_with => "Signing in…" %>
6 | <% end -%>
7 |
8 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/init.rb:
--------------------------------------------------------------------------------
1 | # Placeholder to satisfy Rails.
2 | #
3 | # Do NOT add any require statements to this file. Doing
4 | # so will cause Rails to load this plugin all of the time.
5 | #
6 | # Running 'ruby script/generate rspec' will
7 | # generate spec/spec_helper.rb, which includes the necessary
8 | # require statements and configuration. This file should
9 | # be required by all of your spec files.
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/init.rb:
--------------------------------------------------------------------------------
1 | # Placeholder to satisfy Rails.
2 | #
3 | # Do NOT add any require statements to this file. Doing
4 | # so will cause Rails to load this plugin all of the time.
5 | #
6 | # Running 'ruby script/generate rspec' will
7 | # generate spec/spec_helper.rb, which includes the necessary
8 | # require statements and configuration. This file should
9 | # be required by all of your spec files.
--------------------------------------------------------------------------------
/app/views/user/activations/new.html.erb:
--------------------------------------------------------------------------------
1 |
20 |
21 | <%= submit_tag 'Change Password' %>
22 | <% end %>
23 |
24 |
25 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-rails-1.1.12/lib/spec/rails/example/rails_example_group.rb:
--------------------------------------------------------------------------------
1 | require 'spec/interop/test'
2 |
3 | if ActionView::Base.respond_to?(:cache_template_extension)
4 | ActionView::Base.cache_template_extensions = false
5 | end
6 |
7 | module Spec
8 | module Rails
9 |
10 | module Example
11 | if ActiveSupport.const_defined?(:TestCase)
12 | class RailsExampleGroup < ActiveSupport::TestCase
13 | include ActionController::Assertions::SelectorAssertions
14 | end
15 | else
16 | class RailsExampleGroup < Test::Unit::TestCase
17 | end
18 | end
19 |
20 | class RailsExampleGroup
21 | include Spec::Rails::Matchers
22 | include Spec::Rails::Mocks
23 | Spec::Example::ExampleGroupFactory.default(self)
24 | end
25 |
26 | end
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/spoof2.xrds:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | *keturn
5 | xri://=
6 | !E4
7 | =!E4
8 |
9 |
10 | xri://$res*auth*($v*2.0)
11 | http://keturn.example.com/resolve/
12 | xri://=
13 |
14 |
15 |
16 | *isDrummond
17 | xri://=
18 | !D2
19 | =!D2
20 |
21 | http://openid.net/signon/1.0
22 | http://keturn.example.com/openid
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/mocking_with_mocha.rb:
--------------------------------------------------------------------------------
1 | # stub frameworks like to gum up Object, so this is deliberately
2 | # set NOT to run so that you don't accidentally run it when you
3 | # run this dir.
4 |
5 | # To run it, stand in this directory and say:
6 | #
7 | # RUN_MOCHA_EXAMPLE=true ruby ../bin/spec mocking_with_mocha.rb
8 |
9 | if ENV['RUN_MOCHA_EXAMPLE']
10 | Spec::Runner.configure do |config|
11 | config.mock_with :mocha
12 | end
13 | describe "Mocha framework" do
14 | it "should should be made available by saying config.mock_with :mocha" do
15 | m = mock()
16 | m.expects(:msg).with("arg")
17 | m.msg
18 | end
19 | it "should should be made available by saying config.mock_with :mocha" do
20 | o = Object.new
21 | o.expects(:msg).with("arg")
22 | o.msg
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/mocking_with_rr.rb:
--------------------------------------------------------------------------------
1 | # stub frameworks like to gum up Object, so this is deliberately
2 | # set NOT to run so that you don't accidentally run it when you
3 | # run this dir.
4 |
5 | # To run it, stand in this directory and say:
6 | #
7 | # RUN_RR_EXAMPLE=true ruby ../bin/spec mocking_with_rr.rb
8 |
9 | if ENV['RUN_RR_EXAMPLE']
10 | Spec::Runner.configure do |config|
11 | config.mock_with :rr
12 | end
13 | describe "RR framework" do
14 | it "should should be made available by saying config.mock_with :rr" do
15 | o = Object.new
16 | mock(o).msg("arg")
17 | o.msg
18 | end
19 | it "should should be made available by saying config.mock_with :rr" do
20 | o = Object.new
21 | mock(o) do |m|
22 | m.msg("arg")
23 | end
24 | o.msg
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/features/example_groups/example_group_with_should_methods.feature:
--------------------------------------------------------------------------------
1 | Feature: Spec::ExampleGroup with should methods
2 |
3 | As an RSpec adopter accustomed to classes and methods
4 | I want to use should_* methods in an ExampleGroup
5 | So that I use RSpec with classes and methods that look more like RSpec examples
6 |
7 | Scenario: Run with ruby
8 | Given the file ../../resources/spec/example_group_with_should_methods.rb
9 | When I run it with the ruby interpreter
10 | Then the exit code should be 256
11 | And the stdout should match "2 examples, 1 failure"
12 |
13 | Scenario: Run with spec
14 | Given the file ../../resources/spec/example_group_with_should_methods.rb
15 | When I run it with the spec script
16 | Then the exit code should be 256
17 | And the stdout should match "2 examples, 1 failure"
18 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/spec/spec/expectations/wrap_expectation_spec.rb:
--------------------------------------------------------------------------------
1 | require File.dirname(__FILE__) + '/../../spec_helper.rb'
2 |
3 | module Spec
4 | module Matchers
5 | describe "wrap_expectation" do
6 |
7 | def stub_matcher
8 | @_stub_matcher ||= simple_matcher do
9 | end
10 | end
11 |
12 | def failing_matcher
13 | @_failing_matcher ||= simple_matcher do
14 | 1.should == 2
15 | end
16 | end
17 |
18 | it "should return true if there is no error" do
19 | wrap_expectation stub_matcher do
20 | end.should be_true
21 | end
22 |
23 | it "should return false if there is an error" do
24 | wrap_expectation failing_matcher do
25 | raise "error"
26 | end.should be_false
27 | end
28 | end
29 | end
30 | end
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/features/interop/test_case_with_should_methods.feature:
--------------------------------------------------------------------------------
1 | Story: Test::Unit::TestCase extended by rspec with should methods
2 |
3 | As an RSpec adopter with existing Test::Unit tests
4 | I want to use should_* methods in a Test::Unit::TestCase
5 | So that I use RSpec with classes and methods that look more like RSpec examples
6 |
7 | Scenario: Run with ruby
8 | Given the file ../../resources/test/test_case_with_should_methods.rb
9 | When I run it with the ruby interpreter
10 | Then the exit code should be 256
11 | And the stdout should match "5 examples, 3 failures"
12 |
13 | Scenario: Run with spec
14 | Given the file ../../resources/test/test_case_with_should_methods.rb
15 | When I run it with the spec script
16 | Then the exit code should be 256
17 | And the stdout should match "5 examples, 3 failures"
18 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/testsuite_adapter.rb:
--------------------------------------------------------------------------------
1 | module Test
2 | module Unit
3 | class TestSuiteAdapter < TestSuite
4 | attr_reader :example_group, :examples
5 | alias_method :tests, :examples
6 | def initialize(example_group)
7 | @example_group = example_group
8 | @examples = example_group.examples
9 | end
10 |
11 | def name
12 | example_group.description
13 | end
14 |
15 | def run(*args)
16 | return true unless args.empty?
17 | example_group.run(Spec::Runner.options)
18 | end
19 |
20 | def size
21 | example_group.number_of_examples
22 | end
23 |
24 | def delete(example)
25 | examples.delete example
26 | end
27 |
28 | def empty?
29 | examples.empty?
30 | end
31 | end
32 | end
33 | end
34 |
35 |
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/story_server/prototype/lib/server.rb:
--------------------------------------------------------------------------------
1 | require 'webrick'
2 |
3 | class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
4 | def do_POST(request, response)
5 | File.open('story', 'w') do |io|
6 | io.write(request.body)
7 | end
8 |
9 | response.status = 200
10 | response['Content-Type'] = 'text/html'
11 | response.body = "body"
12 | end
13 | end
14 |
15 | params = { :Port => 4000,
16 | :ServerType => WEBrick::SimpleServer,
17 | :BindAddress => "0.0.0.0",
18 | :MimeTypes => WEBrick::HTTPUtils::DefaultMimeTypes }
19 | server = WEBrick::HTTPServer.new(params)
20 | server.mount('/stories', DispatchServlet)
21 | server.mount('/', WEBrick::HTTPServlet::FileHandler, File.dirname(__FILE__) + '/..', { :FancyIndexing => true })
22 |
23 | trap("INT") { server.shutdown }
24 | server.start
--------------------------------------------------------------------------------
/vendor/gems/rspec-1.1.12/examples/failing/diffing_spec.rb:
--------------------------------------------------------------------------------
1 | describe "Running specs with --diff" do
2 | it "should print diff of different strings" do
3 | uk = <<-EOF
4 | RSpec is a
5 | behaviour driven development
6 | framework for Ruby
7 | EOF
8 | usa = <<-EOF
9 | RSpec is a
10 | behavior driven development
11 | framework for Ruby
12 | EOF
13 | usa.should == uk
14 | end
15 |
16 | class Animal
17 | def initialize(name,species)
18 | @name,@species = name,species
19 | end
20 |
21 | def inspect
22 | <<-EOA
23 |
27 | EOA
28 | end
29 | end
30 |
31 | it "should print diff of different objects' pretty representation" do
32 | expected = Animal.new "bob", "giraffe"
33 | actual = Animal.new "bob", "tortoise"
34 | expected.should eql(actual)
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/app/views/shared/_user_bar.html.erb:
--------------------------------------------------------------------------------
1 | <% if logged_in? -%>
2 |