Permalink
Browse files

upgraded plugins and tagged to rails 2.3

  • Loading branch information...
1 parent b77650a commit 1df3bbbbfcaaaf9614aabc451e9f5a765a820b9e activefx committed Feb 15, 2009
Showing 931 changed files with 40,687 additions and 32,191 deletions.
View
@@ -53,6 +53,12 @@ CURRENT FEATURES
- rspec, rspec_rails
- Gems
- ruby-openid-2.1.2
+ - ctran-annotate-2.0.0
+ - rspec-1.1.12
+ - rspec-rails-1.1.12
+ - yfactorial-utility_scopes-0.2.2
+ - Rails
+ - Tagged to Version 2.3
KNOWN ISSUES
- Not sure if the exception_logger is working properly, it does not appear to be recording exceptions. If someone can test and let me know if it works or what the problem is it would be greatly appreciated.
@@ -62,6 +68,8 @@ TODO
- Ongoing: refactoring, google authentication, facebook connect, oauth, api metering, seperate login for admins
PLUGINS
+Annotate_models - see readme for authors and license
+ - http://github.com/ctran/annotate_models/tree/master
Auto_migrations by PJ Hyett is released under the MIT License
- http://github.com/pjhyett/auto_migrations/tree/master
Custom-err-msg by David Easley is released under the MIT License
@@ -95,6 +103,8 @@ Rspec and Rspec_rails by The RSpec Development Team is released under the MIT Li
Uberkit by Michael Bleigh and Intridea, Inc. is released under the MIT License
- http://github.com/mbleigh/uberkit/tree/master
- http://github.com/activefx/uberkit/tree/master (modified for restful_authentication_tutorial)
+Utility_scopes by Ryan Daigle is released under the MIT License
+ - http://github.com/yfactorial/utility_scopes/tree/master
Will_paginate by PJ Hyett and Mislav Marohnic is released under the MIT License
- http://github.com/mislav/will_paginate/tree/master
Yahoo User Interface by Yahoo! Inc. is released under the BSD License
@@ -135,4 +145,4 @@ Additional Resources:
- http://delicious.com/activefx/openid
-Copyright (c) 2008 Matthew Solt, released under the MIT license
+Copyright (c) 2009 Matthew Solt, released under the MIT license
View
@@ -67,7 +67,7 @@ def load_rails_gem
class << self
def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
+ Gem::RubyGemsVersion rescue nil
end
def gem_version
@@ -82,7 +82,7 @@ def gem_version
def load_rubygems
require 'rubygems'
- min_version = '1.1.1'
+ min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
View
@@ -30,6 +30,13 @@
# config.gem "bj"
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
# config.gem "aws-s3", :lib => "aws/s3"
+ config.gem "rspec", :lib => false, :version => '1.1.12'
+ config.gem "rspec-rails", :lib => false, :version => '1.1.12'
+ config.gem "ctran-annotate", :lib => false, :version => '2.0.0',
+ :source => "http://gems.github.com"
+ config.gem "yfactorial-utility_scopes", :lib => false, :version => '0.2.2',
+ :source => "http://gems.github.com"
+
# Only load the plugins named here, in the order given. By default, all plugins
# in vendor/plugins are loaded in alphabetical order.
@@ -72,7 +79,4 @@
config.active_record.observers = :user_observer
end
-#Change for your text editor
-#Ex. Textmate = "txmt://open?url=file://"
-#See also http://josevalim.blogspot.com/2008/06/textmate-protocol-behavior-on-any.html
-Footnotes::Filter.prefix = "gedit://"
+
@@ -0,0 +1,85 @@
+#Change for your text editor for the footnotes plugin
+#Ex. Textmate = "txmt://open?url=file://"
+#See also http://josevalim.blogspot.com/2008/06/textmate-protocol-behavior-on-any.html
+
+ if defined?(Footnotes)
+ Footnotes::Filter.prefix = 'gedit://%s&line=%d&column=%d'
+ end
+
+#From the footnotes README file:
+# If you are not using Textmate as text editor, in your environment.rb or
+# in an initializer do:
+
+# if defined?(Footnotes)
+# Footnotes::Filter.prefix = 'txmt://open?url=file://%s&line=%d&column=%d'
+# end
+
+# Where you are going to choose a prefix compatible with your text editor. The %s is
+# replaced by the name of the file, the first %d is replaced by the line number and
+# the second %d is replaced by the column. You can also enable this behaviour in other
+# editors following the steps in the link below:
+
+# http://josevalim.blogspot.com/2008/06/textmate-protocol-behavior-on-any.html
+
+# By default, footnotes are appended at the end of the page with default stylesheet. If you want
+# to change their position, you can define a div with id "footnotes_holder" or define your own stylesheet
+# by turning footnotes stylesheet off:
+
+# Footnotes::Filter.no_style = true
+
+# Another option is to allow multiple notes to be opened at the same time:
+
+# Footnotes::Filter.multiple_notes = true
+
+# Finally, you can control which notes you want to show. The default are:
+
+# Footnotes::Filter.notes = [:session, :cookies, :params, :filters, :routes, :env, :queries, :log, :general]
+
+
+# Creating your own notes
+# -----------------------
+
+# Create your notes to integrate with Footnotes is easy.
+
+# 1. Create a Footnotes::Notes::YourExampleNote class
+
+# 2. Implement the necessary methods (check abstract_note.rb file in lib/notes)
+
+# 3. Append your example note in Footnotes::Filter.notes array (usually at the end of your environment file or in an initializer):
+
+# For example, to create a note that shows info about the user logged in your application you just have to do:
+
+# module Footnotes
+# module Notes
+# class CurrentUserNote < AbstractNote
+# # This method always receives a controller
+# #
+# def initialize(controller)
+# @current_user = controller.instance_variable_get("@current_user")
+# end
+
+# # The name that will appear as legend in fieldsets
+# #
+# def legend
+# "Current user: #{@current_user.name}"
+# end
+
+# # This Note is only valid if we actually found an user
+# # If it's not valid, it won't be displayed
+# #
+# def valid?
+# @current_user
+# end
+
+# # The fieldset content
+# #
+# def content
+# escape(@current_user.inspect)
+# end
+# end
+# end
+# end
+
+# Then put in your environment:
+
+# Footnotes::Filter.notes += [:current_user]
View
@@ -59,14 +59,6 @@
t.string "salt", :null => false
end
- create_table "pages", :force => true do |t|
- t.string "title"
- t.string "body"
- t.integer "user_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "roles", :force => true do |t|
t.string "name"
end
@@ -73,7 +73,7 @@ def access_denied
format.html do
store_location
flash[:error] = "You must be logged in to access this feature."
- redirect_to new_session_path
+ redirect_to login_path
end
# format.any doesn't work in rails version < http://dev.rubyonrails.org/changeset/8987
# Add any other API formats here. (Some browsers, notably IE6, send Accept: */* and trigger
@@ -1,20 +1,49 @@
module AuthenticatedTestHelper
- # Sets the current user in the session from the user fixtures.
+ # Sets the current person in the session from the person fixtures.
+ # Returns the person to allow @person = login_as(:quentin) construction.
def login_as(user)
- @request.session[:user_id] = user ? users(user).id : nil
+ if user.is_a?(User)
+ id = user.id
+ elsif user.is_a?(Symbol)
+ user = users(user)
+ id = user.id
+ elsif user.nil?
+ id = nil
+ end
+ # Stub out the controller if it's defined.
+ # This means, e.g., that if a spec defines mocked-out photos for a person,
+ # it current_person.photos will have the right assocation.
+ if defined?(controller)
+ controller.stub!(:current_user).and_return(user)
+ else
+ @request.session[:user_id] = id
+ end
+ user
+ end
+
+ def logout
+ @request.session[:user_id] = nil
+ if defined?(controller)
+ controller.stub!(:current_user).and_return(:false)
+ end
end
+ # Sets the current user in the session from the user fixtures.
+# def login_as(user)
+# @request.session[:user_id] = user ? users(user).id : nil
+# end
+
def authorize_as(user)
@request.env["HTTP_AUTHORIZATION"] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'monkey') : nil
end
# rspec
- def mock_user
- user = mock_model(User, :id => 1,
- :login => 'user_name',
- :name => 'U. Surname',
- :to_xml => "User-in-XML", :to_json => "User-in-JSON",
- :errors => [])
- user
- end
+# def mock_user
+# user = mock_model(User, :id => 1,
+# :login => 'user_name',
+# :name => 'U. Surname',
+# :to_xml => "User-in-XML", :to_json => "User-in-JSON",
+# :errors => [])
+# user
+# end
end
Oops, something went wrong.

0 comments on commit 1df3bbb

Please sign in to comment.