webroar 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +48 -1
- data/README +11 -14
- data/Rakefile +1 -1
- data/conf/mime_type.yml +172 -166
- data/conf/server_internal_config.yml +30 -8
- data/doc/user-guide.html +294 -153
- data/doc/user-guide.txt +9 -13
- data/lib/command_runner.rb +1 -0
- data/lib/dependencies.rb +18 -15
- data/lib/installer.rb +115 -50
- data/src/admin_panel/app/controllers/admin_controller.rb +1 -15
- data/src/admin_panel/app/controllers/application_controller.rb +2 -2
- data/src/admin_panel/app/controllers/application_specification_controller.rb +2 -1
- data/src/admin_panel/app/controllers/headers_controller.rb +73 -0
- data/src/admin_panel/app/controllers/mail_specification_controller.rb +10 -0
- data/src/admin_panel/app/controllers/server_specification_controller.rb +14 -0
- data/src/admin_panel/app/helpers/admin_helper.rb +0 -85
- data/src/admin_panel/app/models/app.rb +1 -1
- data/src/admin_panel/app/models/application_specification.rb +33 -25
- data/src/admin_panel/app/models/headers.rb +116 -0
- data/src/admin_panel/app/models/mail_specification.rb +20 -5
- data/src/admin_panel/app/models/server_specification.rb +2 -7
- data/src/admin_panel/app/views/admin/configuration.html.erb +10 -5
- data/src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb +4 -4
- data/src/admin_panel/app/views/graph/_graph_page.html.erb +3 -0
- data/src/admin_panel/app/views/headers/_add_expires_text_box.html.erb +35 -0
- data/src/admin_panel/app/views/headers/_expires_by_type_form.html.erb +65 -0
- data/src/admin_panel/app/views/headers/_headers_table.html.erb +113 -0
- data/src/admin_panel/app/views/mail_specification/_current_spec.html.erb +168 -0
- data/src/admin_panel/app/views/{admin → server_specification}/_add_div.html.erb +1 -1
- data/src/admin_panel/config/initializers/application_constants.rb +6 -0
- data/src/admin_panel/lib/control.rb +6 -3
- data/src/admin_panel/lib/scgi.rb +74 -21
- data/src/admin_panel/lib/yaml_writer.rb +51 -17
- data/src/admin_panel/public/javascripts/application.js +20 -1
- data/src/head/wr_access_log.c +2 -2
- data/src/head/wr_application.c +294 -236
- data/src/head/wr_application.h +8 -8
- data/src/head/wr_configurator.c +451 -517
- data/src/head/wr_configurator.h +10 -115
- data/src/head/wr_connection.c +26 -25
- data/src/head/wr_connection.h +2 -3
- data/src/head/wr_controller.c +110 -93
- data/src/head/wr_controller.h +6 -6
- data/src/head/wr_main.c +31 -24
- data/src/head/wr_request.c +70 -93
- data/src/head/wr_request.h +0 -4
- data/src/head/wr_resolver.c +21 -15
- data/src/head/wr_resolver.h +2 -2
- data/src/head/wr_server.c +36 -26
- data/src/head/wr_server.h +5 -5
- data/src/head/wr_worker.c +551 -512
- data/src/head/wr_worker.h +33 -20
- data/src/helper/wr_config.c +316 -0
- data/src/helper/wr_config.h +235 -0
- data/src/helper/wr_helper.h +1 -5
- data/src/helper/wr_logger.c +4 -4
- data/src/helper/wr_scgi.c +3 -4
- data/src/helper/wr_scgi.h +2 -0
- data/src/helper/wr_string.h +2 -2
- data/src/helper/wr_util.c +3 -1
- data/src/helper/wr_util.h +0 -0
- data/src/helper/wr_yaml_parser.c +30 -0
- data/src/helper/wr_yaml_parser.h +1 -0
- data/src/ruby_lib/exception_tracker/instrumentation/action_controller.rb +2 -1
- data/src/ruby_lib/mailer/smtpmail.rb +7 -4
- data/src/ruby_lib/profiler/instrumentation/action_controller.rb +2 -1
- data/src/ruby_lib/profiler/instrumentation/active_record.rb +3 -0
- data/src/ruby_lib/rack/adapter/rails.rb +14 -7
- data/src/ruby_lib/ruby_interface/client.rb +1 -1
- data/src/ruby_lib/ruby_interface/version.rb +2 -2
- data/src/ruby_lib/webroar_app_loader.rb +4 -2
- data/src/worker/wkr_controller.c +200 -140
- data/src/worker/wkr_http.c +14 -28
- data/src/worker/wkr_http.h +4 -4
- data/src/worker/wkr_http_request.c +12 -11
- data/src/worker/wkr_http_request.h +7 -8
- data/src/worker/wkr_http_response.c +10 -14
- data/src/worker/wkr_http_response.h +0 -1
- data/src/worker/wkr_main.c +74 -140
- data/src/worker/wkr_static.c +295 -108
- data/src/worker/wkr_static.h +20 -7
- data/src/worker/worker.c +245 -70
- data/src/worker/worker.h +46 -34
- data/tasks/compile.rake +128 -175
- data/tasks/test.rake +345 -469
- data/test/spec/webroar_command_spec.rb +23 -0
- metadata +173 -43
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/README +0 -34
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/Rakefile +0 -13
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/init.rb +0 -5
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/action_mailer_tls.rb +0 -16
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb +0 -123
- data/src/admin_panel/vendor/plugins/action_mailer_optional_tls/test/tls_test.rb +0 -42
- data/src/head/wr_config.h +0 -165
- data/src/ruby_lib/mailer/action_mailer_tls.rb +0 -16
- data/src/ruby_lib/mailer/smtp_tls.rb +0 -123
@@ -63,4 +63,27 @@ describe "Webroar command" do
|
|
63
63
|
op.should =~ /WebROaR-\d[.]\d[.]\d/
|
64
64
|
end
|
65
65
|
|
66
|
+
it "should remove application" do
|
67
|
+
cmd = "#{File.join(WEBROAR_ROOT,'bin','webroar')} remove test_app"
|
68
|
+
system("#{cmd} >>#{TEST_RUN_LOG} 2>>#{TEST_RUN_LOG}")
|
69
|
+
sleep(5)
|
70
|
+
res = @http.start{ |http| http.get('/test_app/')}
|
71
|
+
res.class.should == Net::HTTPNotFound
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should add application" do
|
75
|
+
cmd = "#{File.join(WEBROAR_ROOT,'bin','webroar')} add test_app -R /test_app -D #{TEST_APP_PATH} -U #{RUN_AS_USER} -N 1 -X 2 -E test"
|
76
|
+
system("#{cmd} >>#{TEST_RUN_LOG} 2>>#{TEST_RUN_LOG}")
|
77
|
+
sleep(60)
|
78
|
+
res = @http.start{ |http| http.get('/test_app/')}
|
79
|
+
res.class.should == Net::HTTPOK
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should respond during application restart" do
|
83
|
+
cmd = "#{File.join(WEBROAR_ROOT,'bin','webroar')} restart test_app"
|
84
|
+
system("#{cmd} >>#{TEST_RUN_LOG} 2>>#{TEST_RUN_LOG}")
|
85
|
+
res = @http.start{ |http| http.get('/test_app/')}
|
86
|
+
res.class.should == Net::HTTPOK
|
87
|
+
sleep(60)
|
88
|
+
end
|
66
89
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webroar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 15
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Aditya Babbar
|
@@ -11,79 +17,120 @@ autorequire:
|
|
11
17
|
bindir: bin
|
12
18
|
cert_chain: []
|
13
19
|
|
14
|
-
date: 2010-
|
20
|
+
date: 2010-08-09 00:00:00 +05:30
|
15
21
|
default_executable:
|
16
22
|
dependencies:
|
17
23
|
- !ruby/object:Gem::Dependency
|
18
24
|
name: calendar_date_select
|
19
|
-
|
20
|
-
|
21
|
-
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
22
28
|
requirements:
|
23
29
|
- - ">="
|
24
30
|
- !ruby/object:Gem::Version
|
31
|
+
hash: 17
|
32
|
+
segments:
|
33
|
+
- 1
|
34
|
+
- 15
|
25
35
|
version: "1.15"
|
26
|
-
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
27
38
|
- !ruby/object:Gem::Dependency
|
28
39
|
name: rack
|
29
|
-
|
30
|
-
|
31
|
-
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
32
43
|
requirements:
|
33
44
|
- - ">="
|
34
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 21
|
47
|
+
segments:
|
48
|
+
- 1
|
49
|
+
- 0
|
50
|
+
- 1
|
35
51
|
version: 1.0.1
|
36
|
-
|
52
|
+
type: :runtime
|
53
|
+
version_requirements: *id002
|
37
54
|
- !ruby/object:Gem::Dependency
|
38
55
|
name: rake
|
39
|
-
|
40
|
-
|
41
|
-
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
42
59
|
requirements:
|
43
60
|
- - ">="
|
44
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 61
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
- 8
|
66
|
+
- 1
|
45
67
|
version: 0.8.1
|
46
|
-
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id003
|
47
70
|
- !ruby/object:Gem::Dependency
|
48
71
|
name: rspec
|
49
|
-
|
50
|
-
|
51
|
-
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
52
75
|
requirements:
|
53
76
|
- - ">="
|
54
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 27
|
79
|
+
segments:
|
80
|
+
- 1
|
81
|
+
- 2
|
82
|
+
- 2
|
55
83
|
version: 1.2.2
|
56
|
-
|
84
|
+
type: :runtime
|
85
|
+
version_requirements: *id004
|
57
86
|
- !ruby/object:Gem::Dependency
|
58
87
|
name: sqlite3-ruby
|
59
|
-
|
60
|
-
|
61
|
-
|
88
|
+
prerelease: false
|
89
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
62
91
|
requirements:
|
63
92
|
- - ">="
|
64
93
|
- !ruby/object:Gem::Version
|
94
|
+
hash: 25
|
95
|
+
segments:
|
96
|
+
- 1
|
97
|
+
- 2
|
98
|
+
- 3
|
65
99
|
version: 1.2.3
|
66
|
-
|
100
|
+
type: :runtime
|
101
|
+
version_requirements: *id005
|
67
102
|
- !ruby/object:Gem::Dependency
|
68
103
|
name: starling
|
69
|
-
|
70
|
-
|
71
|
-
|
104
|
+
prerelease: false
|
105
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
72
107
|
requirements:
|
73
108
|
- - ">="
|
74
109
|
- !ruby/object:Gem::Version
|
110
|
+
hash: 55
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
- 10
|
114
|
+
- 0
|
75
115
|
version: 0.10.0
|
76
|
-
|
116
|
+
type: :runtime
|
117
|
+
version_requirements: *id006
|
77
118
|
- !ruby/object:Gem::Dependency
|
78
119
|
name: will_paginate
|
79
|
-
|
80
|
-
|
81
|
-
|
120
|
+
prerelease: false
|
121
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
82
123
|
requirements:
|
83
124
|
- - ~>
|
84
125
|
- !ruby/object:Gem::Version
|
126
|
+
hash: 27
|
127
|
+
segments:
|
128
|
+
- 2
|
129
|
+
- 3
|
130
|
+
- 12
|
85
131
|
version: 2.3.12
|
86
|
-
|
132
|
+
type: :runtime
|
133
|
+
version_requirements: *id007
|
87
134
|
description: WebROaR is an application server that makes deployments of ruby web applications extremely simple. It provides an integrated solution to view the run time performance numbers and email notifications in case any exceptions occur in any of the deployed applications. It is 5 to 55% faster than all other comparable deployment stacks for Ruby on Rails applications. Check out http://webroar.in for more details.
|
88
135
|
email:
|
89
136
|
- aditya.babbar@webroar.in
|
@@ -150,9 +197,7 @@ files:
|
|
150
197
|
- src/ruby_lib/profiler/instrumentation/instrumentation.rb
|
151
198
|
- src/ruby_lib/profiler/webroar_profiling.rb
|
152
199
|
- src/ruby_lib/profiler/message_dispatcher.rb
|
153
|
-
- src/ruby_lib/mailer/smtp_tls.rb
|
154
200
|
- src/ruby_lib/mailer/smtpmail.rb
|
155
|
-
- src/ruby_lib/mailer/action_mailer_tls.rb
|
156
201
|
- src/ruby_lib/ruby_interface/deflater.rb
|
157
202
|
- src/ruby_lib/ruby_interface/request_body.rb
|
158
203
|
- src/ruby_lib/ruby_interface/constants.rb
|
@@ -163,7 +208,6 @@ files:
|
|
163
208
|
- src/ruby_lib/ruby_interface/utils.rb
|
164
209
|
- src/ruby_lib/ruby_interface/adapter.rb
|
165
210
|
- src/ruby_lib/ruby_interface/ruby_interface.rb
|
166
|
-
- src/head/wr_config.h
|
167
211
|
- src/head/wr_resolver.h
|
168
212
|
- src/head/wr_configurator.h
|
169
213
|
- src/head/wr_configurator.c
|
@@ -295,12 +339,12 @@ files:
|
|
295
339
|
- src/admin_panel/app/helpers/admin_helper.rb
|
296
340
|
- src/admin_panel/app/helpers/exceptions_helper.rb
|
297
341
|
- src/admin_panel/app/views/mail_specification/_sendmail_form.html.erb
|
342
|
+
- src/admin_panel/app/views/mail_specification/_current_spec.html.erb
|
298
343
|
- src/admin_panel/app/views/mail_specification/_smtp_form.html.erb
|
299
344
|
- src/admin_panel/app/views/admin/home.html.erb
|
300
345
|
- src/admin_panel/app/views/admin/_application_table.html.erb
|
301
346
|
- src/admin_panel/app/views/admin/configuration.html.erb
|
302
347
|
- src/admin_panel/app/views/admin/change_password_form.html.erb
|
303
|
-
- src/admin_panel/app/views/admin/_add_div.html.erb
|
304
348
|
- src/admin_panel/app/views/admin/index.html.erb
|
305
349
|
- src/admin_panel/app/views/graph/_query_date.html.erb
|
306
350
|
- src/admin_panel/app/views/graph/_get_url_data.html.erb
|
@@ -321,11 +365,15 @@ files:
|
|
321
365
|
- src/admin_panel/app/views/graph/_get_url_breakup_data.html.erb
|
322
366
|
- src/admin_panel/app/views/graph/_query_period.html.erb
|
323
367
|
- src/admin_panel/app/views/graph/_get_throughput_data.html.erb
|
368
|
+
- src/admin_panel/app/views/headers/_add_expires_text_box.html.erb
|
369
|
+
- src/admin_panel/app/views/headers/_expires_by_type_form.html.erb
|
370
|
+
- src/admin_panel/app/views/headers/_headers_table.html.erb
|
324
371
|
- src/admin_panel/app/views/layouts/application.html.erb
|
325
372
|
- src/admin_panel/app/views/layouts/index.html.erb
|
326
373
|
- src/admin_panel/app/views/application_specification/_application_specification_form.html.erb
|
327
374
|
- src/admin_panel/app/views/application_specification/edit_application_form.html.erb
|
328
375
|
- src/admin_panel/app/views/application_specification/add_application_form.html.erb
|
376
|
+
- src/admin_panel/app/views/server_specification/_add_div.html.erb
|
329
377
|
- src/admin_panel/app/views/server_specification/_ssl_support_form.html.erb
|
330
378
|
- src/admin_panel/app/views/exceptions/_link_partial.html.erb
|
331
379
|
- src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb
|
@@ -338,10 +386,12 @@ files:
|
|
338
386
|
- src/admin_panel/app/controllers/exceptions_controller.rb
|
339
387
|
- src/admin_panel/app/controllers/application_controller.rb
|
340
388
|
- src/admin_panel/app/controllers/admin_controller.rb
|
389
|
+
- src/admin_panel/app/controllers/headers_controller.rb
|
341
390
|
- src/admin_panel/app/controllers/server_specification_controller.rb
|
342
391
|
- src/admin_panel/app/models/url_breakup_time_sample.rb
|
343
392
|
- src/admin_panel/app/models/app_time_sample.rb
|
344
393
|
- src/admin_panel/app/models/pseudo_model.rb
|
394
|
+
- src/admin_panel/app/models/headers.rb
|
345
395
|
- src/admin_panel/app/models/application_specification.rb
|
346
396
|
- src/admin_panel/app/models/resource_usage.rb
|
347
397
|
- src/admin_panel/app/models/user.rb
|
@@ -2006,12 +2056,6 @@ files:
|
|
2006
2056
|
- src/admin_panel/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb
|
2007
2057
|
- src/admin_panel/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb
|
2008
2058
|
- src/admin_panel/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb
|
2009
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/README
|
2010
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/Rakefile
|
2011
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/test/tls_test.rb
|
2012
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/init.rb
|
2013
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb
|
2014
|
-
- src/admin_panel/vendor/plugins/action_mailer_optional_tls/lib/action_mailer_tls.rb
|
2015
2059
|
- src/admin_panel/vendor/plugins/open_flash_chart_2/MIT-LICENSE
|
2016
2060
|
- src/admin_panel/vendor/plugins/open_flash_chart_2/README
|
2017
2061
|
- src/admin_panel/vendor/plugins/open_flash_chart_2/tasks/open_flash_chart_tasks.rake
|
@@ -2054,8 +2098,10 @@ files:
|
|
2054
2098
|
- src/admin_panel/script/dbconsole
|
2055
2099
|
- src/admin_panel/script/plugin
|
2056
2100
|
- src/helper/wr_util.h
|
2101
|
+
- src/helper/wr_config.h
|
2057
2102
|
- src/helper/wr_helper.h
|
2058
2103
|
- src/helper/wr_msg_queue_client.c
|
2104
|
+
- src/helper/wr_config.c
|
2059
2105
|
- src/helper/wr_yaml_parser.c
|
2060
2106
|
- src/helper/wr_macro.h
|
2061
2107
|
- src/helper/wr_logger.c
|
@@ -2127,6 +2173,82 @@ files:
|
|
2127
2173
|
- tasks/compile.rake
|
2128
2174
|
- tasks/gem.rake
|
2129
2175
|
- tasks/test.rake
|
2176
|
+
- test/unit/queue_test.c
|
2177
|
+
- test/unit/yaml_test.c
|
2178
|
+
- test/unit/util_test.c
|
2179
|
+
- test/unit/scgi_test.c
|
2180
|
+
- test/unit/test.c
|
2181
|
+
- test/unit/ut_test.c
|
2182
|
+
- test/unit/ut_test.h
|
2183
|
+
- test/unit/test.h
|
2184
|
+
- test/unit/config/config4.yml
|
2185
|
+
- test/unit/config/config3.yml
|
2186
|
+
- test/unit/config/config2.yml
|
2187
|
+
- test/unit/config/config1.yml
|
2188
|
+
- test/unit/config/config5.yml
|
2189
|
+
- test/spec/test_app/config/database.yml
|
2190
|
+
- test/spec/access_log_spec.rb
|
2191
|
+
- test/spec/content_encoding_spec.rb
|
2192
|
+
- test/spec/analytics_spec.rb
|
2193
|
+
- test/spec/http_request_parser_spec.rb
|
2194
|
+
- test/spec/connection_keep_alive_spec.rb
|
2195
|
+
- test/spec/upload_helper.rb
|
2196
|
+
- test/spec/webroar_command_spec.rb
|
2197
|
+
- test/spec/host_name_spec.rb
|
2198
|
+
- test/spec/http_spec.rb
|
2199
|
+
- test/spec/conditional_spec.rb
|
2200
|
+
- test/spec/spec_helper.rb
|
2201
|
+
- test/spec/heart_beat_spec.rb
|
2202
|
+
- test/spec/test_app/db/migrate/20090602102438_create_users.rb
|
2203
|
+
- test/spec/test_app/app/helpers/application_helper.rb
|
2204
|
+
- test/spec/test_app/app/helpers/users_helper.rb
|
2205
|
+
- test/spec/test_app/app/helpers/test_helper.rb
|
2206
|
+
- test/spec/test_app/app/controllers/test_controller.rb
|
2207
|
+
- test/spec/test_app/app/controllers/application_controller.rb
|
2208
|
+
- test/spec/test_app/app/controllers/users_controller.rb
|
2209
|
+
- test/spec/test_app/app/models/user.rb
|
2210
|
+
- test/spec/test_app/config/environment.rb
|
2211
|
+
- test/spec/test_app/config/initializers/session_store.rb
|
2212
|
+
- test/spec/test_app/config/initializers/inflections.rb
|
2213
|
+
- test/spec/test_app/config/initializers/backtrace_silencers.rb
|
2214
|
+
- test/spec/test_app/config/initializers/new_rails_defaults.rb
|
2215
|
+
- test/spec/test_app/config/initializers/mime_types.rb
|
2216
|
+
- test/spec/test_app/config/routes.rb
|
2217
|
+
- test/spec/test_app/config/boot.rb
|
2218
|
+
- test/spec/test_app/config/environments/test.rb
|
2219
|
+
- test/spec/test_app/config/environments/development.rb
|
2220
|
+
- test/spec/test_app/config/environments/production.rb
|
2221
|
+
- test/load_test.rb
|
2222
|
+
- test/spec/test_app/public/javascripts/application.js
|
2223
|
+
- test/spec/test_app/public/javascripts/dragdrop.js
|
2224
|
+
- test/spec/test_app/public/javascripts/controls.js
|
2225
|
+
- test/spec/test_app/public/javascripts/prototype.js
|
2226
|
+
- test/spec/test_app/public/javascripts/effects.js
|
2227
|
+
- test/spec/test_app/public/stylesheets/scaffold.css
|
2228
|
+
- test/spec/test_app/public/422.html
|
2229
|
+
- test/spec/test_app/public/404.html
|
2230
|
+
- test/spec/test_app/public/index.html
|
2231
|
+
- test/spec/test_app/public/500.html
|
2232
|
+
- test/spec/test_app/public/robots.txt
|
2233
|
+
- test/spec/test_app/app/views/layouts/users.html.erb
|
2234
|
+
- test/spec/test_app/app/views/users/show.html.erb
|
2235
|
+
- test/spec/test_app/app/views/users/index.html.erb
|
2236
|
+
- test/spec/test_app/app/views/users/new.html.erb
|
2237
|
+
- test/spec/test_app/app/views/users/edit.html.erb
|
2238
|
+
- test/spec/test_app/app/views/test/upload_file.html.erb
|
2239
|
+
- test/spec/test_app/app/views/test/post_data.html.erb
|
2240
|
+
- test/spec/test_app/script/about
|
2241
|
+
- test/spec/test_app/script/runner
|
2242
|
+
- test/spec/test_app/script/console
|
2243
|
+
- test/spec/test_app/script/server
|
2244
|
+
- test/spec/test_app/script/destroy
|
2245
|
+
- test/spec/test_app/script/performance/profiler
|
2246
|
+
- test/spec/test_app/script/performance/benchmarker
|
2247
|
+
- test/spec/test_app/script/generate
|
2248
|
+
- test/spec/test_app/script/dbconsole
|
2249
|
+
- test/spec/test_app/script/plugin
|
2250
|
+
- test/spec/test_app/vendor/.placeholder
|
2251
|
+
- test/spec/test_app/Rakefile
|
2130
2252
|
has_rdoc: true
|
2131
2253
|
homepage: http://webroar.in
|
2132
2254
|
licenses: []
|
@@ -2137,21 +2259,29 @@ rdoc_options: []
|
|
2137
2259
|
require_paths:
|
2138
2260
|
- lib
|
2139
2261
|
required_ruby_version: !ruby/object:Gem::Requirement
|
2262
|
+
none: false
|
2140
2263
|
requirements:
|
2141
2264
|
- - ">="
|
2142
2265
|
- !ruby/object:Gem::Version
|
2266
|
+
hash: 61
|
2267
|
+
segments:
|
2268
|
+
- 1
|
2269
|
+
- 8
|
2270
|
+
- 5
|
2143
2271
|
version: 1.8.5
|
2144
|
-
version:
|
2145
2272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2273
|
+
none: false
|
2146
2274
|
requirements:
|
2147
2275
|
- - ">="
|
2148
2276
|
- !ruby/object:Gem::Version
|
2277
|
+
hash: 3
|
2278
|
+
segments:
|
2279
|
+
- 0
|
2149
2280
|
version: "0"
|
2150
|
-
version:
|
2151
2281
|
requirements: []
|
2152
2282
|
|
2153
2283
|
rubyforge_project: webroar
|
2154
|
-
rubygems_version: 1.3.
|
2284
|
+
rubygems_version: 1.3.7
|
2155
2285
|
signing_key:
|
2156
2286
|
specification_version: 3
|
2157
2287
|
summary: A ruby application server.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
= action_mailer_optional_tls
|
2
|
-
|
3
|
-
Allows Google Mail SMTP to be used with Ruby on Rails' ActionMailer.
|
4
|
-
|
5
|
-
== Install
|
6
|
-
./script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git
|
7
|
-
|
8
|
-
== Configure
|
9
|
-
|
10
|
-
Add the following to your environment.rb file:
|
11
|
-
|
12
|
-
ActionMailer::Base.smtp_settings = {
|
13
|
-
:tls => true,
|
14
|
-
:address => "smtp.gmail.com",
|
15
|
-
:port => "587",
|
16
|
-
:domain => "YOURDOMAIN",
|
17
|
-
:authentication => :plain,
|
18
|
-
:user_name => "GOOGLEUSERNAME",
|
19
|
-
:password => "GOOGLEPASSWORD"
|
20
|
-
}
|
21
|
-
|
22
|
-
== Webified Documentation
|
23
|
-
|
24
|
-
http://douglasfshearer.com/blog/gmail-smtp-with-ruby-on-rails-and-actionmailer
|
25
|
-
|
26
|
-
== Credits
|
27
|
-
|
28
|
-
This useful plugin is hosted at http://douglasfshearer.com as a public service, due to the continued downtime of http://kylemaxwell.com
|
29
|
-
|
30
|
-
Douglas F Shearer is neither the creator nor maintainer of this work, so if it's broke, it's broke.
|
31
|
-
|
32
|
-
Created by Kyle Maxwell - http://kylemaxwell.com/
|
33
|
-
|
34
|
-
Forked and adjusted by Nathan L. Walls - http://wallscorp.us/ to resolve the issue describe here: http://blog.inspired.no/smtp-error-while-using-gmail-in-rails-271 and satisfy differences between Ruby 1.8.6 and Ruby 1.8.7. Note: this is brittle, but solves a need.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/testtask'
|
3
|
-
require 'rake/rdoctask'
|
4
|
-
|
5
|
-
desc 'Default: run unit tests.'
|
6
|
-
task :default => :test
|
7
|
-
|
8
|
-
desc 'Test the plugin.'
|
9
|
-
Rake::TestTask.new(:test) do |t|
|
10
|
-
t.libs << 'lib'
|
11
|
-
t.pattern = 'test/**/*_test.rb'
|
12
|
-
t.verbose = true
|
13
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "action_mailer"
|
3
|
-
|
4
|
-
ActionMailer::Base.class_eval do
|
5
|
-
private
|
6
|
-
def perform_delivery_smtp(mail)
|
7
|
-
destinations = mail.destinations
|
8
|
-
mail.ready_to_send
|
9
|
-
|
10
|
-
Net::SMTP.start(smtp_settings[:address], smtp_settings[:port], smtp_settings[:domain],
|
11
|
-
smtp_settings[:user_name], smtp_settings[:password], smtp_settings[:authentication],
|
12
|
-
smtp_settings[:tls], smtp_settings[:ssl]) do |smtp|
|
13
|
-
smtp.sendmail(mail.encoded, mail.from, destinations)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,123 +0,0 @@
|
|
1
|
-
require "openssl"
|
2
|
-
require "net/smtp"
|
3
|
-
|
4
|
-
Net::SMTP.class_eval do
|
5
|
-
|
6
|
-
def self.start( address, port = nil,
|
7
|
-
helo = 'localhost.localdomain',
|
8
|
-
user = nil, secret = nil, authtype = nil, use_tls = false,
|
9
|
-
use_ssl = false, &block) # :yield: smtp
|
10
|
-
new(address, port).start(helo, user, secret, authtype, use_tls, use_ssl, &block)
|
11
|
-
end
|
12
|
-
|
13
|
-
def start( helo = 'localhost.localdomain',
|
14
|
-
user = nil, secret = nil, authtype = nil, use_tls = false, use_ssl = false ) # :yield: smtp
|
15
|
-
start_method = use_tls ? :do_tls_start : use_ssl ? :do_ssl_start : :do_start
|
16
|
-
if block_given?
|
17
|
-
begin
|
18
|
-
send start_method, helo, user, secret, authtype
|
19
|
-
return yield(self)
|
20
|
-
ensure
|
21
|
-
do_finish
|
22
|
-
end
|
23
|
-
else
|
24
|
-
send start_method, helo, user, secret, authtype
|
25
|
-
return self
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def do_tls_start(helodomain, user, secret, authtype)
|
32
|
-
raise IOError, 'SMTP session already started' if @started
|
33
|
-
|
34
|
-
if VERSION == '1.8.6'
|
35
|
-
check_auth_args user, secret, authtype if user or secret
|
36
|
-
elsif VERSION == '1.8.7'
|
37
|
-
check_auth_args user, secret
|
38
|
-
end
|
39
|
-
|
40
|
-
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
|
41
|
-
@socket = Net::InternetMessageIO.new(sock)
|
42
|
-
@socket.read_timeout = 60 #@read_timeout
|
43
|
-
@socket.debug_output = STDERR #@debug_output
|
44
|
-
|
45
|
-
check_response(critical { recv_response() })
|
46
|
-
do_helo(helodomain)
|
47
|
-
|
48
|
-
raise 'openssl library not installed' unless defined?(OpenSSL)
|
49
|
-
starttls
|
50
|
-
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
51
|
-
ssl.sync_close = true
|
52
|
-
ssl.connect
|
53
|
-
@socket = Net::InternetMessageIO.new(ssl)
|
54
|
-
@socket.read_timeout = 60 #@read_timeout
|
55
|
-
@socket.debug_output = STDERR #@debug_output
|
56
|
-
do_helo(helodomain)
|
57
|
-
|
58
|
-
authenticate user, secret, authtype if user
|
59
|
-
@started = true
|
60
|
-
ensure
|
61
|
-
unless @started
|
62
|
-
# authentication failed, cancel connection.
|
63
|
-
@socket.close if not @started and @socket and not @socket.closed?
|
64
|
-
@socket = nil
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def do_ssl_start(helodomain, user, secret, authtype)
|
69
|
-
raise IOError, 'SMTP session already started' if @started
|
70
|
-
check_auth_args user, secret, authtype if user or secret
|
71
|
-
|
72
|
-
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
|
73
|
-
raise 'openssl library not installed' unless defined?(OpenSSL)
|
74
|
-
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
75
|
-
ssl.sync_close = true
|
76
|
-
ssl.connect
|
77
|
-
@socket = Net::InternetMessageIO.new(ssl)
|
78
|
-
@socket.read_timeout = 60 #@read_timeout
|
79
|
-
@socket.debug_output = STDERR #@debug_output
|
80
|
-
|
81
|
-
check_response(critical { recv_response() })
|
82
|
-
do_helo(helodomain)
|
83
|
-
|
84
|
-
do_helo(helodomain)
|
85
|
-
|
86
|
-
authenticate user, secret, authtype if user
|
87
|
-
@started = true
|
88
|
-
ensure
|
89
|
-
unless @started
|
90
|
-
# authentication failed, cancel connection.
|
91
|
-
@socket.close if not @started and @socket and not @socket.closed?
|
92
|
-
@socket = nil
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
def do_helo(helodomain)
|
97
|
-
begin
|
98
|
-
if @esmtp
|
99
|
-
ehlo helodomain
|
100
|
-
else
|
101
|
-
helo helodomain
|
102
|
-
end
|
103
|
-
rescue Net::ProtocolError
|
104
|
-
if @esmtp
|
105
|
-
@esmtp = false
|
106
|
-
@error_occured = false
|
107
|
-
retry
|
108
|
-
end
|
109
|
-
raise
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
def starttls
|
114
|
-
getok('STARTTLS')
|
115
|
-
end
|
116
|
-
|
117
|
-
def quit
|
118
|
-
begin
|
119
|
-
getok('QUIT')
|
120
|
-
rescue EOFError, OpenSSL::SSL::SSLError
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require 'test/unit'
|
3
|
-
gem "actionpack"
|
4
|
-
gem "actionmailer"
|
5
|
-
gem "activesupport"
|
6
|
-
require "active_support"
|
7
|
-
require "action_pack"
|
8
|
-
require "action_mailer"
|
9
|
-
require "init"
|
10
|
-
|
11
|
-
class Emailer < ActionMailer::Base
|
12
|
-
def email(h)
|
13
|
-
recipients h[:recipients]
|
14
|
-
subject h[:subject]
|
15
|
-
from h[:from]
|
16
|
-
body h[:body]
|
17
|
-
content_type "text/plain"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class TlsTest < Test::Unit::TestCase
|
22
|
-
# Replace this with your real tests.
|
23
|
-
def setup
|
24
|
-
ActionMailer::Base.smtp_settings = {
|
25
|
-
:address => "smtp.gmail.com",
|
26
|
-
:port => 587,
|
27
|
-
:user_name => ENV['EMAIL'],
|
28
|
-
:password => ENV['PASSWORD'],
|
29
|
-
:authentication => :plain,
|
30
|
-
:tls => true
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_send_mail
|
35
|
-
Emailer.deliver_email(
|
36
|
-
:recipients => ENV["EMAIL"],
|
37
|
-
:subject => "SMTP/TLS test",
|
38
|
-
:from => ENV["EMAIL"],
|
39
|
-
:body => "This email was sent at #{Time.now.inspect}"
|
40
|
-
)
|
41
|
-
end
|
42
|
-
end
|