eventbus 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/admin/Gemfile +50 -0
- data/admin/Gemfile.lock +141 -0
- data/admin/Rakefile +7 -0
- data/admin/app/assets/images/rails.png +0 -0
- data/admin/app/assets/javascripts/application.js +15 -0
- data/admin/app/assets/javascripts/applications.js.coffee +3 -0
- data/admin/app/assets/javascripts/message_routes.js.coffee +3 -0
- data/admin/app/assets/javascripts/message_types.js.coffee +3 -0
- data/admin/app/assets/javascripts/messages.js.coffee +3 -0
- data/admin/app/assets/stylesheets/application.css +13 -0
- data/admin/app/assets/stylesheets/applications.css.scss +3 -0
- data/admin/app/assets/stylesheets/global.css.scss +72 -0
- data/admin/app/assets/stylesheets/message_routes.css.scss +3 -0
- data/admin/app/assets/stylesheets/message_types.css.scss +3 -0
- data/admin/app/assets/stylesheets/messages.css.scss +30 -0
- data/admin/app/assets/stylesheets/scaffolds.css.scss +56 -0
- data/admin/app/controllers/application_controller.rb +3 -0
- data/admin/app/controllers/applications_controller.rb +83 -0
- data/admin/app/controllers/message_routes_controller.rb +85 -0
- data/admin/app/controllers/message_types_controller.rb +83 -0
- data/admin/app/controllers/messages_controller.rb +75 -0
- data/admin/app/helpers/application_helper.rb +2 -0
- data/admin/app/helpers/applications_helper.rb +2 -0
- data/admin/app/helpers/message_routes_helper.rb +2 -0
- data/admin/app/helpers/message_types_helper.rb +2 -0
- data/admin/app/helpers/messages_helper.rb +2 -0
- data/admin/app/models/application.rb +7 -0
- data/admin/app/models/message.rb +4 -0
- data/admin/app/models/message_route.rb +5 -0
- data/admin/app/models/message_type.rb +7 -0
- data/admin/app/views/applications/_form.html.haml +27 -0
- data/admin/app/views/applications/edit.html.haml +5 -0
- data/admin/app/views/applications/index.html.haml +28 -0
- data/admin/app/views/applications/new.html.haml +3 -0
- data/admin/app/views/applications/show.html.haml +16 -0
- data/admin/app/views/layouts/application.html.haml +24 -0
- data/admin/app/views/message_routes/_form.html.haml +31 -0
- data/admin/app/views/message_routes/edit.html.haml +5 -0
- data/admin/app/views/message_routes/index.html.haml +28 -0
- data/admin/app/views/message_routes/new.html.haml +3 -0
- data/admin/app/views/message_routes/show.html.haml +16 -0
- data/admin/app/views/message_types/_form.html.haml +29 -0
- data/admin/app/views/message_types/edit.html.haml +5 -0
- data/admin/app/views/message_types/index.html.haml +28 -0
- data/admin/app/views/message_types/new.html.haml +5 -0
- data/admin/app/views/message_types/show.html.haml +17 -0
- data/admin/app/views/messages/index.html.haml +48 -0
- data/admin/app/views/messages/show.html.haml +45 -0
- data/admin/config/application.rb +64 -0
- data/admin/config/boot.rb +6 -0
- data/admin/config/database.yml +29 -0
- data/admin/config/environment.rb +5 -0
- data/admin/config/environments/development.rb +37 -0
- data/admin/config/environments/production.rb +72 -0
- data/admin/config/environments/test.rb +37 -0
- data/admin/config/initializers/backtrace_silencers.rb +7 -0
- data/admin/config/initializers/inflections.rb +15 -0
- data/admin/config/initializers/mime_types.rb +5 -0
- data/admin/config/initializers/secret_token.rb +7 -0
- data/admin/config/initializers/session_store.rb +8 -0
- data/admin/config/initializers/wrap_parameters.rb +14 -0
- data/admin/config/locales/en.yml +5 -0
- data/admin/config/routes.rb +69 -0
- data/admin/config.ru +4 -0
- data/admin/db/development.sqlite3-journal +0 -0
- data/admin/db/migrate/20120218124300_create_messages.rb +16 -0
- data/admin/db/migrate/20120219021535_create_applications.rb +11 -0
- data/admin/db/migrate/20120219021806_create_message_types.rb +13 -0
- data/admin/db/migrate/20120219021940_create_message_routes.rb +13 -0
- data/admin/db/migrate/20120411001040_add_app_id_key_msg_type_id_to_messages.rb +7 -0
- data/admin/db/migrate/20120411001823_rename_message_type_to_message_type_name_in_messages.rb +5 -0
- data/admin/db/migrate/20120413024953_add_message_guid_to_messages.rb +5 -0
- data/admin/db/migrate/20120523112257_add_match_all_errors_to_routes.rb +5 -0
- data/admin/db/schema.rb +68 -0
- data/admin/db/seeds.rb +7 -0
- data/admin/doc/README_FOR_APP +2 -0
- data/admin/public/404.html +26 -0
- data/admin/public/422.html +26 -0
- data/admin/public/500.html +25 -0
- data/admin/public/favicon.ico +0 -0
- data/admin/public/robots.txt +5 -0
- data/admin/script/rails +6 -0
- data/admin/script/railsrunner +3 -0
- data/admin/test/fixtures/applications.yml +14 -0
- data/admin/test/fixtures/message_routes.yml +11 -0
- data/admin/test/fixtures/message_types.yml +17 -0
- data/admin/test/fixtures/messages.yml +45 -0
- data/admin/test/functional/applications_controller_test.rb +49 -0
- data/admin/test/functional/message_routes_controller_test.rb +49 -0
- data/admin/test/functional/message_types_controller_test.rb +49 -0
- data/admin/test/functional/messages_controller_test.rb +49 -0
- data/admin/test/performance/browsing_test.rb +12 -0
- data/admin/test/test_helper.rb +13 -0
- data/admin/test/unit/application_test.rb +7 -0
- data/admin/test/unit/helpers/applications_helper_test.rb +4 -0
- data/admin/test/unit/helpers/message_routes_helper_test.rb +4 -0
- data/admin/test/unit/helpers/message_types_helper_test.rb +4 -0
- data/admin/test/unit/helpers/messages_helper_test.rb +4 -0
- data/admin/test/unit/message_route_test.rb +7 -0
- data/admin/test/unit/message_test.rb +7 -0
- data/admin/test/unit/message_type_test.rb +7 -0
- data/bin/eventbus_dispatcher.rb +118 -0
- data/bin/eventbus_emailer.rb +41 -0
- data/lib/eventbus/connectors/amqp.rb +70 -0
- data/lib/eventbus/connectors/bunny.rb +71 -0
- data/lib/eventbus/connectors/stomp.rb +77 -0
- data/lib/eventbus/message.rb +180 -0
- data/lib/eventbus/queue.rb +28 -0
- data/lib/eventbus/service.rb +116 -0
- metadata +188 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
require 'eventbus/message'
|
|
2
|
+
|
|
3
|
+
class MessagesController < ApplicationController
|
|
4
|
+
# GET /messages
|
|
5
|
+
# GET /messages.json
|
|
6
|
+
def index
|
|
7
|
+
conditions = {}
|
|
8
|
+
|
|
9
|
+
unless params['message'].nil?
|
|
10
|
+
|
|
11
|
+
if params['message']['is_error'] == 1
|
|
12
|
+
params['message']['is_error'] = true
|
|
13
|
+
else
|
|
14
|
+
params['message'].delete('is_error')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
params['message'].each_pair do | field, filter |
|
|
18
|
+
conditions[field] = filter unless filter.nil? or filter.blank?
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
logger.info "*** Filtering on conditions: #{conditions}"
|
|
23
|
+
|
|
24
|
+
@messages = Message.where(conditions).limit(75).reverse_order
|
|
25
|
+
|
|
26
|
+
respond_to do |format|
|
|
27
|
+
format.html # index.html.erb
|
|
28
|
+
format.json { render json: @messages }
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# GET /messages/1
|
|
33
|
+
# GET /messages/1.json
|
|
34
|
+
def show
|
|
35
|
+
@message = Message.find(params[:id])
|
|
36
|
+
|
|
37
|
+
respond_to do |format|
|
|
38
|
+
format.html # show.html.erb
|
|
39
|
+
format.json { render json: @message }
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def resubmit_event
|
|
44
|
+
@message = Message.find(params[:id])
|
|
45
|
+
logger.info "Params: #{params.inspect}"
|
|
46
|
+
logger.info "Resubmit will have status: #{params[:message][:status]}"
|
|
47
|
+
resubmit_to_queue(params[:message][:status])
|
|
48
|
+
redirect_to messages_path
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def send_queue
|
|
52
|
+
@message = Message.find(params[:id])
|
|
53
|
+
q = params[:message][:dispatch_to]
|
|
54
|
+
resubmit_to_queue(nil, q)
|
|
55
|
+
redirect_to messages_path
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
private
|
|
59
|
+
|
|
60
|
+
def resubmit_to_queue(status = nil, queue="dispatcher")
|
|
61
|
+
m = EventBus::Message.new("EVENTBUS_CORE")
|
|
62
|
+
m.load(@message.content)
|
|
63
|
+
m.status = status unless status.nil?
|
|
64
|
+
|
|
65
|
+
system_queue = queue == "dispatcher" ? true : false
|
|
66
|
+
|
|
67
|
+
m.send :queue_name => queue, :system_queue => system_queue
|
|
68
|
+
|
|
69
|
+
logger.info "Resubmitted to queue: #{queue}"
|
|
70
|
+
logger.info "Message content:"
|
|
71
|
+
logger.info m.dump
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
= form_for(@application) do |f|
|
|
2
|
+
- if @application.errors.any?
|
|
3
|
+
#error_explanation
|
|
4
|
+
%h2
|
|
5
|
+
= pluralize(@application.errors.count, "error")
|
|
6
|
+
prohibited this application from being saved:
|
|
7
|
+
|
|
8
|
+
%ul
|
|
9
|
+
- @application.errors.full_messages.each do |msg|
|
|
10
|
+
%li
|
|
11
|
+
= msg
|
|
12
|
+
|
|
13
|
+
.field
|
|
14
|
+
= f.label :name
|
|
15
|
+
%br
|
|
16
|
+
= f.text_field :name
|
|
17
|
+
.field
|
|
18
|
+
= f.label :key
|
|
19
|
+
%br
|
|
20
|
+
= f.text_field :key
|
|
21
|
+
.field
|
|
22
|
+
= f.label :description
|
|
23
|
+
%br
|
|
24
|
+
= f.text_field :description
|
|
25
|
+
|
|
26
|
+
.actions
|
|
27
|
+
= f.submit
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
%h1 Listing Applications
|
|
2
|
+
|
|
3
|
+
%table
|
|
4
|
+
%tr
|
|
5
|
+
%th Name
|
|
6
|
+
%th Key
|
|
7
|
+
%th Description
|
|
8
|
+
%th
|
|
9
|
+
%th
|
|
10
|
+
%th
|
|
11
|
+
|
|
12
|
+
= content_tag_for(:tr, @applications) do |application|
|
|
13
|
+
%td
|
|
14
|
+
= application.name
|
|
15
|
+
%td
|
|
16
|
+
= application.key
|
|
17
|
+
%td
|
|
18
|
+
= application.description
|
|
19
|
+
%td
|
|
20
|
+
= link_to 'Show', application
|
|
21
|
+
%td
|
|
22
|
+
= link_to 'Edit', edit_application_path(application)
|
|
23
|
+
%td
|
|
24
|
+
= link_to 'Destroy', application, confirm: 'Are you sure?', method: :delete
|
|
25
|
+
|
|
26
|
+
%br
|
|
27
|
+
|
|
28
|
+
= link_to 'New Application', new_application_path
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
!!!
|
|
2
|
+
%html
|
|
3
|
+
%head
|
|
4
|
+
%title EventbusPortal
|
|
5
|
+
= stylesheet_link_tag "application", :media => "all"
|
|
6
|
+
= javascript_include_tag "application"
|
|
7
|
+
= csrf_meta_tags
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
%body
|
|
11
|
+
|
|
12
|
+
%header
|
|
13
|
+
.container
|
|
14
|
+
%h1#site_name EventBus
|
|
15
|
+
%nav
|
|
16
|
+
.container
|
|
17
|
+
= link_to "Applications", applications_path
|
|
18
|
+
= link_to "Message Types", message_types_path
|
|
19
|
+
= link_to "Message Routes", message_routes_path
|
|
20
|
+
= link_to "Dispatch Log", messages_path
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
%section#content
|
|
24
|
+
= yield
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
= form_for(@message_route) do |f|
|
|
2
|
+
- if @message_route.errors.any?
|
|
3
|
+
#error_explanation
|
|
4
|
+
%h2
|
|
5
|
+
= pluralize(@message_route.errors.count, "error")
|
|
6
|
+
prohibited this message_route from being saved:
|
|
7
|
+
|
|
8
|
+
%ul
|
|
9
|
+
- @message_route.errors.full_messages.each do |msg|
|
|
10
|
+
%li
|
|
11
|
+
= msg
|
|
12
|
+
|
|
13
|
+
.field
|
|
14
|
+
= f.label :message_type_id
|
|
15
|
+
%br
|
|
16
|
+
= f.collection_select :message_type_id, MessageType.all(:order => "name asc"), :id, :name
|
|
17
|
+
.field
|
|
18
|
+
= f.label :incoming_status
|
|
19
|
+
%br
|
|
20
|
+
= f.text_field :incoming_status
|
|
21
|
+
.field
|
|
22
|
+
= f.label :match_errors
|
|
23
|
+
(Overrides incoming status)
|
|
24
|
+
%br
|
|
25
|
+
= f.check_box :match_errors
|
|
26
|
+
.field
|
|
27
|
+
= f.label :dispatch_to
|
|
28
|
+
%br
|
|
29
|
+
= f.text_field :dispatch_to
|
|
30
|
+
.actions
|
|
31
|
+
= f.submit
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
%h1 Listing Message Routes
|
|
2
|
+
|
|
3
|
+
= div_for(@applications, :style => "margin-top: 20px; border-top-style: solid; border-top-width: 4px; border-color: #999;") do |application|
|
|
4
|
+
|
|
5
|
+
%h2= application.name
|
|
6
|
+
|
|
7
|
+
= div_for(application.message_types.order(:name), :style => 'margin-left: 15px;') do |message_type|
|
|
8
|
+
|
|
9
|
+
%h2= message_type.name
|
|
10
|
+
|
|
11
|
+
%table{ :style => "margin-left: 20px;"}
|
|
12
|
+
%tr
|
|
13
|
+
%th Incoming status
|
|
14
|
+
%th Dispatch to
|
|
15
|
+
%th
|
|
16
|
+
%th
|
|
17
|
+
%th
|
|
18
|
+
|
|
19
|
+
= content_tag_for(:tr, message_type.message_routes.order(:incoming_status)) do |message_route|
|
|
20
|
+
%td= message_route.match_errors ? "*ALL ERRORS*" : message_route.incoming_status
|
|
21
|
+
%td= message_route.dispatch_to
|
|
22
|
+
%td= link_to 'Show', message_route
|
|
23
|
+
%td= link_to 'Edit', edit_message_route_path(message_route)
|
|
24
|
+
%td= link_to 'Destroy', message_route, confirm: 'Are you sure?', method: :delete
|
|
25
|
+
|
|
26
|
+
%br
|
|
27
|
+
|
|
28
|
+
= link_to 'New Message route', new_message_route_path
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
%p#notice
|
|
2
|
+
= notice
|
|
3
|
+
|
|
4
|
+
%p
|
|
5
|
+
%b Message type:
|
|
6
|
+
= @message_route.message_type.name
|
|
7
|
+
|
|
8
|
+
%p
|
|
9
|
+
%b Incoming status:
|
|
10
|
+
= @message_route.incoming_status
|
|
11
|
+
|
|
12
|
+
%p
|
|
13
|
+
%b Dispatch to:
|
|
14
|
+
= @message_route.dispatch_to
|
|
15
|
+
|
|
16
|
+
= link_to 'Edit', edit_message_route_path(@message_route)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
= form_for(@message_type) do |f|
|
|
2
|
+
- if @message_type.errors.any?
|
|
3
|
+
#error_explanation
|
|
4
|
+
%h2
|
|
5
|
+
= pluralize(@message_type.errors.count, "error")
|
|
6
|
+
prohibited this message_type from being saved:
|
|
7
|
+
|
|
8
|
+
%ul
|
|
9
|
+
- @message_type.errors.full_messages.each do |msg|
|
|
10
|
+
%li
|
|
11
|
+
= msg
|
|
12
|
+
|
|
13
|
+
.field
|
|
14
|
+
= f.label :application_id
|
|
15
|
+
%br
|
|
16
|
+
= f.collection_select :application_id, Application.all(:order => "name asc"), :id, :name
|
|
17
|
+
|
|
18
|
+
.field
|
|
19
|
+
= f.label :name
|
|
20
|
+
%br
|
|
21
|
+
= f.text_field :name
|
|
22
|
+
|
|
23
|
+
.field
|
|
24
|
+
= f.label :description
|
|
25
|
+
%br
|
|
26
|
+
= f.text_area :description
|
|
27
|
+
|
|
28
|
+
.actions
|
|
29
|
+
= f.submit
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
%h1 Listing Message Types
|
|
2
|
+
|
|
3
|
+
%table
|
|
4
|
+
%tr
|
|
5
|
+
%th Application
|
|
6
|
+
%th Name
|
|
7
|
+
%th Description
|
|
8
|
+
%th
|
|
9
|
+
%th
|
|
10
|
+
%th
|
|
11
|
+
|
|
12
|
+
= content_tag_for(:tr, @message_types) do |message_type|
|
|
13
|
+
%td
|
|
14
|
+
= message_type.application.name
|
|
15
|
+
%td
|
|
16
|
+
= message_type.name
|
|
17
|
+
%td
|
|
18
|
+
= message_type.description
|
|
19
|
+
%td
|
|
20
|
+
= link_to 'Show', message_type
|
|
21
|
+
%td
|
|
22
|
+
= link_to 'Edit', edit_message_type_path(message_type)
|
|
23
|
+
%td
|
|
24
|
+
= link_to 'Destroy', message_type, confirm: 'Are you sure?', method: :delete
|
|
25
|
+
|
|
26
|
+
%br
|
|
27
|
+
|
|
28
|
+
= link_to 'New Message type', new_message_type_path
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
%h1 Message Dispatch Log
|
|
2
|
+
|
|
3
|
+
%table
|
|
4
|
+
%tr
|
|
5
|
+
%th Time
|
|
6
|
+
%th Application
|
|
7
|
+
%th Type
|
|
8
|
+
%th Status
|
|
9
|
+
%th Error?
|
|
10
|
+
%th Dispatched Queue
|
|
11
|
+
%th
|
|
12
|
+
%th
|
|
13
|
+
|
|
14
|
+
= form_for(Message.new, :action => :index, :method => "get") do |filter|
|
|
15
|
+
%tr
|
|
16
|
+
%td
|
|
17
|
+
= filter.submit "Filter"
|
|
18
|
+
%td
|
|
19
|
+
= filter.collection_select :application_key, Application.order(:name), :key, :name, :include_blank => true
|
|
20
|
+
%td
|
|
21
|
+
= filter.collection_select :message_type, MessageType.order(:name), :name, :name, :include_blank => true
|
|
22
|
+
%td
|
|
23
|
+
= filter.collection_select :status, MessageRoute.select(:incoming_status).order(:incoming_status), :incoming_status, :incoming_status, :include_blank => true
|
|
24
|
+
%td
|
|
25
|
+
= filter.check_box :is_error
|
|
26
|
+
%td
|
|
27
|
+
= filter.collection_select :dispatch_to, MessageRoute.select(:dispatch_to).order(:dispatch_to), :dispatch_to, :dispatch_to, :include_blank => true
|
|
28
|
+
%td
|
|
29
|
+
= filter.submit "Filter"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
= content_tag_for(:tr, @messages) do |message|
|
|
33
|
+
%td
|
|
34
|
+
= message.created_at
|
|
35
|
+
%td
|
|
36
|
+
= message.message_type_id.nil? ? message.application_key : link_to(message.message_type.application.name, message.message_type.application)
|
|
37
|
+
%td
|
|
38
|
+
= message.message_type_id.nil? ? message.message_type_name : link_to(message.message_type_name, message.message_type)
|
|
39
|
+
%td
|
|
40
|
+
= message.status
|
|
41
|
+
%td
|
|
42
|
+
= message.is_error
|
|
43
|
+
%td
|
|
44
|
+
= message.dispatch_to
|
|
45
|
+
%td
|
|
46
|
+
= link_to 'Details', message
|
|
47
|
+
%td
|
|
48
|
+
= link_to 'Filter', "?message[message_guid]=#{message.message_guid}"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
%p#notice
|
|
2
|
+
= notice
|
|
3
|
+
|
|
4
|
+
%fieldset.info
|
|
5
|
+
%legend Message Header Information
|
|
6
|
+
%p
|
|
7
|
+
%b Message Time
|
|
8
|
+
= @message.created_at
|
|
9
|
+
|
|
10
|
+
%p
|
|
11
|
+
%b Application
|
|
12
|
+
= link_to(@message.message_type.application.name, @message.message_type.application) unless @message.message_type.nil?
|
|
13
|
+
%p
|
|
14
|
+
%b Application Key
|
|
15
|
+
= @message.application_key
|
|
16
|
+
|
|
17
|
+
%p
|
|
18
|
+
%b Message Type
|
|
19
|
+
= @message.message_type.nil? ? @message.message_type_name : link_to(@message.message_type_name, @message.message_type)
|
|
20
|
+
|
|
21
|
+
%p
|
|
22
|
+
%b Incoming Status
|
|
23
|
+
= @message.status
|
|
24
|
+
|
|
25
|
+
%p
|
|
26
|
+
%b Error?
|
|
27
|
+
= @message.is_error?
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
%fieldset.resubmission
|
|
32
|
+
%legend Message Resubmission
|
|
33
|
+
= form_for(@message, {:url => { :action => 'resubmit_event'}}) do |f|
|
|
34
|
+
= f.label :status, "Resubmit for Dispatching"
|
|
35
|
+
= f.collection_select :status, MessageRoute.find_all_by_message_type_id(@message.message_type_id), :incoming_status, :incoming_status, :include_blank => "Resbumit as status"
|
|
36
|
+
= f.submit "Re-Dispatch"
|
|
37
|
+
%br
|
|
38
|
+
= form_for(@message, {:url => { :action => 'send_queue' }}) do |f|
|
|
39
|
+
= f.label :dispatch_to, "Send to a specific queue"
|
|
40
|
+
= f.collection_select :dispatch_to, MessageRoute.find_all_by_message_type_id(@message.message_type_id), :dispatch_to, :dispatch_to, :include_blank => "Send to Queue"
|
|
41
|
+
= f.submit "Send"
|
|
42
|
+
|
|
43
|
+
#message_content
|
|
44
|
+
%h3 Content:
|
|
45
|
+
%pre= @message.content
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
require 'rails/all'
|
|
4
|
+
|
|
5
|
+
if defined?(Bundler)
|
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
module EventbusPortal
|
|
13
|
+
class Application < Rails::Application
|
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
15
|
+
# Application configuration should go into files in config/initializers
|
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
17
|
+
|
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
|
20
|
+
|
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
|
24
|
+
|
|
25
|
+
# Activate observers that should always be running.
|
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
|
27
|
+
|
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
30
|
+
config.time_zone = 'Eastern Time (US & Canada)'
|
|
31
|
+
|
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
34
|
+
# config.i18n.default_locale = :de
|
|
35
|
+
|
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
|
37
|
+
config.encoding = "utf-8"
|
|
38
|
+
|
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
|
40
|
+
config.filter_parameters += [:password]
|
|
41
|
+
|
|
42
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
|
43
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
|
44
|
+
# like if you have constraints or database-specific column types
|
|
45
|
+
# config.active_record.schema_format = :sql
|
|
46
|
+
|
|
47
|
+
# Enforce whitelist mode for mass assignment.
|
|
48
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
|
49
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
|
50
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
|
51
|
+
# config.active_record.whitelist_attributes = true
|
|
52
|
+
|
|
53
|
+
# Enable the asset pipeline
|
|
54
|
+
config.assets.enabled = true
|
|
55
|
+
|
|
56
|
+
# Version of your assets, change this if you want to expire all your assets
|
|
57
|
+
config.assets.version = '1.0'
|
|
58
|
+
|
|
59
|
+
config.active_record.table_name_prefix = "ebus_"
|
|
60
|
+
|
|
61
|
+
config.threadsafe!
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
# gem install sqlite3
|
|
3
|
+
#
|
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
+
# gem 'sqlite3'
|
|
6
|
+
development:
|
|
7
|
+
adapter: postgresql
|
|
8
|
+
database: eventbus_dev
|
|
9
|
+
host: localhost
|
|
10
|
+
port: 5432
|
|
11
|
+
username: eventbus
|
|
12
|
+
password: eventbus
|
|
13
|
+
pool: 55
|
|
14
|
+
timeout: 5000
|
|
15
|
+
|
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
|
17
|
+
# re-generated from your development database when you run "rake".
|
|
18
|
+
# Do not set this db to the same as development or production.
|
|
19
|
+
test:
|
|
20
|
+
adapter: sqlite3
|
|
21
|
+
database: db/test.sqlite3
|
|
22
|
+
pool: 55
|
|
23
|
+
timeout: 5000
|
|
24
|
+
|
|
25
|
+
production:
|
|
26
|
+
adapter: sqlite3
|
|
27
|
+
database: db/production.sqlite3
|
|
28
|
+
pool: 55
|
|
29
|
+
timeout: 5000
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
EventbusPortal::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.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 web server 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_controller.perform_caching = false
|
|
15
|
+
|
|
16
|
+
# Don't care if the mailer can't send
|
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
|
18
|
+
|
|
19
|
+
# Print deprecation notices to the Rails logger
|
|
20
|
+
config.active_support.deprecation = :log
|
|
21
|
+
|
|
22
|
+
# Only use best-standards-support built into browsers
|
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
|
24
|
+
|
|
25
|
+
# Raise exception on mass assignment protection for ActiveRecord models
|
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
|
27
|
+
|
|
28
|
+
# Log the query plan for queries taking more than this (works
|
|
29
|
+
# with SQLite, MySQL, and PostgreSQL)
|
|
30
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
31
|
+
|
|
32
|
+
# Do not compress assets
|
|
33
|
+
config.assets.compress = false
|
|
34
|
+
|
|
35
|
+
# Expands the lines which load the assets
|
|
36
|
+
config.assets.debug = true
|
|
37
|
+
end
|