bakedweb-model_notifier 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/.gitignore +8 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +7 -0
  4. data/Rakefile +13 -0
  5. data/VERSION +1 -0
  6. data/cucumber.yml +2 -0
  7. data/features/model_notifier.feature +24 -0
  8. data/features/step_definitions/email_steps.rb +74 -0
  9. data/features/step_definitions/model_notifier_steps.rb +18 -0
  10. data/features/support/env.rb +12 -0
  11. data/lib/model_notifier.rb +61 -0
  12. data/spec/lib/model_notifier_spec.rb +82 -0
  13. data/spec/rcov.opts +2 -0
  14. data/spec/spec.opts +4 -0
  15. data/spec/spec_helper.rb +53 -0
  16. data/test_rails_app/README +256 -0
  17. data/test_rails_app/Rakefile +10 -0
  18. data/test_rails_app/app/controllers/application.rb +15 -0
  19. data/test_rails_app/app/helpers/application_helper.rb +3 -0
  20. data/test_rails_app/app/models/contact_form.rb +2 -0
  21. data/test_rails_app/app/models/foo.rb +2 -0
  22. data/test_rails_app/app/views/model_notifier/contact_form/notification_email.erb +2 -0
  23. data/test_rails_app/app/views/model_notifier/foo/notification_email.erb +1 -0
  24. data/test_rails_app/config/boot.rb +109 -0
  25. data/test_rails_app/config/database.yml +22 -0
  26. data/test_rails_app/config/environment.rb +75 -0
  27. data/test_rails_app/config/environments/development.rb +17 -0
  28. data/test_rails_app/config/environments/production.rb +24 -0
  29. data/test_rails_app/config/environments/test.rb +24 -0
  30. data/test_rails_app/config/initializers/inflections.rb +10 -0
  31. data/test_rails_app/config/initializers/mime_types.rb +5 -0
  32. data/test_rails_app/config/initializers/new_rails_defaults.rb +17 -0
  33. data/test_rails_app/config/locales/en.yml +5 -0
  34. data/test_rails_app/config/routes.rb +43 -0
  35. data/test_rails_app/db/migrate/20090525195411_create_foos.rb +12 -0
  36. data/test_rails_app/db/migrate/20090525200701_create_contact_forms.rb +14 -0
  37. data/test_rails_app/lib/tasks/cucumber.rake +16 -0
  38. data/test_rails_app/lib/tasks/rspec.rake +167 -0
  39. data/test_rails_app/public/404.html +30 -0
  40. data/test_rails_app/public/422.html +30 -0
  41. data/test_rails_app/public/500.html +33 -0
  42. data/test_rails_app/public/dispatch.cgi +10 -0
  43. data/test_rails_app/public/dispatch.fcgi +24 -0
  44. data/test_rails_app/public/dispatch.rb +10 -0
  45. data/test_rails_app/public/favicon.ico +0 -0
  46. data/test_rails_app/public/images/rails.png +0 -0
  47. data/test_rails_app/public/index.html +274 -0
  48. data/test_rails_app/public/javascripts/application.js +2 -0
  49. data/test_rails_app/public/javascripts/controls.js +963 -0
  50. data/test_rails_app/public/javascripts/dragdrop.js +973 -0
  51. data/test_rails_app/public/javascripts/effects.js +1128 -0
  52. data/test_rails_app/public/javascripts/prototype.js +4320 -0
  53. data/test_rails_app/public/robots.txt +5 -0
  54. data/test_rails_app/script/about +4 -0
  55. data/test_rails_app/script/autospec +6 -0
  56. data/test_rails_app/script/console +3 -0
  57. data/test_rails_app/script/cucumber +8 -0
  58. data/test_rails_app/script/dbconsole +3 -0
  59. data/test_rails_app/script/destroy +3 -0
  60. data/test_rails_app/script/generate +3 -0
  61. data/test_rails_app/script/performance/benchmarker +3 -0
  62. data/test_rails_app/script/performance/profiler +3 -0
  63. data/test_rails_app/script/performance/request +3 -0
  64. data/test_rails_app/script/plugin +3 -0
  65. data/test_rails_app/script/process/inspector +3 -0
  66. data/test_rails_app/script/process/reaper +3 -0
  67. data/test_rails_app/script/process/spawner +3 -0
  68. data/test_rails_app/script/runner +3 -0
  69. data/test_rails_app/script/server +3 -0
  70. data/test_rails_app/script/spec +10 -0
  71. data/test_rails_app/script/spec_server +9 -0
  72. metadata +126 -0
@@ -0,0 +1,16 @@
1
+ $LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib')
2
+
3
+ begin
4
+ require 'cucumber/rake/task'
5
+
6
+ Cucumber::Rake::Task.new(:features) do |t|
7
+ t.fork = true
8
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
9
+ end
10
+ task :features => 'db:test:prepare'
11
+ rescue LoadError
12
+ desc 'Cucumber rake task not available'
13
+ task :features do
14
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
15
+ end
16
+ end
@@ -0,0 +1,167 @@
1
+ gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
2
+ rspec_plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec')
3
+ $LOAD_PATH.unshift("#{rspec_plugin_dir}/lib") if File.exist?(rspec_plugin_dir)
4
+
5
+ # Don't load rspec if running "rake gems:*"
6
+ unless ARGV.any? {|a| a =~ /^gems/}
7
+
8
+ begin
9
+ require 'spec/rake/spectask'
10
+ rescue MissingSourceFile
11
+ module Spec
12
+ module Rake
13
+ class SpecTask
14
+ def initialize(name)
15
+ task name do
16
+ # if rspec-rails is a configured gem, this will output helpful material and exit ...
17
+ require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
18
+
19
+ # ... otherwise, do this:
20
+ raise <<-MSG
21
+
22
+ #{"*" * 80}
23
+ * You are trying to run an rspec rake task defined in
24
+ * #{__FILE__},
25
+ * but rspec can not be found in vendor/gems, vendor/plugins or system gems.
26
+ #{"*" * 80}
27
+ MSG
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ Rake.application.instance_variable_get('@tasks').delete('default')
36
+
37
+ spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop
38
+ task :noop do
39
+ end
40
+
41
+ task :default => :spec
42
+ task :stats => "spec:statsetup"
43
+
44
+ desc "Run all specs in spec directory (excluding plugin specs)"
45
+ Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t|
46
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
47
+ t.spec_files = FileList['spec/**/*/*_spec.rb']
48
+ end
49
+
50
+ namespace :spec do
51
+ desc "Run all specs in spec directory with RCov (excluding plugin specs)"
52
+ Spec::Rake::SpecTask.new(:rcov) do |t|
53
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
54
+ t.spec_files = FileList['spec/**/*/*_spec.rb']
55
+ t.rcov = true
56
+ t.rcov_opts = lambda do
57
+ IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
58
+ end
59
+ end
60
+
61
+ desc "Print Specdoc for all specs (excluding plugin specs)"
62
+ Spec::Rake::SpecTask.new(:doc) do |t|
63
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
64
+ t.spec_files = FileList['spec/**/*/*_spec.rb']
65
+ end
66
+
67
+ desc "Print Specdoc for all plugin examples"
68
+ Spec::Rake::SpecTask.new(:plugin_doc) do |t|
69
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
70
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*/*_spec.rb'].exclude('vendor/plugins/rspec/*')
71
+ end
72
+
73
+ [:models, :controllers, :views, :helpers, :lib].each do |sub|
74
+ desc "Run the code examples in spec/#{sub}"
75
+ Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
76
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
77
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
78
+ end
79
+ end
80
+
81
+ desc "Run the code examples in vendor/plugins (except RSpec's own)"
82
+ Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
83
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
84
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*")
85
+ end
86
+
87
+ namespace :plugins do
88
+ desc "Runs the examples for rspec_on_rails"
89
+ Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
90
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
91
+ t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*/*_spec.rb']
92
+ end
93
+ end
94
+
95
+ # Setup specs for stats
96
+ task :statsetup do
97
+ require 'code_statistics'
98
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models')
99
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views')
100
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers')
101
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers')
102
+ ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib')
103
+ ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing')
104
+ ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models')
105
+ ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views')
106
+ ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers')
107
+ ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers')
108
+ ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib')
109
+ ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
110
+ end
111
+
112
+ namespace :db do
113
+ namespace :fixtures do
114
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z."
115
+ task :load => :environment do
116
+ ActiveRecord::Base.establish_connection(Rails.env)
117
+ base_dir = File.join(Rails.root, 'spec', 'fixtures')
118
+ fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir
119
+
120
+ require 'active_record/fixtures'
121
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir.glob(File.join(fixtures_dir, '*.{yml,csv}'))).each do |fixture_file|
122
+ Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*'))
123
+ end
124
+ end
125
+ end
126
+ end
127
+
128
+ namespace :server do
129
+ daemonized_server_pid = File.expand_path("#{RAILS_ROOT}/tmp/pids/spec_server.pid")
130
+
131
+ desc "start spec_server."
132
+ task :start do
133
+ if File.exist?(daemonized_server_pid)
134
+ $stderr.puts "spec_server is already running."
135
+ else
136
+ $stderr.puts %Q{Starting up spec_server ...}
137
+ FileUtils.mkdir_p('tmp/pids') unless test ?d, 'tmp/pids'
138
+ system("ruby", "script/spec_server", "--daemon", "--pid", daemonized_server_pid)
139
+ end
140
+ end
141
+
142
+ desc "stop spec_server."
143
+ task :stop do
144
+ unless File.exist?(daemonized_server_pid)
145
+ $stderr.puts "No server running."
146
+ else
147
+ $stderr.puts "Shutting down spec_server ..."
148
+ system("kill", "-s", "TERM", File.read(daemonized_server_pid).strip) &&
149
+ File.delete(daemonized_server_pid)
150
+ end
151
+ end
152
+
153
+ desc "restart spec_server."
154
+ task :restart => [:stop, :start]
155
+
156
+ desc "check if spec server is running"
157
+ task :status do
158
+ if File.exist?(daemonized_server_pid)
159
+ $stderr.puts %Q{spec_server is running (PID: #{File.read(daemonized_server_pid).gsub("\n","")})}
160
+ else
161
+ $stderr.puts "No server running."
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ end
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The page you were looking for doesn't exist (404)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/404.html -->
25
+ <div class="dialog">
26
+ <h1>The page you were looking for doesn't exist.</h1>
27
+ <p>You may have mistyped the address or the page may have moved.</p>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The change you wanted was rejected (422)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/422.html -->
25
+ <div class="dialog">
26
+ <h1>The change you wanted was rejected.</h1>
27
+ <p>Maybe you tried to change something you didn't have access to.</p>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>We're sorry, but something went wrong (500)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/500.html -->
25
+ <div class="dialog">
26
+ <h1>We're sorry, but something went wrong.</h1>
27
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
28
+ <p><small>(If you're the administrator of this website, then please read
29
+ the log file "<%=h RAILS_ENV %>.log"
30
+ to find out what went wrong.)</small></p>
31
+ </div>
32
+ </body>
33
+ </html>
@@ -0,0 +1,10 @@
1
+ #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
2
+
3
+ require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
4
+
5
+ # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
6
+ # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
7
+ require "dispatcher"
8
+
9
+ ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
10
+ Dispatcher.dispatch
@@ -0,0 +1,24 @@
1
+ #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
2
+ #
3
+ # You may specify the path to the FastCGI crash log (a log of unhandled
4
+ # exceptions which forced the FastCGI instance to exit, great for debugging)
5
+ # and the number of requests to process before running garbage collection.
6
+ #
7
+ # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
8
+ # and the GC period is nil (turned off). A reasonable number of requests
9
+ # could range from 10-100 depending on the memory footprint of your app.
10
+ #
11
+ # Example:
12
+ # # Default log path, normal GC behavior.
13
+ # RailsFCGIHandler.process!
14
+ #
15
+ # # Default log path, 50 requests between GC.
16
+ # RailsFCGIHandler.process! nil, 50
17
+ #
18
+ # # Custom log path, normal GC behavior.
19
+ # RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
20
+ #
21
+ require File.dirname(__FILE__) + "/../config/environment"
22
+ require 'fcgi_handler'
23
+
24
+ RailsFCGIHandler.process!
@@ -0,0 +1,10 @@
1
+ #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
2
+
3
+ require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
4
+
5
+ # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
6
+ # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
7
+ require "dispatcher"
8
+
9
+ ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
10
+ Dispatcher.dispatch
File without changes
@@ -0,0 +1,274 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <title>Ruby on Rails: Welcome aboard</title>
7
+ <style type="text/css" media="screen">
8
+ body {
9
+ margin: 0;
10
+ margin-bottom: 25px;
11
+ padding: 0;
12
+ background-color: #f0f0f0;
13
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
14
+ font-size: 13px;
15
+ color: #333;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 28px;
20
+ color: #000;
21
+ }
22
+
23
+ a {color: #03c}
24
+ a:hover {
25
+ background-color: #03c;
26
+ color: white;
27
+ text-decoration: none;
28
+ }
29
+
30
+
31
+ #page {
32
+ background-color: #f0f0f0;
33
+ width: 750px;
34
+ margin: 0;
35
+ margin-left: auto;
36
+ margin-right: auto;
37
+ }
38
+
39
+ #content {
40
+ float: left;
41
+ background-color: white;
42
+ border: 3px solid #aaa;
43
+ border-top: none;
44
+ padding: 25px;
45
+ width: 500px;
46
+ }
47
+
48
+ #sidebar {
49
+ float: right;
50
+ width: 175px;
51
+ }
52
+
53
+ #footer {
54
+ clear: both;
55
+ }
56
+
57
+
58
+ #header, #about, #getting-started {
59
+ padding-left: 75px;
60
+ padding-right: 30px;
61
+ }
62
+
63
+
64
+ #header {
65
+ background-image: url("images/rails.png");
66
+ background-repeat: no-repeat;
67
+ background-position: top left;
68
+ height: 64px;
69
+ }
70
+ #header h1, #header h2 {margin: 0}
71
+ #header h2 {
72
+ color: #888;
73
+ font-weight: normal;
74
+ font-size: 16px;
75
+ }
76
+
77
+
78
+ #about h3 {
79
+ margin: 0;
80
+ margin-bottom: 10px;
81
+ font-size: 14px;
82
+ }
83
+
84
+ #about-content {
85
+ background-color: #ffd;
86
+ border: 1px solid #fc0;
87
+ margin-left: -11px;
88
+ }
89
+ #about-content table {
90
+ margin-top: 10px;
91
+ margin-bottom: 10px;
92
+ font-size: 11px;
93
+ border-collapse: collapse;
94
+ }
95
+ #about-content td {
96
+ padding: 10px;
97
+ padding-top: 3px;
98
+ padding-bottom: 3px;
99
+ }
100
+ #about-content td.name {color: #555}
101
+ #about-content td.value {color: #000}
102
+
103
+ #about-content.failure {
104
+ background-color: #fcc;
105
+ border: 1px solid #f00;
106
+ }
107
+ #about-content.failure p {
108
+ margin: 0;
109
+ padding: 10px;
110
+ }
111
+
112
+
113
+ #getting-started {
114
+ border-top: 1px solid #ccc;
115
+ margin-top: 25px;
116
+ padding-top: 15px;
117
+ }
118
+ #getting-started h1 {
119
+ margin: 0;
120
+ font-size: 20px;
121
+ }
122
+ #getting-started h2 {
123
+ margin: 0;
124
+ font-size: 14px;
125
+ font-weight: normal;
126
+ color: #333;
127
+ margin-bottom: 25px;
128
+ }
129
+ #getting-started ol {
130
+ margin-left: 0;
131
+ padding-left: 0;
132
+ }
133
+ #getting-started li {
134
+ font-size: 18px;
135
+ color: #888;
136
+ margin-bottom: 25px;
137
+ }
138
+ #getting-started li h2 {
139
+ margin: 0;
140
+ font-weight: normal;
141
+ font-size: 18px;
142
+ color: #333;
143
+ }
144
+ #getting-started li p {
145
+ color: #555;
146
+ font-size: 13px;
147
+ }
148
+
149
+
150
+ #search {
151
+ margin: 0;
152
+ padding-top: 10px;
153
+ padding-bottom: 10px;
154
+ font-size: 11px;
155
+ }
156
+ #search input {
157
+ font-size: 11px;
158
+ margin: 2px;
159
+ }
160
+ #search-text {width: 170px}
161
+
162
+
163
+ #sidebar ul {
164
+ margin-left: 0;
165
+ padding-left: 0;
166
+ }
167
+ #sidebar ul h3 {
168
+ margin-top: 25px;
169
+ font-size: 16px;
170
+ padding-bottom: 10px;
171
+ border-bottom: 1px solid #ccc;
172
+ }
173
+ #sidebar li {
174
+ list-style-type: none;
175
+ }
176
+ #sidebar ul.links li {
177
+ margin-bottom: 5px;
178
+ }
179
+
180
+ </style>
181
+ <script type="text/javascript" src="javascripts/prototype.js"></script>
182
+ <script type="text/javascript" src="javascripts/effects.js"></script>
183
+ <script type="text/javascript">
184
+ function about() {
185
+ if (Element.empty('about-content')) {
186
+ new Ajax.Updater('about-content', 'rails/info/properties', {
187
+ method: 'get',
188
+ onFailure: function() {Element.classNames('about-content').add('failure')},
189
+ onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
190
+ });
191
+ } else {
192
+ new Effect[Element.visible('about-content') ?
193
+ 'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
194
+ }
195
+ }
196
+
197
+ window.onload = function() {
198
+ $('search-text').value = '';
199
+ $('search').onsubmit = function() {
200
+ $('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
201
+ }
202
+ }
203
+ </script>
204
+ </head>
205
+ <body>
206
+ <div id="page">
207
+ <div id="sidebar">
208
+ <ul id="sidebar-items">
209
+ <li>
210
+ <form id="search" action="http://www.google.com/search" method="get">
211
+ <input type="hidden" name="hl" value="en" />
212
+ <input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
213
+ <input type="submit" value="Search" /> the Rails site
214
+ </form>
215
+ </li>
216
+
217
+ <li>
218
+ <h3>Join the community</h3>
219
+ <ul class="links">
220
+ <li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
221
+ <li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
222
+ <li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
223
+ </ul>
224
+ </li>
225
+
226
+ <li>
227
+ <h3>Browse the documentation</h3>
228
+ <ul class="links">
229
+ <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
230
+ <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
231
+ <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
232
+ </ul>
233
+ </li>
234
+ </ul>
235
+ </div>
236
+
237
+ <div id="content">
238
+ <div id="header">
239
+ <h1>Welcome aboard</h1>
240
+ <h2>You&rsquo;re riding Ruby on Rails!</h2>
241
+ </div>
242
+
243
+ <div id="about">
244
+ <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
245
+ <div id="about-content" style="display: none"></div>
246
+ </div>
247
+
248
+ <div id="getting-started">
249
+ <h1>Getting started</h1>
250
+ <h2>Here&rsquo;s how to get rolling:</h2>
251
+
252
+ <ol>
253
+ <li>
254
+ <h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
255
+ <p>To see all available options, run it without parameters.</p>
256
+ </li>
257
+
258
+ <li>
259
+ <h2>Set up a default route and remove or rename this file</h2>
260
+ <p>Routes are set up in config/routes.rb.</p>
261
+ </li>
262
+
263
+ <li>
264
+ <h2>Create your database</h2>
265
+ <p>Run <tt>rake db:migrate</tt> to create your database. If you're not using SQLite (the default), edit <tt>config/database.yml</tt> with your username and password.</p>
266
+ </li>
267
+ </ol>
268
+ </div>
269
+ </div>
270
+
271
+ <div id="footer">&nbsp;</div>
272
+ </div>
273
+ </body>
274
+ </html>