eventbus 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/admin/Gemfile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
# You'll need one of these. You can comment out the others
|
4
|
+
# if you don't have the headers to build them. Otherwise,
|
5
|
+
# building them won't hurt anything.
|
6
|
+
|
7
|
+
gem 'sqlite3'
|
8
|
+
gem 'mysql2'
|
9
|
+
gem 'pg'
|
10
|
+
|
11
|
+
|
12
|
+
# System requirements
|
13
|
+
gem 'rails', '3.2.3'
|
14
|
+
|
15
|
+
gem 'bunny'
|
16
|
+
gem 'railties'
|
17
|
+
gem 'eventbus', :path => '../'
|
18
|
+
gem 'uuid'
|
19
|
+
|
20
|
+
gem 'haml'
|
21
|
+
|
22
|
+
gem 'stomp'
|
23
|
+
gem 'amqp'
|
24
|
+
|
25
|
+
# Gems used only for assets and not required
|
26
|
+
# in production environments by default.
|
27
|
+
group :assets do
|
28
|
+
gem 'sass-rails', '~> 3.2.3'
|
29
|
+
gem 'coffee-rails', '~> 3.2.0'
|
30
|
+
|
31
|
+
gem 'uglifier', '>= 1.0.3'
|
32
|
+
gem 'therubyracer'
|
33
|
+
end
|
34
|
+
|
35
|
+
gem 'jquery-rails', '2.0.0'
|
36
|
+
|
37
|
+
# To use ActiveModel has_secure_password
|
38
|
+
# gem 'bcrypt-ruby', '~> 3.0.0'
|
39
|
+
|
40
|
+
# To use Jbuilder templates for JSON
|
41
|
+
# gem 'jbuilder'
|
42
|
+
|
43
|
+
# Use unicorn as the web server
|
44
|
+
#gem 'unicorn'
|
45
|
+
|
46
|
+
# Deploy with Capistrano
|
47
|
+
# gem 'capistrano'
|
48
|
+
|
49
|
+
# To use debugger
|
50
|
+
# gem 'ruby-debug19', :require => 'ruby-debug'
|
data/admin/Gemfile.lock
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
eventbus (0.0.1)
|
5
|
+
bunny
|
6
|
+
rails
|
7
|
+
uuid
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionmailer (3.2.3)
|
13
|
+
actionpack (= 3.2.3)
|
14
|
+
mail (~> 2.4.4)
|
15
|
+
actionpack (3.2.3)
|
16
|
+
activemodel (= 3.2.3)
|
17
|
+
activesupport (= 3.2.3)
|
18
|
+
builder (~> 3.0.0)
|
19
|
+
erubis (~> 2.7.0)
|
20
|
+
journey (~> 1.0.1)
|
21
|
+
rack (~> 1.4.0)
|
22
|
+
rack-cache (~> 1.2)
|
23
|
+
rack-test (~> 0.6.1)
|
24
|
+
sprockets (~> 2.1.2)
|
25
|
+
activemodel (3.2.3)
|
26
|
+
activesupport (= 3.2.3)
|
27
|
+
builder (~> 3.0.0)
|
28
|
+
activerecord (3.2.3)
|
29
|
+
activemodel (= 3.2.3)
|
30
|
+
activesupport (= 3.2.3)
|
31
|
+
arel (~> 3.0.2)
|
32
|
+
tzinfo (~> 0.3.29)
|
33
|
+
activeresource (3.2.3)
|
34
|
+
activemodel (= 3.2.3)
|
35
|
+
activesupport (= 3.2.3)
|
36
|
+
activesupport (3.2.3)
|
37
|
+
i18n (~> 0.6)
|
38
|
+
multi_json (~> 1.0)
|
39
|
+
arel (3.0.2)
|
40
|
+
builder (3.0.0)
|
41
|
+
bunny (0.7.9)
|
42
|
+
coffee-rails (3.2.2)
|
43
|
+
coffee-script (>= 2.2.0)
|
44
|
+
railties (~> 3.2.0)
|
45
|
+
coffee-script (2.2.0)
|
46
|
+
coffee-script-source
|
47
|
+
execjs
|
48
|
+
coffee-script-source (1.2.0)
|
49
|
+
erubis (2.7.0)
|
50
|
+
execjs (1.3.0)
|
51
|
+
multi_json (~> 1.0)
|
52
|
+
haml (3.1.4)
|
53
|
+
hike (1.2.1)
|
54
|
+
i18n (0.6.0)
|
55
|
+
journey (1.0.3)
|
56
|
+
jquery-rails (2.0.0)
|
57
|
+
railties (>= 3.2.0.beta, < 5.0)
|
58
|
+
thor (~> 0.14)
|
59
|
+
json (1.6.6)
|
60
|
+
libv8 (3.3.10.4)
|
61
|
+
macaddr (1.5.0)
|
62
|
+
systemu (>= 2.4.0)
|
63
|
+
mail (2.4.4)
|
64
|
+
i18n (>= 0.4.0)
|
65
|
+
mime-types (~> 1.16)
|
66
|
+
treetop (~> 1.4.8)
|
67
|
+
mime-types (1.18)
|
68
|
+
multi_json (1.2.0)
|
69
|
+
mysql2 (0.3.11)
|
70
|
+
pg (0.13.2)
|
71
|
+
polyglot (0.3.3)
|
72
|
+
rack (1.4.1)
|
73
|
+
rack-cache (1.2)
|
74
|
+
rack (>= 0.4)
|
75
|
+
rack-ssl (1.3.2)
|
76
|
+
rack
|
77
|
+
rack-test (0.6.1)
|
78
|
+
rack (>= 1.0)
|
79
|
+
rails (3.2.3)
|
80
|
+
actionmailer (= 3.2.3)
|
81
|
+
actionpack (= 3.2.3)
|
82
|
+
activerecord (= 3.2.3)
|
83
|
+
activeresource (= 3.2.3)
|
84
|
+
activesupport (= 3.2.3)
|
85
|
+
bundler (~> 1.0)
|
86
|
+
railties (= 3.2.3)
|
87
|
+
railties (3.2.3)
|
88
|
+
actionpack (= 3.2.3)
|
89
|
+
activesupport (= 3.2.3)
|
90
|
+
rack-ssl (~> 1.3.2)
|
91
|
+
rake (>= 0.8.7)
|
92
|
+
rdoc (~> 3.4)
|
93
|
+
thor (~> 0.14.6)
|
94
|
+
rake (0.9.2.2)
|
95
|
+
rdoc (3.12)
|
96
|
+
json (~> 1.4)
|
97
|
+
sass (3.1.15)
|
98
|
+
sass-rails (3.2.5)
|
99
|
+
railties (~> 3.2.0)
|
100
|
+
sass (>= 3.1.10)
|
101
|
+
tilt (~> 1.3)
|
102
|
+
sprockets (2.1.2)
|
103
|
+
hike (~> 1.2)
|
104
|
+
rack (~> 1.0)
|
105
|
+
tilt (~> 1.1, != 1.3.0)
|
106
|
+
sqlite3 (1.3.5)
|
107
|
+
stomp (1.2.2)
|
108
|
+
systemu (2.5.0)
|
109
|
+
therubyracer (0.10.0)
|
110
|
+
libv8 (~> 3.3.10)
|
111
|
+
thor (0.14.6)
|
112
|
+
tilt (1.3.3)
|
113
|
+
treetop (1.4.10)
|
114
|
+
polyglot
|
115
|
+
polyglot (>= 0.3.1)
|
116
|
+
tzinfo (0.3.32)
|
117
|
+
uglifier (1.2.4)
|
118
|
+
execjs (>= 0.3.0)
|
119
|
+
multi_json (>= 1.0.2)
|
120
|
+
uuid (2.3.5)
|
121
|
+
macaddr (~> 1.0)
|
122
|
+
|
123
|
+
PLATFORMS
|
124
|
+
ruby
|
125
|
+
|
126
|
+
DEPENDENCIES
|
127
|
+
bunny
|
128
|
+
coffee-rails (~> 3.2.0)
|
129
|
+
eventbus!
|
130
|
+
haml
|
131
|
+
jquery-rails (= 2.0.0)
|
132
|
+
mysql2
|
133
|
+
pg
|
134
|
+
rails (= 3.2.3)
|
135
|
+
railties
|
136
|
+
sass-rails (~> 3.2.3)
|
137
|
+
sqlite3
|
138
|
+
stomp
|
139
|
+
therubyracer
|
140
|
+
uglifier (>= 1.0.3)
|
141
|
+
uuid
|
data/admin/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
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
|
+
|
7
|
+
EventbusPortal::Application.load_tasks
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,72 @@
|
|
1
|
+
body {
|
2
|
+
font-family: sans-serif;
|
3
|
+
margin: 0px;
|
4
|
+
padding: 0px;
|
5
|
+
}
|
6
|
+
|
7
|
+
header {
|
8
|
+
.container {
|
9
|
+
background-color: #123;
|
10
|
+
height: 50px;
|
11
|
+
padding: 5px;
|
12
|
+
margin: 0px;
|
13
|
+
color: white;
|
14
|
+
}
|
15
|
+
nav {
|
16
|
+
.container {
|
17
|
+
background-color: #ABC;
|
18
|
+
font-size: 1.3em;
|
19
|
+
height: 30px;
|
20
|
+
a {
|
21
|
+
color: black;
|
22
|
+
text-decoration: none;
|
23
|
+
padding: 3px 5px 3px 5px;
|
24
|
+
border-radius: 5px;
|
25
|
+
|
26
|
+
&:hover {
|
27
|
+
background-color: #123;
|
28
|
+
color: white;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
#content {
|
38
|
+
font-family: sans-serif;
|
39
|
+
margin-left: 10px;
|
40
|
+
}
|
41
|
+
|
42
|
+
table {
|
43
|
+
|
44
|
+
border-collapse: collapse;
|
45
|
+
min-width: 450px;
|
46
|
+
|
47
|
+
tr {
|
48
|
+
border-bottom-style: dotted;
|
49
|
+
border-bottom-width: 1px;
|
50
|
+
border-bottom-color: #333;
|
51
|
+
|
52
|
+
&:first-child {
|
53
|
+
border-bottom-style: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
&:hover {
|
57
|
+
background-color: #ABC;
|
58
|
+
}
|
59
|
+
|
60
|
+
th {
|
61
|
+
background-color: #123;
|
62
|
+
color: white;
|
63
|
+
font-size: 1.2em;
|
64
|
+
padding: 3px 5px 3px 5px;
|
65
|
+
}
|
66
|
+
|
67
|
+
td {
|
68
|
+
padding: 3px 5px 3px 5px;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Place all the styles related to the messages controller here.
|
2
|
+
// They will automatically be included in application.css.
|
3
|
+
// You can use Sass (SCSS) here: http://sass-lang.com/
|
4
|
+
|
5
|
+
fieldset {
|
6
|
+
&.info {
|
7
|
+
width: 30em;
|
8
|
+
}
|
9
|
+
|
10
|
+
&.resubmission {
|
11
|
+
width: 35em;
|
12
|
+
}
|
13
|
+
|
14
|
+
float: left;
|
15
|
+
}
|
16
|
+
|
17
|
+
#message_content {
|
18
|
+
margin-top: 15px;
|
19
|
+
margin-bottom: 15px;
|
20
|
+
margin-right: 15px;
|
21
|
+
padding: 5px;
|
22
|
+
clear: both;
|
23
|
+
max-width: 75em;
|
24
|
+
|
25
|
+
pre {
|
26
|
+
border-style: solid;
|
27
|
+
border-width: 1px;
|
28
|
+
overflow: auto;
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #fff;
|
3
|
+
color: #333;
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px; }
|
7
|
+
|
8
|
+
p, ol, ul, td {
|
9
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
10
|
+
font-size: 13px;
|
11
|
+
line-height: 18px; }
|
12
|
+
|
13
|
+
pre {
|
14
|
+
background-color: #eee;
|
15
|
+
padding: 10px;
|
16
|
+
font-size: 11px; }
|
17
|
+
|
18
|
+
a {
|
19
|
+
color: #000;
|
20
|
+
&:visited {
|
21
|
+
color: #666; }
|
22
|
+
&:hover {
|
23
|
+
color: #fff;
|
24
|
+
background-color: #000; } }
|
25
|
+
|
26
|
+
div {
|
27
|
+
&.field, &.actions {
|
28
|
+
margin-bottom: 10px; } }
|
29
|
+
|
30
|
+
#notice {
|
31
|
+
color: green; }
|
32
|
+
|
33
|
+
.field_with_errors {
|
34
|
+
padding: 2px;
|
35
|
+
background-color: red;
|
36
|
+
display: table; }
|
37
|
+
|
38
|
+
#error_explanation {
|
39
|
+
width: 450px;
|
40
|
+
border: 2px solid red;
|
41
|
+
padding: 7px;
|
42
|
+
padding-bottom: 0;
|
43
|
+
margin-bottom: 20px;
|
44
|
+
background-color: #f0f0f0;
|
45
|
+
h2 {
|
46
|
+
text-align: left;
|
47
|
+
font-weight: bold;
|
48
|
+
padding: 5px 5px 5px 15px;
|
49
|
+
font-size: 12px;
|
50
|
+
margin: -7px;
|
51
|
+
margin-bottom: 0px;
|
52
|
+
background-color: #c00;
|
53
|
+
color: #fff; }
|
54
|
+
ul li {
|
55
|
+
font-size: 12px;
|
56
|
+
list-style: square; } }
|
@@ -0,0 +1,83 @@
|
|
1
|
+
class ApplicationsController < ApplicationController
|
2
|
+
# GET /applications
|
3
|
+
# GET /applications.json
|
4
|
+
def index
|
5
|
+
@applications = Application.all
|
6
|
+
|
7
|
+
respond_to do |format|
|
8
|
+
format.html # index.html.erb
|
9
|
+
format.json { render json: @applications }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /applications/1
|
14
|
+
# GET /applications/1.json
|
15
|
+
def show
|
16
|
+
@application = Application.find(params[:id])
|
17
|
+
|
18
|
+
respond_to do |format|
|
19
|
+
format.html # show.html.erb
|
20
|
+
format.json { render json: @application }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET /applications/new
|
25
|
+
# GET /applications/new.json
|
26
|
+
def new
|
27
|
+
@application = Application.new
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
format.html # new.html.erb
|
31
|
+
format.json { render json: @application }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# GET /applications/1/edit
|
36
|
+
def edit
|
37
|
+
@application = Application.find(params[:id])
|
38
|
+
end
|
39
|
+
|
40
|
+
# POST /applications
|
41
|
+
# POST /applications.json
|
42
|
+
def create
|
43
|
+
@application = Application.new(params[:application])
|
44
|
+
|
45
|
+
respond_to do |format|
|
46
|
+
if @application.save
|
47
|
+
format.html { redirect_to @application, notice: 'Application was successfully created.' }
|
48
|
+
format.json { render json: @application, status: :created, location: @application }
|
49
|
+
else
|
50
|
+
format.html { render action: "new" }
|
51
|
+
format.json { render json: @application.errors, status: :unprocessable_entity }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# PUT /applications/1
|
57
|
+
# PUT /applications/1.json
|
58
|
+
def update
|
59
|
+
@application = Application.find(params[:id])
|
60
|
+
|
61
|
+
respond_to do |format|
|
62
|
+
if @application.update_attributes(params[:application])
|
63
|
+
format.html { redirect_to @application, notice: 'Application was successfully updated.' }
|
64
|
+
format.json { head :no_content }
|
65
|
+
else
|
66
|
+
format.html { render action: "edit" }
|
67
|
+
format.json { render json: @application.errors, status: :unprocessable_entity }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# DELETE /applications/1
|
73
|
+
# DELETE /applications/1.json
|
74
|
+
def destroy
|
75
|
+
@application = Application.find(params[:id])
|
76
|
+
@application.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to applications_url }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
class MessageRoutesController < ApplicationController
|
2
|
+
# GET /message_routes
|
3
|
+
# GET /message_routes.json
|
4
|
+
def index
|
5
|
+
|
6
|
+
@applications = Application.order(:name)
|
7
|
+
#@message_routes = MessageRoute.all
|
8
|
+
|
9
|
+
respond_to do |format|
|
10
|
+
format.html # index.html.erb
|
11
|
+
format.json { render json: @message_routes }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# GET /message_routes/1
|
16
|
+
# GET /message_routes/1.json
|
17
|
+
def show
|
18
|
+
@message_route = MessageRoute.find(params[:id])
|
19
|
+
|
20
|
+
respond_to do |format|
|
21
|
+
format.html # show.html.erb
|
22
|
+
format.json { render json: @message_route }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# GET /message_routes/new
|
27
|
+
# GET /message_routes/new.json
|
28
|
+
def new
|
29
|
+
@message_route = MessageRoute.new
|
30
|
+
|
31
|
+
respond_to do |format|
|
32
|
+
format.html # new.html.erb
|
33
|
+
format.json { render json: @message_route }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# GET /message_routes/1/edit
|
38
|
+
def edit
|
39
|
+
@message_route = MessageRoute.find(params[:id])
|
40
|
+
end
|
41
|
+
|
42
|
+
# POST /message_routes
|
43
|
+
# POST /message_routes.json
|
44
|
+
def create
|
45
|
+
@message_route = MessageRoute.new(params[:message_route])
|
46
|
+
|
47
|
+
respond_to do |format|
|
48
|
+
if @message_route.save
|
49
|
+
format.html { redirect_to @message_route, notice: 'Message route was successfully created.' }
|
50
|
+
format.json { render json: @message_route, status: :created, location: @message_route }
|
51
|
+
else
|
52
|
+
format.html { render action: "new" }
|
53
|
+
format.json { render json: @message_route.errors, status: :unprocessable_entity }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# PUT /message_routes/1
|
59
|
+
# PUT /message_routes/1.json
|
60
|
+
def update
|
61
|
+
@message_route = MessageRoute.find(params[:id])
|
62
|
+
|
63
|
+
respond_to do |format|
|
64
|
+
if @message_route.update_attributes(params[:message_route])
|
65
|
+
format.html { redirect_to @message_route, notice: 'Message route was successfully updated.' }
|
66
|
+
format.json { head :no_content }
|
67
|
+
else
|
68
|
+
format.html { render action: "edit" }
|
69
|
+
format.json { render json: @message_route.errors, status: :unprocessable_entity }
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# DELETE /message_routes/1
|
75
|
+
# DELETE /message_routes/1.json
|
76
|
+
def destroy
|
77
|
+
@message_route = MessageRoute.find(params[:id])
|
78
|
+
@message_route.destroy
|
79
|
+
|
80
|
+
respond_to do |format|
|
81
|
+
format.html { redirect_to message_routes_url }
|
82
|
+
format.json { head :no_content }
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
class MessageTypesController < ApplicationController
|
2
|
+
# GET /message_types
|
3
|
+
# GET /message_types.json
|
4
|
+
def index
|
5
|
+
@message_types = MessageType.all(:order => :name )
|
6
|
+
|
7
|
+
respond_to do |format|
|
8
|
+
format.html # index.html.erb
|
9
|
+
format.json { render json: @message_types }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /message_types/1
|
14
|
+
# GET /message_types/1.json
|
15
|
+
def show
|
16
|
+
@message_type = MessageType.find(params[:id])
|
17
|
+
|
18
|
+
respond_to do |format|
|
19
|
+
format.html # show.html.erb
|
20
|
+
format.json { render json: @message_type }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET /message_types/new
|
25
|
+
# GET /message_types/new.json
|
26
|
+
def new
|
27
|
+
@message_type = MessageType.new
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
format.html # new.html.erb
|
31
|
+
format.json { render json: @message_type }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# GET /message_types/1/edit
|
36
|
+
def edit
|
37
|
+
@message_type = MessageType.find(params[:id])
|
38
|
+
end
|
39
|
+
|
40
|
+
# POST /message_types
|
41
|
+
# POST /message_types.json
|
42
|
+
def create
|
43
|
+
@message_type = MessageType.new(params[:message_type])
|
44
|
+
|
45
|
+
respond_to do |format|
|
46
|
+
if @message_type.save
|
47
|
+
format.html { redirect_to @message_type, notice: 'Message type was successfully created.' }
|
48
|
+
format.json { render json: @message_type, status: :created, location: @message_type }
|
49
|
+
else
|
50
|
+
format.html { render action: "new" }
|
51
|
+
format.json { render json: @message_type.errors, status: :unprocessable_entity }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# PUT /message_types/1
|
57
|
+
# PUT /message_types/1.json
|
58
|
+
def update
|
59
|
+
@message_type = MessageType.find(params[:id])
|
60
|
+
|
61
|
+
respond_to do |format|
|
62
|
+
if @message_type.update_attributes(params[:message_type])
|
63
|
+
format.html { redirect_to @message_type, notice: 'Message type was successfully updated.' }
|
64
|
+
format.json { head :no_content }
|
65
|
+
else
|
66
|
+
format.html { render action: "edit" }
|
67
|
+
format.json { render json: @message_type.errors, status: :unprocessable_entity }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# DELETE /message_types/1
|
73
|
+
# DELETE /message_types/1.json
|
74
|
+
def destroy
|
75
|
+
@message_type = MessageType.find(params[:id])
|
76
|
+
@message_type.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to message_types_url }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|