eventbus 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/admin/Gemfile +50 -0
  2. data/admin/Gemfile.lock +141 -0
  3. data/admin/Rakefile +7 -0
  4. data/admin/app/assets/images/rails.png +0 -0
  5. data/admin/app/assets/javascripts/application.js +15 -0
  6. data/admin/app/assets/javascripts/applications.js.coffee +3 -0
  7. data/admin/app/assets/javascripts/message_routes.js.coffee +3 -0
  8. data/admin/app/assets/javascripts/message_types.js.coffee +3 -0
  9. data/admin/app/assets/javascripts/messages.js.coffee +3 -0
  10. data/admin/app/assets/stylesheets/application.css +13 -0
  11. data/admin/app/assets/stylesheets/applications.css.scss +3 -0
  12. data/admin/app/assets/stylesheets/global.css.scss +72 -0
  13. data/admin/app/assets/stylesheets/message_routes.css.scss +3 -0
  14. data/admin/app/assets/stylesheets/message_types.css.scss +3 -0
  15. data/admin/app/assets/stylesheets/messages.css.scss +30 -0
  16. data/admin/app/assets/stylesheets/scaffolds.css.scss +56 -0
  17. data/admin/app/controllers/application_controller.rb +3 -0
  18. data/admin/app/controllers/applications_controller.rb +83 -0
  19. data/admin/app/controllers/message_routes_controller.rb +85 -0
  20. data/admin/app/controllers/message_types_controller.rb +83 -0
  21. data/admin/app/controllers/messages_controller.rb +75 -0
  22. data/admin/app/helpers/application_helper.rb +2 -0
  23. data/admin/app/helpers/applications_helper.rb +2 -0
  24. data/admin/app/helpers/message_routes_helper.rb +2 -0
  25. data/admin/app/helpers/message_types_helper.rb +2 -0
  26. data/admin/app/helpers/messages_helper.rb +2 -0
  27. data/admin/app/models/application.rb +7 -0
  28. data/admin/app/models/message.rb +4 -0
  29. data/admin/app/models/message_route.rb +5 -0
  30. data/admin/app/models/message_type.rb +7 -0
  31. data/admin/app/views/applications/_form.html.haml +27 -0
  32. data/admin/app/views/applications/edit.html.haml +5 -0
  33. data/admin/app/views/applications/index.html.haml +28 -0
  34. data/admin/app/views/applications/new.html.haml +3 -0
  35. data/admin/app/views/applications/show.html.haml +16 -0
  36. data/admin/app/views/layouts/application.html.haml +24 -0
  37. data/admin/app/views/message_routes/_form.html.haml +31 -0
  38. data/admin/app/views/message_routes/edit.html.haml +5 -0
  39. data/admin/app/views/message_routes/index.html.haml +28 -0
  40. data/admin/app/views/message_routes/new.html.haml +3 -0
  41. data/admin/app/views/message_routes/show.html.haml +16 -0
  42. data/admin/app/views/message_types/_form.html.haml +29 -0
  43. data/admin/app/views/message_types/edit.html.haml +5 -0
  44. data/admin/app/views/message_types/index.html.haml +28 -0
  45. data/admin/app/views/message_types/new.html.haml +5 -0
  46. data/admin/app/views/message_types/show.html.haml +17 -0
  47. data/admin/app/views/messages/index.html.haml +48 -0
  48. data/admin/app/views/messages/show.html.haml +45 -0
  49. data/admin/config/application.rb +64 -0
  50. data/admin/config/boot.rb +6 -0
  51. data/admin/config/database.yml +29 -0
  52. data/admin/config/environment.rb +5 -0
  53. data/admin/config/environments/development.rb +37 -0
  54. data/admin/config/environments/production.rb +72 -0
  55. data/admin/config/environments/test.rb +37 -0
  56. data/admin/config/initializers/backtrace_silencers.rb +7 -0
  57. data/admin/config/initializers/inflections.rb +15 -0
  58. data/admin/config/initializers/mime_types.rb +5 -0
  59. data/admin/config/initializers/secret_token.rb +7 -0
  60. data/admin/config/initializers/session_store.rb +8 -0
  61. data/admin/config/initializers/wrap_parameters.rb +14 -0
  62. data/admin/config/locales/en.yml +5 -0
  63. data/admin/config/routes.rb +69 -0
  64. data/admin/config.ru +4 -0
  65. data/admin/db/development.sqlite3-journal +0 -0
  66. data/admin/db/migrate/20120218124300_create_messages.rb +16 -0
  67. data/admin/db/migrate/20120219021535_create_applications.rb +11 -0
  68. data/admin/db/migrate/20120219021806_create_message_types.rb +13 -0
  69. data/admin/db/migrate/20120219021940_create_message_routes.rb +13 -0
  70. data/admin/db/migrate/20120411001040_add_app_id_key_msg_type_id_to_messages.rb +7 -0
  71. data/admin/db/migrate/20120411001823_rename_message_type_to_message_type_name_in_messages.rb +5 -0
  72. data/admin/db/migrate/20120413024953_add_message_guid_to_messages.rb +5 -0
  73. data/admin/db/migrate/20120523112257_add_match_all_errors_to_routes.rb +5 -0
  74. data/admin/db/schema.rb +68 -0
  75. data/admin/db/seeds.rb +7 -0
  76. data/admin/doc/README_FOR_APP +2 -0
  77. data/admin/public/404.html +26 -0
  78. data/admin/public/422.html +26 -0
  79. data/admin/public/500.html +25 -0
  80. data/admin/public/favicon.ico +0 -0
  81. data/admin/public/robots.txt +5 -0
  82. data/admin/script/rails +6 -0
  83. data/admin/script/railsrunner +3 -0
  84. data/admin/test/fixtures/applications.yml +14 -0
  85. data/admin/test/fixtures/message_routes.yml +11 -0
  86. data/admin/test/fixtures/message_types.yml +17 -0
  87. data/admin/test/fixtures/messages.yml +45 -0
  88. data/admin/test/functional/applications_controller_test.rb +49 -0
  89. data/admin/test/functional/message_routes_controller_test.rb +49 -0
  90. data/admin/test/functional/message_types_controller_test.rb +49 -0
  91. data/admin/test/functional/messages_controller_test.rb +49 -0
  92. data/admin/test/performance/browsing_test.rb +12 -0
  93. data/admin/test/test_helper.rb +13 -0
  94. data/admin/test/unit/application_test.rb +7 -0
  95. data/admin/test/unit/helpers/applications_helper_test.rb +4 -0
  96. data/admin/test/unit/helpers/message_routes_helper_test.rb +4 -0
  97. data/admin/test/unit/helpers/message_types_helper_test.rb +4 -0
  98. data/admin/test/unit/helpers/messages_helper_test.rb +4 -0
  99. data/admin/test/unit/message_route_test.rb +7 -0
  100. data/admin/test/unit/message_test.rb +7 -0
  101. data/admin/test/unit/message_type_test.rb +7 -0
  102. data/bin/eventbus_dispatcher.rb +118 -0
  103. data/bin/eventbus_emailer.rb +41 -0
  104. data/lib/eventbus/connectors/amqp.rb +70 -0
  105. data/lib/eventbus/connectors/bunny.rb +71 -0
  106. data/lib/eventbus/connectors/stomp.rb +77 -0
  107. data/lib/eventbus/message.rb +180 -0
  108. data/lib/eventbus/queue.rb +28 -0
  109. data/lib/eventbus/service.rb +116 -0
  110. metadata +188 -0
@@ -0,0 +1,72 @@
1
+ EventbusPortal::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ #config.serve_static_assets = false
13
+
14
+ # Eventbus is running under webrick by default -- serve static assets
15
+ # If you want to use Apache, Nginx, etc, just set this to false.
16
+ config.serve_static_assets = true
17
+
18
+
19
+ # Compress JavaScripts and CSS
20
+ config.assets.compress = true
21
+
22
+ # Don't fallback to assets pipeline if a precompiled asset is missed
23
+ config.assets.compile = false
24
+
25
+ # Generate digests for assets URLs
26
+ config.assets.digest = true
27
+
28
+ # Defaults to Rails.root.join("public/assets")
29
+ # config.assets.manifest = YOUR_PATH
30
+
31
+ # Specifies the header that your server uses for sending files
32
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
33
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
34
+
35
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
36
+ # config.force_ssl = true
37
+
38
+ # See everything in the log (default is :info)
39
+ # config.log_level = :debug
40
+
41
+ # Prepend all log lines with the following tags
42
+ # config.log_tags = [ :subdomain, :uuid ]
43
+
44
+ # Use a different logger for distributed setups
45
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
46
+
47
+ # Use a different cache store in production
48
+ # config.cache_store = :mem_cache_store
49
+
50
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
51
+ # config.action_controller.asset_host = "http://assets.example.com"
52
+
53
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
54
+ # config.assets.precompile += %w( search.js )
55
+
56
+ # Disable delivery errors, bad email addresses will be ignored
57
+ # config.action_mailer.raise_delivery_errors = false
58
+
59
+ # Enable threaded mode
60
+ # config.threadsafe!
61
+
62
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
63
+ # the I18n.default_locale when a translation can not be found)
64
+ config.i18n.fallbacks = true
65
+
66
+ # Send deprecation notices to registered listeners
67
+ config.active_support.deprecation = :notify
68
+
69
+ # Log the query plan for queries taking more than this (works
70
+ # with SQLite, MySQL, and PostgreSQL)
71
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
72
+ end
@@ -0,0 +1,37 @@
1
+ EventbusPortal::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.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
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ #config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Raise exception on mass assignment protection for ActiveRecord models
33
+ config.active_record.mass_assignment_sanitizer = :strict
34
+
35
+ # Print deprecation notices to the stderr
36
+ config.active_support.deprecation = :stderr
37
+ 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,15 @@
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
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -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
+ EventbusPortal::Application.config.secret_token = 'e616cb9e5afb571eea5641b8e86768dd7ba76fed8704d28b5050eed11f0da2327cbe0800d1cf4fbf0b514664b5543fb856127e91b5650a61fbac96046fa62132'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ EventbusPortal::Application.config.session_store :cookie_store, key: '_eventbus-portal_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # EventbusPortal::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -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,69 @@
1
+ EventbusPortal::Application.routes.draw do
2
+ resources :message_routes
3
+ resources :message_types
4
+ resources :applications
5
+
6
+
7
+ # Message routes
8
+ match 'messages/:id/resubmit_event' => 'messages#resubmit_event', :as => :resubmit_event
9
+ match 'messages/:id/send_queue' => 'messages#send_queue', :as => :send_queue
10
+ resources :messages
11
+
12
+
13
+ # The priority is based upon order of creation:
14
+ # first created -> highest priority.
15
+
16
+ # Sample of regular route:
17
+ # match 'products/:id' => 'catalog#view'
18
+ # Keep in mind you can assign values other than :controller and :action
19
+
20
+ # Sample of named route:
21
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
22
+ # This route can be invoked with purchase_url(:id => product.id)
23
+
24
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
25
+ # resources :products
26
+
27
+ # Sample resource route with options:
28
+ # resources :products do
29
+ # member do
30
+ # get 'short'
31
+ # post 'toggle'
32
+ # end
33
+ #
34
+ # collection do
35
+ # get 'sold'
36
+ # end
37
+ # end
38
+
39
+ # Sample resource route with sub-resources:
40
+ # resources :products do
41
+ # resources :comments, :sales
42
+ # resource :seller
43
+ # end
44
+
45
+ # Sample resource route with more complex sub-resources
46
+ # resources :products do
47
+ # resources :comments
48
+ # resources :sales do
49
+ # get 'recent', :on => :collection
50
+ # end
51
+ # end
52
+
53
+ # Sample resource route within a namespace:
54
+ # namespace :admin do
55
+ # # Directs /admin/products/* to Admin::ProductsController
56
+ # # (app/controllers/admin/products_controller.rb)
57
+ # resources :products
58
+ # end
59
+
60
+ # You can have the root of your site routed with "root"
61
+ # just remember to delete public/index.html.
62
+ root :to => 'applications#index'
63
+
64
+ # See how all your routes lay out with "rake routes"
65
+
66
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
67
+ # Note: This route will make all actions in every controller accessible via GET requests.
68
+ # match ':controller(/:action(/:id))(.:format)'
69
+ end
data/admin/config.ru ADDED
@@ -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 EventbusPortal::Application
@@ -0,0 +1,16 @@
1
+ class CreateMessages < ActiveRecord::Migration
2
+ def change
3
+ create_table :messages do |t|
4
+ t.string :message_type
5
+ t.string :status
6
+ t.string :dispatch_to
7
+ t.boolean :is_error
8
+ t.text :content
9
+
10
+ t.timestamps
11
+ end
12
+
13
+ add_index :messages, :message_type
14
+ add_index :messages, :is_error
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ class CreateApplications < ActiveRecord::Migration
2
+ def change
3
+ create_table :applications do |t|
4
+ t.string :name
5
+ t.string :key
6
+ t.string :description
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ class CreateMessageTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :message_types do |t|
4
+ t.integer :application_id
5
+ t.string :name
6
+ t.text :description
7
+
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :message_types, :application_id
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class CreateMessageRoutes < ActiveRecord::Migration
2
+ def change
3
+ create_table :message_routes do |t|
4
+ t.integer :message_type_id
5
+ t.string :incoming_status
6
+ t.string :dispatch_to
7
+
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :message_routes, [ :message_type_id, :incoming_status ], :name => :ebus_msgroutes_type_status
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ class AddAppIdKeyMsgTypeIdToMessages < ActiveRecord::Migration
2
+ def change
3
+ add_column :messages, :application_id, :integer
4
+ add_column :messages, :application_key, :string
5
+ add_column :messages, :message_type_id, :integer
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class RenameMessageTypeToMessageTypeNameInMessages < ActiveRecord::Migration
2
+ def change
3
+ rename_column :messages, :message_type, :message_type_name
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddMessageGuidToMessages < ActiveRecord::Migration
2
+ def change
3
+ add_column :messages, :message_guid, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddMatchAllErrorsToRoutes < ActiveRecord::Migration
2
+ def change
3
+ add_column :message_routes, :match_errors, :boolean
4
+ end
5
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120523112257) do
15
+
16
+ create_table "ebus_applications", :force => true do |t|
17
+ t.string "name"
18
+ t.string "key"
19
+ t.string "description"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ create_table "ebus_message_routes", :force => true do |t|
25
+ t.integer "message_type_id"
26
+ t.string "incoming_status"
27
+ t.string "dispatch_to"
28
+ t.datetime "created_at", :null => false
29
+ t.datetime "updated_at", :null => false
30
+ t.boolean "match_errors"
31
+ end
32
+
33
+ add_index "ebus_message_routes", ["message_type_id", "incoming_status"], :name => "ebus_msgroutes_type_status"
34
+
35
+ create_table "ebus_message_types", :force => true do |t|
36
+ t.integer "application_id"
37
+ t.string "name"
38
+ t.text "description"
39
+ t.datetime "created_at", :null => false
40
+ t.datetime "updated_at", :null => false
41
+ end
42
+
43
+ add_index "ebus_message_types", ["application_id"], :name => "index_ebus_message_types_on_application_id"
44
+
45
+ create_table "ebus_messages", :force => true do |t|
46
+ t.string "message_type_name"
47
+ t.string "status"
48
+ t.string "dispatch_to"
49
+ t.boolean "is_error"
50
+ t.text "content"
51
+ t.datetime "created_at", :null => false
52
+ t.datetime "updated_at", :null => false
53
+ t.integer "application_id"
54
+ t.string "application_key"
55
+ t.integer "message_type_id"
56
+ t.string "message_guid"
57
+ end
58
+
59
+ add_index "ebus_messages", ["is_error"], :name => "index_ebus_messages_on_is_error"
60
+ add_index "ebus_messages", ["message_type_name"], :name => "index_ebus_messages_on_message_type"
61
+
62
+ create_table "ebus_schema_migrations", :id => false, :force => true do |t|
63
+ t.string "version", :null => false
64
+ end
65
+
66
+ add_index "ebus_schema_migrations", ["version"], :name => "ebus_unique_schema_migrations", :unique => true
67
+
68
+ end
data/admin/db/seeds.rb ADDED
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -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,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'
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ /usr/bin/env ruby $(dirname __FILE__)/rails runner $*
@@ -0,0 +1,14 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ --- !omap
4
+ TEST:
5
+ name: Test Application
6
+ key: TEST
7
+ description: Test application for built-in smoke-test utilities
8
+
9
+ SAMPLE:
10
+ name: Sample Application
11
+ key: SAMPLE
12
+ description: Sample application with more complex routing
13
+
14
+
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ TestBegin:
4
+ message_type: RouteTest
5
+ incoming_status: BEGIN
6
+ dispatch_to: receiver
7
+
8
+ TestMessageReceived:
9
+ message_type: RouteTest
10
+ incoming_status: MESSAGE_RECEIVED
11
+ dispatch_to: accounting
@@ -0,0 +1,17 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ --- !omap
4
+ RouteTest:
5
+ application: TEST
6
+ name: RouteTest
7
+ description: Message for use by the bin/util programs
8
+
9
+ Sample:
10
+ application: SAMPLE
11
+ name: Sample
12
+ description: Sample message type
13
+
14
+ AnotherSample:
15
+ application: SAMPLE
16
+ name: AnotherSample
17
+ description: Second message type for Sample application
@@ -0,0 +1,45 @@
1
+
2
+ RTBeginDTReceiver:
3
+ message_type: RouteTest
4
+ message_type_name: "RouteTest"
5
+ application: TEST
6
+ application_key: TEST
7
+ is_error: false
8
+ content: "---\n:HEADER:\n :message_id: 123f9b20-65ad-012f-1530-001cc094df04\n :message_type: RouteTest\n :status: BEGIN\n :application_id: TEST\n:ERROR_INFO:\n :is_error: false\n :backtrace: \n :message: \n:PAYLOAD:\n TestMessage:\n some_number: 12345\n some_text: abcdefg\n"
9
+ status: BEGIN
10
+ dispatch_to: receiver
11
+ message_guid: 123f9b20-65ad-012f-1530-001cc094df04
12
+
13
+ RTMsgReceivdDTAccounting:
14
+ message_type: RouteTest
15
+ message_type_name: "RouteTest"
16
+ application: TEST
17
+ application_key: TEST
18
+ is_error: false
19
+ content: "---\n:HEADER:\n :message_id: 123f9b20-65ad-012f-1530-001cc094df04\n :message_type: RouteTest\n :status: MESSAGE_RECEIVED\n :application_id: TEST\n:ERROR_INFO:\n :is_error: false\n :backtrace: \n :message: \n:PAYLOAD:\n TestMessage:\n some_number: 12345\n some_text: abcdefg\n"
20
+ status: MESSAGE_RECEIVED
21
+ dispatch_to: accounting
22
+ message_guid: 123f9b20-65ad-012f-1530-001cc094df04
23
+
24
+
25
+ RTBeginDTReceiver2:
26
+ message_type: RouteTest
27
+ message_type_name: "RouteTest"
28
+ application: TEST
29
+ application_key: TEST
30
+ is_error: false
31
+ content: "---\n:HEADER:\n :message_id: 9891a6d6-30b1-4392-ac1c-e6fba4cba74a\n :message_type: RouteTest\n :status: BEGIN\n :application_id: TEST\n:ERROR_INFO:\n :is_error: false\n :backtrace: \n :message: \n:PAYLOAD:\n TestMessage:\n some_number: 7890\n some_text: hijklmno\n"
32
+ status: BEGIN
33
+ dispatch_to: receiver
34
+ message_guid: 9891a6d6-30b1-4392-ac1c-e6fba4cba74a
35
+
36
+ RTMsgReceivdDTAccounting2:
37
+ message_type: RouteTest
38
+ message_type_name: "RouteTest"
39
+ application: TEST
40
+ application_key: TEST
41
+ is_error: false
42
+ content: "---\n:HEADER:\n :message_id: 9891a6d6-30b1-4392-ac1c-e6fba4cba74a\n :message_type: RouteTest\n :status: MESSAGE_RECEIVED\n :application_id: TEST\n:ERROR_INFO:\n :is_error: false\n :backtrace: \n :message: \n:PAYLOAD:\n TestMessage:\n some_number: 7890\n some_text: hijklmno\n"
43
+ status: MESSAGE_RECEIVED
44
+ dispatch_to: accounting
45
+ message_guid: 9891a6d6-30b1-4392-ac1c-e6fba4cba74a