path-email_spec 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +199 -0
- data/MIT-LICENSE.txt +19 -0
- data/README.rdoc +137 -0
- data/Rakefile +64 -0
- data/examples/rails3_root/Gemfile +24 -0
- data/examples/rails3_root/README +5 -0
- data/examples/rails3_root/Rakefile +11 -0
- data/examples/rails3_root/app/controllers/application_controller.rb +3 -0
- data/examples/rails3_root/app/controllers/welcome_controller.rb +16 -0
- data/examples/rails3_root/app/helpers/application_helper.rb +2 -0
- data/examples/rails3_root/app/mailers/user_mailer.rb +39 -0
- data/examples/rails3_root/app/models/user.rb +2 -0
- data/examples/rails3_root/app/views/user_mailer/attachments.html.erb +6 -0
- data/examples/rails3_root/app/views/user_mailer/newsletter.html.erb +8 -0
- data/examples/rails3_root/app/views/user_mailer/signup.html.erb +3 -0
- data/examples/rails3_root/app/views/welcome/attachments.html.erb +0 -0
- data/examples/rails3_root/app/views/welcome/confirm.html.erb +1 -0
- data/examples/rails3_root/app/views/welcome/index.html.erb +8 -0
- data/examples/rails3_root/app/views/welcome/newsletter.html.erb +0 -0
- data/examples/rails3_root/app/views/welcome/signup.html.erb +1 -0
- data/examples/rails3_root/attachments/document.pdf +0 -0
- data/examples/rails3_root/attachments/image.png +0 -0
- data/examples/rails3_root/config.ru +4 -0
- data/examples/rails3_root/config/application.rb +43 -0
- data/examples/rails3_root/config/boot.rb +14 -0
- data/examples/rails3_root/config/cucumber.yml +7 -0
- data/examples/rails3_root/config/database.yml +25 -0
- data/examples/rails3_root/config/environment.rb +6 -0
- data/examples/rails3_root/config/environments/development.rb +19 -0
- data/examples/rails3_root/config/environments/production.rb +42 -0
- data/examples/rails3_root/config/environments/test.rb +29 -0
- data/examples/rails3_root/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/rails3_root/config/initializers/cookie_verification_secret.rb +7 -0
- data/examples/rails3_root/config/initializers/inflections.rb +10 -0
- data/examples/rails3_root/config/initializers/mime_types.rb +5 -0
- data/examples/rails3_root/config/initializers/rspec_generator.rb +6 -0
- data/examples/rails3_root/config/initializers/session_store.rb +10 -0
- data/examples/rails3_root/config/locales/en.yml +5 -0
- data/examples/rails3_root/config/routes.rb +7 -0
- data/examples/rails3_root/db/migrate/20090125013728_create_users.rb +11 -0
- data/examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb +20 -0
- data/examples/rails3_root/db/schema.rb +32 -0
- data/examples/rails3_root/db/seeds.rb +7 -0
- data/examples/rails3_root/doc/README_FOR_APP +2 -0
- data/examples/rails3_root/features/attachments.feature +27 -0
- data/examples/rails3_root/features/delayed_job.feature +13 -0
- data/examples/rails3_root/features/errors.feature +32 -0
- data/examples/rails3_root/features/example.feature +62 -0
- data/examples/rails3_root/features/step_definitions/user_steps.rb +26 -0
- data/examples/rails3_root/features/step_definitions/web_steps.rb +202 -0
- data/examples/rails3_root/features/support/env.rb +59 -0
- data/examples/rails3_root/features/support/env_ext.rb +2 -0
- data/examples/rails3_root/features/support/paths.rb +33 -0
- data/examples/rails3_root/lib/tasks/cucumber.rake +47 -0
- data/examples/rails3_root/lib/tasks/rspec.rake +69 -0
- data/examples/rails3_root/public/404.html +26 -0
- data/examples/rails3_root/public/422.html +26 -0
- data/examples/rails3_root/public/500.html +26 -0
- data/examples/rails3_root/public/favicon.ico +0 -0
- data/examples/rails3_root/public/images/rails.png +0 -0
- data/examples/rails3_root/public/javascripts/application.js +2 -0
- data/examples/rails3_root/public/javascripts/controls.js +965 -0
- data/examples/rails3_root/public/javascripts/dragdrop.js +974 -0
- data/examples/rails3_root/public/javascripts/effects.js +1123 -0
- data/examples/rails3_root/public/javascripts/prototype.js +4874 -0
- data/examples/rails3_root/public/javascripts/rails.js +109 -0
- data/examples/rails3_root/public/robots.txt +5 -0
- data/examples/rails3_root/script/cucumber +10 -0
- data/examples/rails3_root/script/rails +9 -0
- data/examples/rails3_root/spec/controllers/welcome_controller_spec.rb +18 -0
- data/examples/rails3_root/spec/models/user_mailer_spec.rb +47 -0
- data/examples/rails3_root/spec/spec.opts +2 -0
- data/examples/rails3_root/spec/spec_helper.rb +19 -0
- data/examples/rails_root/Rakefile +13 -0
- data/examples/rails_root/app/controllers/application_controller.rb +15 -0
- data/examples/rails_root/app/controllers/welcome_controller.rb +16 -0
- data/examples/rails_root/app/helpers/application_helper.rb +3 -0
- data/examples/rails_root/app/helpers/welcome_helper.rb +2 -0
- data/examples/rails_root/app/models/user.rb +2 -0
- data/examples/rails_root/app/models/user_mailer.rb +39 -0
- data/examples/rails_root/app/views/user_mailer/attachments.erb +6 -0
- data/examples/rails_root/app/views/user_mailer/newsletter.erb +8 -0
- data/examples/rails_root/app/views/user_mailer/signup.erb +3 -0
- data/examples/rails_root/app/views/welcome/attachments.html.erb +0 -0
- data/examples/rails_root/app/views/welcome/confirm.html.erb +1 -0
- data/examples/rails_root/app/views/welcome/index.html.erb +8 -0
- data/examples/rails_root/app/views/welcome/newsletter.html.erb +0 -0
- data/examples/rails_root/app/views/welcome/signup.html.erb +1 -0
- data/examples/rails_root/attachments/document.pdf +0 -0
- data/examples/rails_root/attachments/image.png +0 -0
- data/examples/rails_root/config/boot.rb +110 -0
- data/examples/rails_root/config/cucumber.yml +7 -0
- data/examples/rails_root/config/database.yml +25 -0
- data/examples/rails_root/config/environment.rb +28 -0
- data/examples/rails_root/config/environments/cucumber.rb +29 -0
- data/examples/rails_root/config/environments/development.rb +17 -0
- data/examples/rails_root/config/environments/production.rb +28 -0
- data/examples/rails_root/config/environments/test.rb +28 -0
- data/examples/rails_root/config/initializers/inflections.rb +10 -0
- data/examples/rails_root/config/initializers/mime_types.rb +5 -0
- data/examples/rails_root/config/initializers/new_rails_defaults.rb +17 -0
- data/examples/rails_root/config/routes.rb +45 -0
- data/examples/rails_root/db/migrate/20090125013728_create_users.rb +11 -0
- data/examples/rails_root/db/migrate/20090908054656_create_delayed_jobs.rb +20 -0
- data/examples/rails_root/db/schema.rb +32 -0
- data/examples/rails_root/doc/README_FOR_APP +5 -0
- data/examples/rails_root/features/attachments.feature +27 -0
- data/examples/rails_root/features/delayed_job.feature +13 -0
- data/examples/rails_root/features/errors.feature +32 -0
- data/examples/rails_root/features/example.feature +62 -0
- data/examples/rails_root/features/step_definitions/user_steps.rb +26 -0
- data/examples/rails_root/features/step_definitions/web_steps.rb +273 -0
- data/examples/rails_root/features/support/env.rb +58 -0
- data/examples/rails_root/features/support/env_ext.rb +6 -0
- data/examples/rails_root/features/support/paths.rb +33 -0
- data/examples/rails_root/lib/tasks/cucumber.rake +47 -0
- data/examples/rails_root/public/404.html +30 -0
- data/examples/rails_root/public/422.html +30 -0
- data/examples/rails_root/public/500.html +33 -0
- data/examples/rails_root/public/dispatch.rb +10 -0
- data/examples/rails_root/public/favicon.ico +0 -0
- data/examples/rails_root/public/images/rails.png +0 -0
- data/examples/rails_root/public/javascripts/application.js +2 -0
- data/examples/rails_root/public/javascripts/controls.js +963 -0
- data/examples/rails_root/public/javascripts/dragdrop.js +973 -0
- data/examples/rails_root/public/javascripts/effects.js +1128 -0
- data/examples/rails_root/public/javascripts/prototype.js +4320 -0
- data/examples/rails_root/public/robots.txt +5 -0
- data/examples/rails_root/script/about +4 -0
- data/examples/rails_root/script/autospec +5 -0
- data/examples/rails_root/script/console +3 -0
- data/examples/rails_root/script/cucumber +10 -0
- data/examples/rails_root/script/dbconsole +3 -0
- data/examples/rails_root/script/delayed_job +5 -0
- data/examples/rails_root/script/destroy +3 -0
- data/examples/rails_root/script/generate +3 -0
- data/examples/rails_root/script/performance/benchmarker +3 -0
- data/examples/rails_root/script/performance/profiler +3 -0
- data/examples/rails_root/script/performance/request +3 -0
- data/examples/rails_root/script/plugin +3 -0
- data/examples/rails_root/script/process/inspector +3 -0
- data/examples/rails_root/script/process/reaper +3 -0
- data/examples/rails_root/script/process/spawner +3 -0
- data/examples/rails_root/script/runner +3 -0
- data/examples/rails_root/script/server +3 -0
- data/examples/rails_root/script/spec +5 -0
- data/examples/rails_root/script/spec_server +125 -0
- data/examples/rails_root/spec/controllers/welcome_controller_spec.rb +15 -0
- data/examples/rails_root/spec/model_factory.rb +6 -0
- data/examples/rails_root/spec/models/user_mailer_spec.rb +58 -0
- data/examples/rails_root/spec/models/user_spec.rb +5 -0
- data/examples/rails_root/spec/rcov.opts +2 -0
- data/examples/rails_root/spec/spec.opts +4 -0
- data/examples/rails_root/spec/spec_helper.rb +51 -0
- data/examples/sinatra/app.rb +33 -0
- data/examples/sinatra/features/errors.feature +32 -0
- data/examples/sinatra/features/example.feature +62 -0
- data/examples/sinatra/features/step_definitions/user_steps.rb +26 -0
- data/examples/sinatra/features/step_definitions/web_steps.rb +273 -0
- data/examples/sinatra/features/support/env.rb +39 -0
- data/examples/sinatra/features/support/paths.rb +24 -0
- data/install.rb +0 -0
- data/lib/email-spec.rb +1 -0
- data/lib/email_spec.rb +15 -0
- data/lib/email_spec/address_converter.rb +29 -0
- data/lib/email_spec/background_processes.rb +45 -0
- data/lib/email_spec/cucumber.rb +26 -0
- data/lib/email_spec/deliveries.rb +87 -0
- data/lib/email_spec/email_viewer.rb +87 -0
- data/lib/email_spec/helpers.rb +164 -0
- data/lib/email_spec/matchers.rb +225 -0
- data/lib/generators/email_spec/steps/USAGE +5 -0
- data/lib/generators/email_spec/steps/steps_generator.rb +14 -0
- data/lib/generators/email_spec/steps/templates/email_steps.rb +194 -0
- data/rails_generators/email_spec/email_spec_generator.rb +17 -0
- data/rails_generators/email_spec/templates/email_steps.rb +182 -0
- data/spec/email_spec/helpers_spec.rb +21 -0
- data/spec/email_spec/matchers_spec.rb +430 -0
- data/spec/spec_helper.rb +16 -0
- metadata +407 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/testtask'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
require 'delayed/tasks'
|
10
|
+
|
11
|
+
Rails::Application.load_tasks
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class WelcomeController < ApplicationController
|
2
|
+
def signup
|
3
|
+
UserMailer.signup(params['Email'], params['Name']).deliver
|
4
|
+
end
|
5
|
+
|
6
|
+
def confirm
|
7
|
+
end
|
8
|
+
|
9
|
+
def newsletter
|
10
|
+
UserMailer.signup(params['Email'], params['Name']).send_later(:deliver)
|
11
|
+
end
|
12
|
+
|
13
|
+
def attachments
|
14
|
+
UserMailer.attachments_mail(params['Email'], params['Name']).deliver
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class UserMailer < ActionMailer::Base
|
2
|
+
default :from => "admin@example.com",
|
3
|
+
:sent_on => Time.now.to_s
|
4
|
+
|
5
|
+
|
6
|
+
def signup(email, name)
|
7
|
+
@name = name
|
8
|
+
|
9
|
+
mail :to => email,
|
10
|
+
:subject => "Account confirmation"
|
11
|
+
end
|
12
|
+
|
13
|
+
def newsletter(email, name)
|
14
|
+
@name = name
|
15
|
+
|
16
|
+
mail :to => email,
|
17
|
+
:subject => "Newsletter sent"
|
18
|
+
end
|
19
|
+
|
20
|
+
def attachments_mail(email, name)
|
21
|
+
@name = name
|
22
|
+
|
23
|
+
add_attachment 'image.png'
|
24
|
+
add_attachment 'document.pdf'
|
25
|
+
|
26
|
+
mail :to => email,
|
27
|
+
:subject => "Attachments test"
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def add_attachment(attachment_name)
|
33
|
+
attachment_path = "#{Rails.root}/attachments/#{attachment_name}"
|
34
|
+
File.open(attachment_path) do |file|
|
35
|
+
filename = File.basename(file.path)
|
36
|
+
attachments[filename] = {:content_type => File.mime_type?(file), :content => file.read}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Confirm your new account!
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Thanks! Go check your email!
|
Binary file
|
Binary file
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module Rails3Root
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Add additional load paths for your own custom dirs
|
16
|
+
# config.load_paths += %W( #{config.root}/extras )
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# Configure generators values. Many other options are available, be sure to check the documentation.
|
34
|
+
# config.generators do |g|
|
35
|
+
# g.orm :active_record
|
36
|
+
# g.template_engine :erb
|
37
|
+
# g.test_framework :test_unit, :fixture => true
|
38
|
+
# end
|
39
|
+
|
40
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
41
|
+
config.filter_parameters << :password
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Use locked gems if present.
|
2
|
+
begin
|
3
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
4
|
+
|
5
|
+
rescue LoadError
|
6
|
+
# Otherwise, use RubyGems.
|
7
|
+
require 'rubygems'
|
8
|
+
|
9
|
+
# And set up the gems listed in the Gemfile.
|
10
|
+
if File.exist?(File.expand_path('../../Gemfile', __FILE__))
|
11
|
+
require 'bundler'
|
12
|
+
Bundler.setup
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: <%= std_opts %>
|
7
|
+
wip: --tags @wip:3 --wip features
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test: &TEST
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
23
|
+
|
24
|
+
cucumber:
|
25
|
+
<<: *TEST
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Rails3Root::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Disable request forgery protection in test environment
|
18
|
+
config.action_controller.allow_forgery_protection = false
|
19
|
+
|
20
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
21
|
+
# The :test delivery method accumulates sent emails in the
|
22
|
+
# ActionMailer::Base.deliveries array.
|
23
|
+
config.action_mailer.delivery_method = :test
|
24
|
+
|
25
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
26
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
27
|
+
# like if you have constraints or database-specific column types
|
28
|
+
# config.active_record.schema_format = :sql
|
29
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Rails.application.config.cookie_secret = 'c63e0079364c42f86ef0256e8eb5e8f6993b30f1e64e4374f5211ddf4efdcd0895282c6383bd58dc817716b7ecc15f52de122e2df27fa326266d4163e4e5fe7d'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Rails.application.config.session_store :cookie_store, {
|
4
|
+
:key => '_rails3_root_session',
|
5
|
+
}
|
6
|
+
|
7
|
+
# Use the database for sessions instead of the cookie-based default,
|
8
|
+
# which shouldn't be used to store highly confidential information
|
9
|
+
# (create the session table with "rake db:sessions:create")
|
10
|
+
# Rails.application.config.session_store :active_record_store
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Rails3Root::Application.routes.draw do |map|
|
2
|
+
root :to => "welcome#index"
|
3
|
+
match "/confirm" => "welcome#confirm", :as => :confirm_account
|
4
|
+
match "/newsletter" => "welcome#newsletter", :as => :request_newsletter
|
5
|
+
match "/attachments" => "welcome#attachments", :as => :request_attachments
|
6
|
+
match "/welcome/signup" => "welcome#signup"
|
7
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateDelayedJobs < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :delayed_jobs, :force => true do |table|
|
4
|
+
table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
|
5
|
+
table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
|
6
|
+
table.text :handler # YAML-encoded string of the object that will do work
|
7
|
+
table.text :last_error # reason for last failure (See Note below)
|
8
|
+
table.datetime :run_at # When to run. Could be Time.now for immediately, or sometime in the future.
|
9
|
+
table.datetime :locked_at # Set when a client is working on this object
|
10
|
+
table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
|
11
|
+
table.string :locked_by # Who is working on this object (if locked)
|
12
|
+
table.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :delayed_jobs
|
19
|
+
end
|
20
|
+
end
|