ops 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.gitignore +14 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +14 -0
  4. data/Gemfile.lock +134 -0
  5. data/LICENSE +7 -0
  6. data/README.md +81 -0
  7. data/Rakefile +27 -0
  8. data/examples/rails3/.gitignore +15 -0
  9. data/examples/rails3/.rspec +3 -0
  10. data/examples/rails3/Gemfile +5 -0
  11. data/examples/rails3/Gemfile.lock +130 -0
  12. data/examples/rails3/Rakefile +13 -0
  13. data/examples/rails3/config/application.rb +34 -0
  14. data/examples/rails3/config/boot.rb +6 -0
  15. data/examples/rails3/config/environment.rb +5 -0
  16. data/examples/rails3/config/initializers/secret_token.rb +1 -0
  17. data/examples/rails3/config/locales/en.yml +5 -0
  18. data/examples/rails3/config/routes.rb +3 -0
  19. data/examples/rails3/config.ru +4 -0
  20. data/examples/rails3/public/404.html +26 -0
  21. data/examples/rails3/public/422.html +26 -0
  22. data/examples/rails3/public/500.html +25 -0
  23. data/examples/rails3/public/favicon.ico +0 -0
  24. data/examples/rails3/public/index.html +14 -0
  25. data/examples/rails3/public/robots.txt +5 -0
  26. data/examples/rails3/script/rails +6 -0
  27. data/examples/rails3/spec/functional/ops_routes_spec.rb +63 -0
  28. data/examples/rails3/spec/spec_helper.rb +5 -0
  29. data/examples/sample_deploys/1234/REVISION +1 -0
  30. data/examples/sample_deploys/1234/VERSION +1 -0
  31. data/examples/sample_deploys/2341/REVISION +1 -0
  32. data/examples/sample_deploys/2341/VERSION +1 -0
  33. data/examples/sample_deploys/3412/REVISION +1 -0
  34. data/examples/sample_deploys/3412/VERSION +1 -0
  35. data/examples/sample_deploys/4123/REVISION +1 -0
  36. data/examples/sample_deploys/4123/VERSION +1 -0
  37. data/examples/sinatra/.rspec +3 -0
  38. data/examples/sinatra/Rakefile +15 -0
  39. data/examples/sinatra/app.rb +14 -0
  40. data/examples/sinatra/config.ru +17 -0
  41. data/examples/sinatra/spec/functional/ops_routes_spec.rb +63 -0
  42. data/examples/sinatra/spec/spec_helper.rb +3 -0
  43. data/lib/ops/config.rb +43 -0
  44. data/lib/ops/heartbeat.rb +41 -0
  45. data/lib/ops/revision.rb +117 -0
  46. data/lib/ops/server/helpers.rb +44 -0
  47. data/lib/ops/server/views/layout.html.slim +22 -0
  48. data/lib/ops/server/views/version.html.slim +50 -0
  49. data/lib/ops/server/views/version.json.rabl +9 -0
  50. data/lib/ops/server.rb +45 -0
  51. data/lib/ops/version.rb +3 -0
  52. data/lib/ops.rb +14 -0
  53. data/ops.gemspec +25 -0
  54. data/spec/functional/ops_routes_spec.rb +63 -0
  55. data/spec/ops/config_spec.rb +0 -0
  56. data/spec/ops/heartbeat_spec.rb +49 -0
  57. data/spec/ops/revision_spec.rb +41 -0
  58. data/spec/ops/server_spec.rb +0 -0
  59. data/spec/ops/version_spec.rb +7 -0
  60. data/spec/ops_spec.rb +9 -0
  61. data/spec/spec_helper.rb +15 -0
  62. metadata +192 -0
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # bundler
9
+ .bundle
10
+
11
+ .DS_Store
12
+ .tags
13
+
14
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ -fn
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source :rubygems
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake'
7
+ gem 'rails'
8
+ gem 'rails-api'
9
+ gem 'rspec'
10
+ end
11
+
12
+ group :test do
13
+ gem "simplecov", require: false
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,134 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ops (0.0.1)
5
+ oj (~> 1.4.5)
6
+ rabl (~> 0.7.6)
7
+ sinatra (~> 1.3.3)
8
+ sinatra-respond_to (~> 0.8.0)
9
+ slim (~> 1.3.4)
10
+
11
+ GEM
12
+ remote: http://rubygems.org/
13
+ specs:
14
+ actionmailer (3.2.9)
15
+ actionpack (= 3.2.9)
16
+ mail (~> 2.4.4)
17
+ actionpack (3.2.9)
18
+ activemodel (= 3.2.9)
19
+ activesupport (= 3.2.9)
20
+ builder (~> 3.0.0)
21
+ erubis (~> 2.7.0)
22
+ journey (~> 1.0.4)
23
+ rack (~> 1.4.0)
24
+ rack-cache (~> 1.2)
25
+ rack-test (~> 0.6.1)
26
+ sprockets (~> 2.2.1)
27
+ activemodel (3.2.9)
28
+ activesupport (= 3.2.9)
29
+ builder (~> 3.0.0)
30
+ activerecord (3.2.9)
31
+ activemodel (= 3.2.9)
32
+ activesupport (= 3.2.9)
33
+ arel (~> 3.0.2)
34
+ tzinfo (~> 0.3.29)
35
+ activeresource (3.2.9)
36
+ activemodel (= 3.2.9)
37
+ activesupport (= 3.2.9)
38
+ activesupport (3.2.9)
39
+ i18n (~> 0.6)
40
+ multi_json (~> 1.0)
41
+ arel (3.0.2)
42
+ builder (3.0.4)
43
+ diff-lcs (1.1.3)
44
+ erubis (2.7.0)
45
+ hike (1.2.1)
46
+ i18n (0.6.1)
47
+ journey (1.0.4)
48
+ json (1.7.5)
49
+ mail (2.4.4)
50
+ i18n (>= 0.4.0)
51
+ mime-types (~> 1.16)
52
+ treetop (~> 1.4.8)
53
+ mime-types (1.19)
54
+ multi_json (1.3.7)
55
+ oj (1.4.5)
56
+ polyglot (0.3.3)
57
+ rabl (0.7.6)
58
+ activesupport (>= 2.3.14)
59
+ multi_json (~> 1.0)
60
+ rack (1.4.1)
61
+ rack-cache (1.2)
62
+ rack (>= 0.4)
63
+ rack-protection (1.2.0)
64
+ rack
65
+ rack-ssl (1.3.2)
66
+ rack
67
+ rack-test (0.6.2)
68
+ rack (>= 1.0)
69
+ rails (3.2.9)
70
+ actionmailer (= 3.2.9)
71
+ actionpack (= 3.2.9)
72
+ activerecord (= 3.2.9)
73
+ activeresource (= 3.2.9)
74
+ activesupport (= 3.2.9)
75
+ bundler (~> 1.0)
76
+ railties (= 3.2.9)
77
+ rails-api (0.0.2)
78
+ actionpack (>= 3.2.0)
79
+ railties (>= 3.2.0)
80
+ tzinfo (~> 0.3.31)
81
+ railties (3.2.9)
82
+ actionpack (= 3.2.9)
83
+ activesupport (= 3.2.9)
84
+ rack-ssl (~> 1.3.2)
85
+ rake (>= 0.8.7)
86
+ rdoc (~> 3.4)
87
+ thor (>= 0.14.6, < 2.0)
88
+ rake (10.0.2)
89
+ rdoc (3.12)
90
+ json (~> 1.4)
91
+ rspec (2.12.0)
92
+ rspec-core (~> 2.12.0)
93
+ rspec-expectations (~> 2.12.0)
94
+ rspec-mocks (~> 2.12.0)
95
+ rspec-core (2.12.0)
96
+ rspec-expectations (2.12.0)
97
+ diff-lcs (~> 1.1.3)
98
+ rspec-mocks (2.12.0)
99
+ simplecov (0.7.1)
100
+ multi_json (~> 1.0)
101
+ simplecov-html (~> 0.7.1)
102
+ simplecov-html (0.7.1)
103
+ sinatra (1.3.3)
104
+ rack (~> 1.3, >= 1.3.6)
105
+ rack-protection (~> 1.2)
106
+ tilt (~> 1.3, >= 1.3.3)
107
+ sinatra-respond_to (0.8.0)
108
+ sinatra (~> 1.3)
109
+ slim (1.3.4)
110
+ temple (~> 0.5.5)
111
+ tilt (~> 1.3.3)
112
+ sprockets (2.2.1)
113
+ hike (~> 1.2)
114
+ multi_json (~> 1.0)
115
+ rack (~> 1.0)
116
+ tilt (~> 1.1, != 1.3.0)
117
+ temple (0.5.5)
118
+ thor (0.16.0)
119
+ tilt (1.3.3)
120
+ treetop (1.4.12)
121
+ polyglot
122
+ polyglot (>= 0.3.1)
123
+ tzinfo (0.3.35)
124
+
125
+ PLATFORMS
126
+ ruby
127
+
128
+ DEPENDENCIES
129
+ ops!
130
+ rails
131
+ rails-api
132
+ rake
133
+ rspec
134
+ simplecov
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2012 PRIMEDIA, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,81 @@
1
+ Ops
2
+ ===
3
+
4
+ This gem provides standardized support for obtaining version and heartbeat information from Sinatra or Rails-based web applications.
5
+
6
+ Typical usage:
7
+
8
+ ```
9
+ /ops/version - displays version info as HTML
10
+ /ops/version.json - displays version info as JSON
11
+ /ops/heartbeat - returns 'OK' if the app is alive
12
+ ```
13
+
14
+ This gem replaces the now-deprecated [ops_routes](https://github.com/primedia/ops_routes).
15
+
16
+ Installation
17
+ ------------
18
+
19
+ ### For Rails 3 apps:
20
+
21
+ 1. Add the gem to your project's Gemfile:
22
+ ```ruby
23
+ gem 'ops'
24
+ ```
25
+
26
+ 2. Add the following to application.rb:
27
+
28
+ ```ruby
29
+ Ops.setup do |config|
30
+ config.file_root = Rails.root
31
+ config.environment = Rails.env
32
+ end
33
+ ```
34
+
35
+ 3. mount the gem in routes.rb:
36
+
37
+ ```ruby
38
+ mount Ops.new, :at => "/ops"
39
+ ```
40
+
41
+ ### For Sinatra apps:
42
+
43
+ 1. Add the gem to your project's Gemfile:
44
+
45
+ ```ruby
46
+ gem 'ops'
47
+ ```
48
+
49
+ 2. Add the following to config.ru:
50
+
51
+ ```ruby
52
+ require 'ops'
53
+
54
+ #...
55
+
56
+ Ops.setup do |config|
57
+ config.file_root = File.dirname __FILE__
58
+ config.environment = ENV['RACK_ENV']
59
+ end
60
+
61
+ run Rack::URLMap.new \
62
+ "/" => YourAppClass,
63
+ "/ops" => Ops.new
64
+ ```
65
+
66
+
67
+
68
+ Adding Custom Heartbeats
69
+ ------------------------
70
+
71
+ Additionally, you can specify custom heartbeat monitoring pages as follows:
72
+
73
+ ```ruby
74
+ Ops.add_heartbeat :mysql do
75
+ conn = ActiveRecord::Base.connection
76
+ migrations = conn.select_all("SELECT COUNT(1) FROM schema_migrations;")
77
+ conn.disconnect!
78
+ end
79
+ ```
80
+
81
+ The mysql example shown above would be accessed at ops/heartbeat/mysql. The heartbeat page will return a `200 ‘OK’` as long as the provided block returns true. If an error is raised, the heartbeat does not exist, or the block returns a falsey value, a `500` will be returned instead.
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+ require 'rspec/core/rake_task'
14
+
15
+ RSpec::Core::RakeTask.new(:spec) do |t|
16
+ t.pattern = "spec/ops/**/*_spec.rb"
17
+ end
18
+
19
+ desc "Executes the example tests"
20
+ task "test:examples" do
21
+ %w[rails3 sinatra].each do |ex|
22
+ puts "\n*** Running tests for #{ex}... ***\n"
23
+ puts `cd #{File.join(File.dirname(__FILE__),'examples',ex)}; bundle check; bundle exec rake test:ops`
24
+ end
25
+ end
26
+
27
+ task :default => :spec
@@ -0,0 +1,15 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
@@ -0,0 +1,3 @@
1
+ --color
2
+ -fn
3
+ --tty
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '3.2.8'
4
+ gem 'rspec'
5
+ gem 'ops', path: '../../../ops'
@@ -0,0 +1,130 @@
1
+ PATH
2
+ remote: ../../../ops
3
+ specs:
4
+ ops (0.0.1)
5
+ oj (~> 1.4.5)
6
+ rabl (~> 0.7.6)
7
+ sinatra (~> 1.3.3)
8
+ sinatra-respond_to (~> 0.8.0)
9
+ slim (~> 1.3.4)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actionmailer (3.2.8)
15
+ actionpack (= 3.2.8)
16
+ mail (~> 2.4.4)
17
+ actionpack (3.2.8)
18
+ activemodel (= 3.2.8)
19
+ activesupport (= 3.2.8)
20
+ builder (~> 3.0.0)
21
+ erubis (~> 2.7.0)
22
+ journey (~> 1.0.4)
23
+ rack (~> 1.4.0)
24
+ rack-cache (~> 1.2)
25
+ rack-test (~> 0.6.1)
26
+ sprockets (~> 2.1.3)
27
+ activemodel (3.2.8)
28
+ activesupport (= 3.2.8)
29
+ builder (~> 3.0.0)
30
+ activerecord (3.2.8)
31
+ activemodel (= 3.2.8)
32
+ activesupport (= 3.2.8)
33
+ arel (~> 3.0.2)
34
+ tzinfo (~> 0.3.29)
35
+ activeresource (3.2.8)
36
+ activemodel (= 3.2.8)
37
+ activesupport (= 3.2.8)
38
+ activesupport (3.2.8)
39
+ i18n (~> 0.6)
40
+ multi_json (~> 1.0)
41
+ arel (3.0.2)
42
+ builder (3.0.4)
43
+ diff-lcs (1.1.3)
44
+ erubis (2.7.0)
45
+ hike (1.2.1)
46
+ i18n (0.6.1)
47
+ journey (1.0.4)
48
+ json (1.7.5)
49
+ mail (2.4.4)
50
+ i18n (>= 0.4.0)
51
+ mime-types (~> 1.16)
52
+ treetop (~> 1.4.8)
53
+ mime-types (1.19)
54
+ multi_json (1.3.7)
55
+ oj (1.4.5)
56
+ polyglot (0.3.3)
57
+ rabl (0.7.6)
58
+ activesupport (>= 2.3.14)
59
+ multi_json (~> 1.0)
60
+ rack (1.4.1)
61
+ rack-cache (1.2)
62
+ rack (>= 0.4)
63
+ rack-protection (1.2.0)
64
+ rack
65
+ rack-ssl (1.3.2)
66
+ rack
67
+ rack-test (0.6.2)
68
+ rack (>= 1.0)
69
+ rails (3.2.8)
70
+ actionmailer (= 3.2.8)
71
+ actionpack (= 3.2.8)
72
+ activerecord (= 3.2.8)
73
+ activeresource (= 3.2.8)
74
+ activesupport (= 3.2.8)
75
+ bundler (~> 1.0)
76
+ railties (= 3.2.8)
77
+ railties (3.2.8)
78
+ actionpack (= 3.2.8)
79
+ activesupport (= 3.2.8)
80
+ rack-ssl (~> 1.3.2)
81
+ rake (>= 0.8.7)
82
+ rdoc (~> 3.4)
83
+ thor (>= 0.14.6, < 2.0)
84
+ rake (10.0.2)
85
+ rdoc (3.12)
86
+ json (~> 1.4)
87
+ rspec (2.12.0)
88
+ rspec-core (~> 2.12.0)
89
+ rspec-expectations (~> 2.12.0)
90
+ rspec-mocks (~> 2.12.0)
91
+ rspec-core (2.12.0)
92
+ rspec-expectations (2.12.0)
93
+ diff-lcs (~> 1.1.3)
94
+ rspec-mocks (2.12.0)
95
+ rspec-rails (2.12.0)
96
+ actionpack (>= 3.0)
97
+ activesupport (>= 3.0)
98
+ railties (>= 3.0)
99
+ rspec-core (~> 2.12.0)
100
+ rspec-expectations (~> 2.12.0)
101
+ rspec-mocks (~> 2.12.0)
102
+ sinatra (1.3.3)
103
+ rack (~> 1.3, >= 1.3.6)
104
+ rack-protection (~> 1.2)
105
+ tilt (~> 1.3, >= 1.3.3)
106
+ sinatra-respond_to (0.8.0)
107
+ sinatra (~> 1.3)
108
+ slim (1.3.4)
109
+ temple (~> 0.5.5)
110
+ tilt (~> 1.3.3)
111
+ sprockets (2.1.3)
112
+ hike (~> 1.2)
113
+ rack (~> 1.0)
114
+ tilt (~> 1.1, != 1.3.0)
115
+ temple (0.5.5)
116
+ thor (0.16.0)
117
+ tilt (1.3.3)
118
+ treetop (1.4.12)
119
+ polyglot
120
+ polyglot (>= 0.3.1)
121
+ tzinfo (0.3.35)
122
+
123
+ PLATFORMS
124
+ ruby
125
+
126
+ DEPENDENCIES
127
+ ops!
128
+ rails (= 3.2.8)
129
+ rspec
130
+ rspec-rails
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+ require 'rake'
7
+ require 'rspec/core/rake_task'
8
+
9
+ Rails3::Application.load_tasks
10
+
11
+ RSpec::Core::RakeTask.new('test:ops') do |test|
12
+ test.pattern = "spec/functional/*_spec.rb"
13
+ end
@@ -0,0 +1,34 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ # require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "active_resource/railtie"
8
+
9
+ if defined?(Bundler)
10
+ # If you precompile assets before deploying to production, use this line
11
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
12
+ # If you want your assets lazily compiled in production, use this line
13
+ # Bundler.require(:default, :assets, Rails.env)
14
+ end
15
+
16
+ module Rails3
17
+ class Application < Rails::Application
18
+ config.encoding = "utf-8"
19
+
20
+ # Configure sensitive parameters which will be filtered from the log file.
21
+ config.filter_parameters += [:password]
22
+
23
+ # Enable escaping HTML in JSON.
24
+ config.active_support.escape_html_entities_in_json = true
25
+
26
+ config.active_support.deprecation = :log
27
+
28
+ Ops.setup do |config|
29
+ config.file_root = File.join(Rails.root,'/../sample_deploys/4123')
30
+ config.environment = Rails.env
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Rails3::Application.initialize!
@@ -0,0 +1 @@
1
+ Rails3::Application.config.secret_token = "some secret phrase of at least 30 characters"
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ Rails3::Application.routes.draw do
2
+ mount Ops.new, :at => "/ops"
3
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails3::Application
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>ops gem: Rails 3 demo app</title>
5
+ <body>
6
+ <h1>Welcome to the ops gem rails 3 demo app!</h1>
7
+ <h2>The following routes are available:</h2>
8
+ <ul>
9
+ <li><a href="/ops/version">/ops/version</a></li>
10
+ <li><a href="/ops/version.json">/ops/version.json</a></li>
11
+ <li><a href="/ops/heartbeat">/ops/heartbeat</a></li>
12
+ </ul>
13
+ </body>
14
+ </html>
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'