Permalink
Browse files

Update plugins

  • Loading branch information...
1 parent 7c7f79e commit a936c689cad50493df248790721ea8746ba8ae4b @johnf committed Jul 8, 2011
View
@@ -2,10 +2,7 @@ source 'http://rubygems.org'
gem 'rails', '3.1.0.rc4'
-
-
-
-gem 'mysql2', '~> 0.2.7'
+gem 'mysql2'
# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
@@ -23,7 +20,9 @@ gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
-gem 'admin_data'
+#gem 'admin_data'
+#gem "will_paginate", :git => "https://github.com/p7r/will_paginate.git", :branch => "rails3" # Untill https://github.com/mislav/will_paginate/issues/124
+
gem 'devise'
View
@@ -32,8 +32,6 @@ GEM
activesupport (3.1.0.rc4)
multi_json (~> 1.0)
addressable (2.2.6)
- admin_data (1.1.13)
- will_paginate (= 3.0.pre2)
arel (2.1.3)
bcrypt-ruby (2.1.4)
builder (3.0.0)
@@ -114,7 +112,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
- mysql2 (0.2.11)
+ mysql2 (0.3.6)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
@@ -201,15 +199,13 @@ GEM
webmock (1.6.4)
addressable (~> 2.2, > 2.2.5)
crack (>= 0.1.7)
- will_paginate (3.0.pre2)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
- admin_data
capistrano
capybara
coffee-script
@@ -222,7 +218,7 @@ DEPENDENCIES
haml-rails
jquery-rails
launchy
- mysql2 (~> 0.2.7)
+ mysql2
rails (= 3.1.0.rc4)
rspec-rails
sass-rails (~> 3.1.0.rc)
View
@@ -14,7 +14,10 @@ development:
adapter: sqlite3
database: db/development.sqlite3
-test:
+test: &test
<<: *COMMON
adapter: sqlite3
database: db/test.sqlite3
+
+cucumber:
+ <<: *test
@@ -24,4 +24,6 @@
# Do not compress assets
config.assets.compress = false
+
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
end
@@ -51,4 +51,7 @@
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
+
+ config.action_mailer.delivery_method = :sendmail
+ config.action_mailer.default_url_options = { :host => 'rubychangelog.org' }
end
@@ -36,4 +36,6 @@
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+
+ config.action_mailer.default_url_options = { :host => 'example.com' }
end
@@ -1,5 +1,5 @@
-AdminData.config do |config|
- config.is_allowed_to_view = lambda {|controller| controller.send('admin_signed_in?') }
- config.is_allowed_to_update = lambda {|controller| controller.send('admin_signed_in?') }
-end
+#AdminData.config do |config|
+# config.is_allowed_to_view = lambda {|controller| controller.send('admin_signed_in?') }
+# config.is_allowed_to_update = lambda {|controller| controller.send('admin_signed_in?') }
+#end
@@ -36,6 +36,11 @@
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [ :email ]
+ # Configure which authentication keys should have whitespace stripped.
+ # These keys will have whitespace before and after removed upon creating or
+ # modifying a user and when used to authenticate or find a user. Default is :email.
+ config.strip_whitespace_keys = [ :email ]
+
# Tell if authentication through request.params is enabled. True by default.
# config.params_authenticatable = true
@@ -48,6 +53,11 @@
# The realm used in Http Basic Authentication. "Application" by default.
# config.http_authentication_realm = "Application"
+ # It will change confirmation, password recovery and other workflows
+ # to behave the same regardless if the e-mail provided was right or wrong.
+ # Does not affect registerable.
+ # config.paranoid = true
+
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
@@ -174,8 +184,8 @@
# Explorer requests.
# config.navigational_formats = [:"*/*", "*/*", :html]
- # The default HTTP method used to sign out a resource. Default is :get.
- # config.sign_out_via = :get
+ # The default HTTP method used to sign out a resource. Default is :delete.
+ config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
@@ -3,6 +3,7 @@
en:
errors:
messages:
+ expired: "has expired, please request a new one"
not_found: "not found"
already_confirmed: "was already confirmed, please try signing in"
not_locked: "was not locked"
@@ -26,8 +27,10 @@ en:
passwords:
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
confirmations:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. You are now signed in.'
registrations:
signed_up: 'Welcome! You have signed up successfully.'
@@ -37,6 +40,7 @@ en:
unlocks:
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
unlocked: 'Your account was successfully unlocked. You are now signed in.'
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
omniauth_callbacks:
success: 'Successfully authorized from %{kind} account.'
failure: 'Could not authorize you from %{kind} because "%{reason}".'
View
@@ -11,11 +11,11 @@ Feature: Users have accounts
And I log in as johnf@inodes.org
Then I should be logged in as johnf
- @production
- Scenario: Only admin users can see the admin data
- Given I register and confirm an account for johnf@inodes.org with handle johnf
- When I go to the admin data root page
- Then I should see "not authorized"
+# @production
+# Scenario: Only admin users can see the admin data
+# Given I register and confirm an account for johnf@inodes.org with handle johnf
+# When I go to the admin data root page
+# Then I should see "not authorized"
@production
Scenario: Only admin users can see delayed_job_admin
@@ -57,6 +57,10 @@ def current_email_address
end
Then /^(?:I|they|"([^"]*?)") should receive (an|no|\d+) emails? with subject "([^"]*?)"$/ do |address, amount, subject|
+ unread_emails_for(address).select { |m| m.subject =~ Regexp.new(Regexp.escape(subject)) }.size.should == parse_email_count(amount)
+end
+
+Then /^(?:I|they|"([^"]*?)") should receive (an|no|\d+) emails? with subject \/([^"]*?)\/$/ do |address, amount, subject|
unread_emails_for(address).select { |m| m.subject =~ Regexp.new(subject) }.size.should == parse_email_count(amount)
end
@@ -77,10 +81,18 @@ def current_email_address
open_email(address, :with_subject => subject)
end
+When /^(?:I|they|"([^"]*?)") opens? the email with subject \/([^"]*?)\/$/ do |address, subject|
+ open_email(address, :with_subject => Regexp.new(subject))
+end
+
When /^(?:I|they|"([^"]*?)") opens? the email with text "([^"]*?)"$/ do |address, text|
open_email(address, :with_text => text)
end
+When /^(?:I|they|"([^"]*?)") opens? the email with text \/([^"]*?)\/$/ do |address, text|
+ open_email(address, :with_text => Regexp.new(text))
+end
+
#
# Inspect the Email Contents
#
@@ -32,12 +32,12 @@ def with_scope(locator)
World(WithinHelpers)
# Single-line step scoper
-When /^(.*) within ([^:]+)$/ do |step, parent|
+When /^(.*) within (.*[^:])$/ do |step, parent|
with_scope(parent) { When step }
end
# Multi-line step scoper
-When /^(.*) within ([^:]+):$/ do |step, parent, table_or_string|
+When /^(.*) within (.*[^:]):$/ do |step, parent, table_or_string|
with_scope(parent) { When "#{step}:", table_or_string }
end
View
@@ -37,3 +37,14 @@
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end
+# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
+# See the DatabaseCleaner documentation for details. Example:
+#
+# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
+# DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]}
+# end
+#
+# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
+# DatabaseCleaner.strategy = :transaction
+# end
+#
@@ -8,7 +8,7 @@ module NavigationHelpers
def path_to(page_name)
case page_name
- when /the home\s?page/
+ when /^the home\s?page$/
'/'
# Add more mappings here.
@@ -21,10 +21,10 @@ def path_to(page_name)
else
begin
- page_name =~ /the (.*) page/
+ page_name =~ /^the (.*) page$/
path_components = $1.split(/\s+/)
self.send(path_components.push('path').join('_').to_sym)
- rescue Object => e
+ rescue NoMethodError, ArgumentError
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in #{__FILE__}"
end
@@ -8,13 +8,13 @@ module HtmlSelectorsHelpers
def selector_for(locator)
case locator
- when /the page/
+ when "the page"
"html > body"
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
#
- # when /the (notice|error|info) flash/
+ # when /^the (notice|error|info) flash$/
# ".flash.#{$1}"
# You can also return an array to use a different selector
@@ -26,7 +26,7 @@ def selector_for(locator)
# This allows you to provide a quoted selector as the scope
# for "within" steps as was previously the default for the
# web steps:
- when /"(.+)"/
+ when /^"(.+)"$/
$1
else
View
@@ -34,6 +34,12 @@ begin
desc 'Run all features'
task :all => [:ok, :wip]
+
+ task :statsetup do
+ require 'rails/code_statistics'
+ ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
+ ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
+ end
end
desc 'Alias for cucumber:ok'
task :cucumber => 'cucumber:ok'
@@ -47,6 +53,8 @@ begin
# In case we don't have ActiveRecord, append a no-op task that we can depend upon.
task 'db:test:prepare' do
end
+
+ task :stats => 'cucumber:statsetup'
rescue LoadError
desc 'cucumber rake task not available (cucumber not installed)'
task :cucumber do

0 comments on commit a936c68

Please sign in to comment.