Skip to content
Permalink
Browse files

rails 3 via suspenders gem, modified for postgres. install instructio…

…ns in doc/README_FOR_APP.
  • Loading branch information...
croaky committed Oct 8, 2010
0 parents commit 254f7419f9bae68452ebc0f3feab299261046f61
Showing with 3,439 additions and 0 deletions.
  1. +14 −0 .gitignore
  2. +1 −0 .rspec
  3. +23 −0 .trout
  4. +35 −0 Gemfile
  5. +180 −0 Gemfile.lock
  6. +7 −0 Rakefile
  7. +4 −0 app/controllers/application_controller.rb
  8. +2 −0 app/helpers/application_helper.rb
  9. +7 −0 app/helpers/body_class_helper.rb
  10. 0 app/models/.gitkeep
  11. +3 −0 app/models/user.rb
  12. +22 −0 app/views/layouts/application.html.erb
  13. 0 app/views/pages/.gitkeep
  14. +5 −0 app/views/shared/_flashes.html.erb
  15. +2 −0 app/views/shared/_javascript.html.erb
  16. +2 −0 autotest/discover.rb
  17. +4 −0 config.ru
  18. +45 −0 config/application.rb
  19. +13 −0 config/boot.rb
  20. +8 −0 config/cucumber.yml
  21. +15 −0 config/database.yml
  22. +5 −0 config/environment.rb
  23. +28 −0 config/environments/development.rb
  24. +51 −0 config/environments/production.rb
  25. +51 −0 config/environments/staging.rb
  26. +37 −0 config/environments/test.rb
  27. +7 −0 config/initializers/backtrace_silencers.rb
  28. +3 −0 config/initializers/clearance.rb
  29. +26 −0 config/initializers/errors.rb
  30. +10 −0 config/initializers/inflections.rb
  31. +5 −0 config/initializers/mime_types.rb
  32. +7 −0 config/initializers/secret_token.rb
  33. +8 −0 config/initializers/session_store.rb
  34. +5 −0 config/initializers/time_formats.rb
  35. +5 −0 config/locales/en.yml
  36. +60 −0 config/routes.rb
  37. 0 db/migrate/.gitkeep
  38. +20 −0 db/migrate/20101008191318_clearance_create_users.rb
  39. +7 −0 db/seeds.rb
  40. +25 −0 doc/README_FOR_APP
  41. +166 −0 doc/README_FOR_SUSPENDERS
  42. +33 −0 features/password_reset.feature
  43. +35 −0 features/sign_in.feature
  44. +15 −0 features/sign_out.feature
  45. +45 −0 features/sign_up.feature
  46. +133 −0 features/step_definitions/clearance_steps.rb
  47. +1 −0 features/step_definitions/factory_girl_steps.rb
  48. +219 −0 features/step_definitions/web_steps.rb
  49. +59 −0 features/support/env.rb
  50. +39 −0 features/support/paths.rb
  51. 0 lib/tasks/.gitkeep
  52. +53 −0 lib/tasks/cucumber.rake
  53. 0 log/.gitkeep
  54. +26 −0 public/404.html
  55. +26 −0 public/422.html
  56. +26 −0 public/500.html
  57. 0 public/favicon.ico
  58. +85 −0 public/flutie/stylesheets/defaults.css
  59. +117 −0 public/flutie/stylesheets/forms.css
  60. +25 −0 public/flutie/stylesheets/lists.css
  61. +49 −0 public/flutie/stylesheets/reset.css
  62. 0 public/flutie/stylesheets/screen.css
  63. +27 −0 public/flutie/stylesheets/tables.css
  64. +90 −0 public/flutie/stylesheets/type.css
  65. 0 public/images/.gitkeep
  66. 0 public/javascripts/.gitkeep
  67. 0 public/javascripts/application.js
  68. +1,012 −0 public/javascripts/jquery-ui.js
  69. +154 −0 public/javascripts/jquery.js
  70. +59 −0 public/javascripts/prefilled_input.js
  71. +132 −0 public/javascripts/rails.js
  72. +5 −0 public/robots.txt
  73. 0 public/stylesheets/.gitkeep
  74. 0 public/stylesheets/sass/screen.scss
  75. 0 public/stylesheets/screen.css
  76. +10 −0 script/cucumber
  77. +6 −0 script/rails
  78. +13 −0 spec/factories/clearance.rb
  79. +27 −0 spec/spec_helper.rb
  80. 0 spec/support/.gitkeep
  81. 0 vendor/plugins/.gitkeep
@@ -0,0 +1,14 @@
.bundle
db/*.sqlite3
log/*.log
tmp/**/*
db/schema.rb
public/system
*.DS_Store
coverage/*
*.swp
rerun.txt
tags
!.keep
vendor/bundler_gems
.rvmrc
1 .rspec
@@ -0,0 +1 @@
--colour
23 .trout
@@ -0,0 +1,23 @@
---
:files:
public/javascripts/jquery.js:
:source_root: template/trout
:version: 6db58040576df1614876332dff9601bcf77f7f57
:git_url: git://github.com/thoughtbot/suspenders-gem.git
:filename: public/javascripts/jquery.js
public/javascripts/prefilled_input.js:
:source_root: template/trout
:version: 6db58040576df1614876332dff9601bcf77f7f57
:git_url: git://github.com/thoughtbot/suspenders-gem.git
:filename: public/javascripts/prefilled_input.js
Gemfile:
:source_root: template/trout
:version: 6db58040576df1614876332dff9601bcf77f7f57
:git_url: git://github.com/thoughtbot/suspenders-gem.git
:filename: Gemfile
public/javascripts/jquery-ui.js:
:source_root: template/trout
:version: 6db58040576df1614876332dff9601bcf77f7f57
:git_url: git://github.com/thoughtbot/suspenders-gem.git
:filename: public/javascripts/jquery-ui.js
:version: "1.0"
35 Gemfile
@@ -0,0 +1,35 @@
source :rubygems

gem "rails", ">= 3.0"
gem "rack"
gem "clearance", "0.9.0.rc9"
gem "haml"
gem "high_voltage"
gem "hoptoad_notifier"
gem "RedCloth", :require => "redcloth"
gem "paperclip"
gem "will_paginate"
gem "formtastic"
gem "pg"
gem "flutie"
gem "dynamic_form"

# http://blog.davidchelimsky.net/2010/07/11/rspec-rails-2-generators-and-rake-tasks/
group :development, :test, :cucumber do
gem "rspec-rails", "~> 2.0.0.rc"
gem "ruby-debug"
end

group :test, :cucumber do
gem "cucumber-rails"
gem "factory_girl_rails"
gem "bourne"
gem "capybara"
gem "database_cleaner"
gem "fakeweb"
gem "nokogiri"
gem "timecop"
gem "treetop"
gem "shoulda"
gem "launchy"
end
@@ -0,0 +1,180 @@
GEM
remote: http://rubygems.org/
specs:
RedCloth (4.2.3)
abstract (1.0.0)
actionmailer (3.0.0)
actionpack (= 3.0.0)
mail (~> 2.2.5)
actionpack (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
tzinfo (~> 0.3.23)
activemodel (3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
arel (~> 1.0.0)
tzinfo (~> 0.3.23)
activeresource (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
arel (1.0.1)
activesupport (~> 3.0.0)
bourne (1.0)
mocha (= 0.9.8)
builder (2.1.2)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3)
clearance (0.9.0.rc9)
rails (~> 3.0.0)
columnize (0.3.1)
configuration (1.1.0)
cucumber (0.9.2)
builder (~> 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.2.5)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.12)
database_cleaner (0.5.2)
diff-lcs (1.1.2)
dynamic_form (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (1.3.2)
factory_girl_rails (1.0)
factory_girl (~> 1.3)
rails (>= 3.0.0.beta4)
fakeweb (1.3.0)
ffi (0.6.3)
rake (>= 0.8.7)
flutie (1.0.4)
formtastic (1.1.0)
actionpack (>= 2.3.0)
activesupport (>= 2.3.0)
i18n (>= 0.4.0)
gherkin (2.2.8)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
haml (3.0.21)
high_voltage (0.9.1)
hoptoad_notifier (2.3.8)
activesupport
i18n (0.4.1)
json (1.4.6)
json_pure (1.4.6)
launchy (0.3.7)
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
mail (2.2.7)
activesupport (>= 2.3.6)
mime-types
treetop (>= 1.4.5)
mime-types (1.16)
mocha (0.9.8)
rake
nokogiri (1.4.3.1)
paperclip (2.3.4)
activerecord
activesupport
pg (0.9.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack (>= 1.0.0)
rack-test (0.5.6)
rack (>= 1.0)
rails (3.0.0)
actionmailer (= 3.0.0)
actionpack (= 3.0.0)
activerecord (= 3.0.0)
activeresource (= 3.0.0)
activesupport (= 3.0.0)
bundler (~> 1.0.0)
railties (= 3.0.0)
railties (3.0.0)
actionpack (= 3.0.0)
activesupport (= 3.0.0)
rake (>= 0.8.4)
thor (~> 0.14.0)
rake (0.8.7)
rspec (2.0.0.rc)
rspec-core (= 2.0.0.rc)
rspec-expectations (= 2.0.0.rc)
rspec-mocks (= 2.0.0.rc)
rspec-core (2.0.0.rc)
rspec-expectations (2.0.0.rc)
diff-lcs (>= 1.1.2)
rspec-mocks (2.0.0.rc)
rspec-core (= 2.0.0.rc)
rspec-expectations (= 2.0.0.rc)
rspec-rails (2.0.0.rc)
rspec (= 2.0.0.rc)
ruby-debug (0.10.3)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.3.0)
ruby-debug-base (0.10.3)
linecache (>= 0.3)
rubyzip (0.9.4)
selenium-webdriver (0.0.28)
ffi (>= 0.6.1)
json_pure
rubyzip
shoulda (2.11.3)
term-ansicolor (1.0.5)
thor (0.14.3)
timecop (0.3.5)
treetop (1.4.8)
polyglot (>= 0.3.1)
tzinfo (0.3.23)
will_paginate (2.3.15)

PLATFORMS
ruby

DEPENDENCIES
RedCloth
bourne
capybara
clearance (= 0.9.0.rc9)
cucumber-rails
database_cleaner
dynamic_form
factory_girl_rails
fakeweb
flutie
formtastic
haml
high_voltage
hoptoad_notifier
launchy
nokogiri
paperclip
pg
rack
rails (>= 3.0)
rspec-rails (~> 2.0.0.rc)
ruby-debug
shoulda
timecop
treetop
will_paginate
@@ -0,0 +1,7 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)
require 'rake'

Reliefhub::Application.load_tasks
@@ -0,0 +1,4 @@
class ApplicationController < ActionController::Base
include Clearance::Authentication
protect_from_forgery
end
@@ -0,0 +1,2 @@
module ApplicationHelper
end
@@ -0,0 +1,7 @@
module BodyClassHelper
# TODO: move this into a gem/plugin
def body_class
qualified_controller_name = controller.controller_path.gsub('/','-')
"#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
end
end
No changes.
@@ -0,0 +1,3 @@
class User < ActiveRecord::Base
include Clearance::User
end
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>reliefhub</title>
<%= stylesheet_link_tag :flutie, 'screen', :media => 'all', :cache => true %>
<%= javascript_include_tag "jquery", "jquery-ui", "prefilled_input", "rails", "application", :cache => true %>
<%= csrf_meta_tag %>
</head>
<body class="<%= body_class %>">
<div id="header">
<% if signed_in? -%>
<%= link_to "Sign out", sign_out_path, :method => :delete %>
<% else -%>
<%= link_to "Sign in", sign_in_path %>
<% end -%>
</div>
<%= render :partial => 'shared/flashes' -%>
<%= yield %>
<%= render :partial => 'shared/javascript' %>
</body>
</html>
No changes.
@@ -0,0 +1,5 @@
<div id="flash">
<% flash.each do |key, value| -%>
<div id="flash_<%= key %>"><%=h value %></div>
<% end -%>
</div>
@@ -0,0 +1,2 @@
<%= javascript_include_tag 'jquery', 'jquery-ui', 'prefilled_input', :cache => true %>
<%= yield :javascript %>
@@ -0,0 +1,2 @@
Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }
@@ -0,0 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run Reliefhub::Application
@@ -0,0 +1,45 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'

# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)

module Reliefhub
class Application < Rails::Application
config.generators do |generate|
generate.test_framework :rspec
end
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]

# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer

# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de

# JavaScript files you want as :defaults (application.js is always included).
config.action_view.javascript_expansions[:defaults] = %w()

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
end
end
@@ -0,0 +1,13 @@
require 'rubygems'

# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
@@ -0,0 +1,8 @@
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

0 comments on commit 254f741

Please sign in to comment.
You can’t perform that action at this time.