jubilee 1.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +5 -0
  4. data/CHANGELOG +32 -0
  5. data/Gemfile +35 -0
  6. data/Gemfile.lock +244 -0
  7. data/Guardfile +24 -0
  8. data/KNOWN_ISSUES +6 -0
  9. data/LICENSE.txt +20 -0
  10. data/README.md +147 -0
  11. data/ROADMAP +5 -0
  12. data/Rakefile +98 -0
  13. data/bin/jubilee +6 -0
  14. data/bin/jubilee_d +13 -0
  15. data/examples/chatapp/Gemfile +5 -0
  16. data/examples/chatapp/Gemfile.lock +27 -0
  17. data/examples/chatapp/README.md +17 -0
  18. data/examples/chatapp/app.rb +57 -0
  19. data/examples/chatapp/config.ru +3 -0
  20. data/examples/chatapp/public/assets/javascripts/application.js +67 -0
  21. data/examples/chatapp/public/assets/javascripts/jquery.js +5 -0
  22. data/examples/chatapp/public/assets/javascripts/sockjs-0.3.4.min.js +27 -0
  23. data/examples/chatapp/public/assets/javascripts/vertxbus.js +216 -0
  24. data/examples/chatapp/public/assets/stylesheets/application.css +29 -0
  25. data/examples/client/sockjs-0.3.4.min.js +27 -0
  26. data/examples/client/vertxbus.js +216 -0
  27. data/examples/jubilee.conf.rb +12 -0
  28. data/examples/jubilee/keystore.jks +0 -0
  29. data/examples/jubilee/server-keystore.jks +0 -0
  30. data/jars/hazelcast-2.6.3.jar +0 -0
  31. data/jars/jackson-annotations-2.2.2.jar +0 -0
  32. data/jars/jackson-core-2.2.2.jar +0 -0
  33. data/jars/jackson-databind-2.2.2.jar +0 -0
  34. data/jars/netty-all-4.0.13.Final.jar +0 -0
  35. data/jars/vertx-core-2.1M3-SNAPSHOT.jar +0 -0
  36. data/jars/vertx-hazelcast-2.1M3-SNAPSHOT.jar +0 -0
  37. data/java/src/jubilee/JubileeService.java +20 -0
  38. data/java/src/org/jruby/jubilee/Const.java +32 -0
  39. data/java/src/org/jruby/jubilee/RackApplication.java +103 -0
  40. data/java/src/org/jruby/jubilee/RackEnvironment.java +150 -0
  41. data/java/src/org/jruby/jubilee/RackEnvironmentHash.java +449 -0
  42. data/java/src/org/jruby/jubilee/RackInput.java +62 -0
  43. data/java/src/org/jruby/jubilee/RackResponse.java +11 -0
  44. data/java/src/org/jruby/jubilee/RubyHttpServerResponse.java +88 -0
  45. data/java/src/org/jruby/jubilee/RubyServer.java +171 -0
  46. data/java/src/org/jruby/jubilee/deploy/Starter.java +26 -0
  47. data/java/src/org/jruby/jubilee/impl/RubyIORackInput.java +201 -0
  48. data/java/src/org/jruby/jubilee/impl/RubyNullIO.java +107 -0
  49. data/java/src/org/jruby/jubilee/utils/RubyHelper.java +37 -0
  50. data/java/src/org/jruby/jubilee/vertx/JubileeVertx.java +38 -0
  51. data/jubilee.gemspec +201 -0
  52. data/lib/jubilee.rb +17 -0
  53. data/lib/jubilee/application.rb +13 -0
  54. data/lib/jubilee/cli.rb +127 -0
  55. data/lib/jubilee/configuration.rb +177 -0
  56. data/lib/jubilee/const.rb +40 -0
  57. data/lib/jubilee/jubilee.jar +0 -0
  58. data/lib/jubilee/response.rb +69 -0
  59. data/lib/jubilee/server.rb +12 -0
  60. data/lib/jubilee/version.rb +10 -0
  61. data/lib/rack/chunked.rb +38 -0
  62. data/lib/rack/handler/jubilee.rb +44 -0
  63. data/lib/vertx.rb +26 -0
  64. data/lib/vertx/README.md +7 -0
  65. data/lib/vertx/buffer.rb +251 -0
  66. data/lib/vertx/event_bus.rb +206 -0
  67. data/lib/vertx/shared_data.rb +214 -0
  68. data/spec/apps/rack/basic/config.ru +50 -0
  69. data/spec/apps/rails4/basic/.gitignore +16 -0
  70. data/spec/apps/rails4/basic/Gemfile +41 -0
  71. data/spec/apps/rails4/basic/Gemfile.lock +127 -0
  72. data/spec/apps/rails4/basic/README.rdoc +28 -0
  73. data/spec/apps/rails4/basic/Rakefile +6 -0
  74. data/spec/apps/rails4/basic/app/assets/images/.keep +0 -0
  75. data/spec/apps/rails4/basic/app/assets/images/rails.png +0 -0
  76. data/spec/apps/rails4/basic/app/assets/javascripts/application.js +12 -0
  77. data/spec/apps/rails4/basic/app/assets/stylesheets/application.css +13 -0
  78. data/spec/apps/rails4/basic/app/controllers/application_controller.rb +5 -0
  79. data/spec/apps/rails4/basic/app/controllers/concerns/.keep +0 -0
  80. data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb +11 -0
  81. data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb.erb +11 -0
  82. data/spec/apps/rails4/basic/app/controllers/root_controller.rb +14 -0
  83. data/spec/apps/rails4/basic/app/helpers/application_helper.rb +2 -0
  84. data/spec/apps/rails4/basic/app/mailers/.keep +0 -0
  85. data/spec/apps/rails4/basic/app/models/.keep +0 -0
  86. data/spec/apps/rails4/basic/app/models/concerns/.keep +0 -0
  87. data/spec/apps/rails4/basic/app/views/layouts/application.html.erb +14 -0
  88. data/spec/apps/rails4/basic/app/views/reloader/index.html.erb +1 -0
  89. data/spec/apps/rails4/basic/app/views/root/index.html.erb +8 -0
  90. data/spec/apps/rails4/basic/app/views/root/streaming.html.erb +6 -0
  91. data/spec/apps/rails4/basic/bin/bundle +3 -0
  92. data/spec/apps/rails4/basic/bin/rails +4 -0
  93. data/spec/apps/rails4/basic/bin/rake +4 -0
  94. data/spec/apps/rails4/basic/config.ru +4 -0
  95. data/spec/apps/rails4/basic/config/application.rb +23 -0
  96. data/spec/apps/rails4/basic/config/boot.rb +4 -0
  97. data/spec/apps/rails4/basic/config/database.yml +20 -0
  98. data/spec/apps/rails4/basic/config/environment.rb +5 -0
  99. data/spec/apps/rails4/basic/config/environments/development.rb +29 -0
  100. data/spec/apps/rails4/basic/config/environments/production.rb +80 -0
  101. data/spec/apps/rails4/basic/config/environments/test.rb +36 -0
  102. data/spec/apps/rails4/basic/config/initializers/backtrace_silencers.rb +7 -0
  103. data/spec/apps/rails4/basic/config/initializers/filter_parameter_logging.rb +4 -0
  104. data/spec/apps/rails4/basic/config/initializers/inflections.rb +16 -0
  105. data/spec/apps/rails4/basic/config/initializers/mime_types.rb +5 -0
  106. data/spec/apps/rails4/basic/config/initializers/secret_token.rb +12 -0
  107. data/spec/apps/rails4/basic/config/initializers/session_store.rb +2 -0
  108. data/spec/apps/rails4/basic/config/initializers/wrap_parameters.rb +14 -0
  109. data/spec/apps/rails4/basic/config/locales/en.yml +23 -0
  110. data/spec/apps/rails4/basic/config/routes.rb +5 -0
  111. data/spec/apps/rails4/basic/db/seeds.rb +7 -0
  112. data/spec/apps/rails4/basic/lib/assets/.keep +0 -0
  113. data/spec/apps/rails4/basic/lib/tasks/.keep +0 -0
  114. data/spec/apps/rails4/basic/public/404.html +58 -0
  115. data/spec/apps/rails4/basic/public/422.html +58 -0
  116. data/spec/apps/rails4/basic/public/500.html +57 -0
  117. data/spec/apps/rails4/basic/public/favicon.ico +0 -0
  118. data/spec/apps/rails4/basic/public/robots.txt +5 -0
  119. data/spec/apps/rails4/basic/public/some_page.html +7 -0
  120. data/spec/apps/rails4/basic/test/controllers/.keep +0 -0
  121. data/spec/apps/rails4/basic/test/fixtures/.keep +0 -0
  122. data/spec/apps/rails4/basic/test/helpers/.keep +0 -0
  123. data/spec/apps/rails4/basic/test/integration/.keep +0 -0
  124. data/spec/apps/rails4/basic/test/mailers/.keep +0 -0
  125. data/spec/apps/rails4/basic/test/models/.keep +0 -0
  126. data/spec/apps/rails4/basic/test/test_helper.rb +15 -0
  127. data/spec/apps/rails4/basic/vendor/assets/javascripts/.keep +0 -0
  128. data/spec/apps/rails4/basic/vendor/assets/stylesheets/.keep +0 -0
  129. data/spec/apps/sinatra/basic/Gemfile +4 -0
  130. data/spec/apps/sinatra/basic/Gemfile.lock +20 -0
  131. data/spec/apps/sinatra/basic/basic.rb +27 -0
  132. data/spec/apps/sinatra/basic/config.ru +7 -0
  133. data/spec/apps/sinatra/basic/public/some_page.html +7 -0
  134. data/spec/apps/sinatra/basic/views/index.erb +4 -0
  135. data/spec/apps/sinatra/basic/views/posted.haml +2 -0
  136. data/spec/apps/sinatra/basic/views/poster.haml +4 -0
  137. data/spec/apps/sinatra/basic/views/request_mapping.haml +4 -0
  138. data/spec/integration/basic_rack_spec.rb +89 -0
  139. data/spec/integration/basic_rails4_spec.rb +64 -0
  140. data/spec/integration/basic_sinatra_spec.rb +80 -0
  141. data/spec/spec_helper.rb +13 -0
  142. data/test/.ruby-version +1 -0
  143. data/test/config/app.rb +5 -0
  144. data/test/jubilee/test_cli.rb +11 -0
  145. data/test/jubilee/test_configuration.rb +31 -0
  146. data/test/jubilee/test_rack_server.rb +137 -0
  147. data/test/jubilee/test_response.rb +272 -0
  148. data/test/jubilee/test_server.rb +72 -0
  149. data/test/jubilee/test_upload.rb +301 -0
  150. data/test/sinatra_app/app.rb +31 -0
  151. data/test/sinatra_app/config.ru +6 -0
  152. data/test/sinatra_app/public/test.html +10 -0
  153. data/test/sinatra_app/unicorn.conf.rb +29 -0
  154. data/test/test_helper.rb +93 -0
  155. metadata +242 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 962679d3298e64379fab6c97420d891b247fab19
4
+ data.tar.gz: ce3372e3ee9fc1a9b560f3f4e19ab505127848b7
5
+ SHA512:
6
+ metadata.gz: 2e64bb1443a88d24451f2ff4001c5efcb49d64fe28bdd4c6ea2b998e492b646c7f0c277a836a44fd09b81e497b83ee8a7c983d07bbedd2d36f464bbf9de1afd3
7
+ data.tar.gz: c0b37d5dbc739f36e5345ad19b60cb8f6fa4fed6e9508e4b73685c29cca67f41c2e13ebb5cb44f4db9be6fd4097931c3699760af8fc05bbfbbcaf72554d81935
@@ -0,0 +1 @@
1
+ jruby-1.7.8
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - jruby-19mode # JRuby in 1.9 mode
4
+
5
+ script: "bundle exec rake test"
@@ -0,0 +1,32 @@
1
+ Release 1.0.2
2
+ =============
3
+
4
+ fix RACK_ENV not set when using the jubilee command
5
+
6
+ Release 1.0.1
7
+ =============
8
+
9
+ Fix string status code caused crash on rails 4
10
+
11
+ Release 1.0.0
12
+ =============
13
+
14
+ Add full suport of event bus, shared data and clustering.
15
+
16
+ Documents, chat app
17
+
18
+ Release 0.4.0
19
+ =============
20
+
21
+ Upgrade to vert.x 2.1.0
22
+
23
+ Release 0.2.2
24
+ =============
25
+
26
+ Bugfix form data leakage.
27
+
28
+ Release 0.2.1
29
+ =============
30
+
31
+ Supoort multiple values for a header.
32
+ Add Rack::MethodOverride to support DELETE, PUT, HEAD, OPTION methods.
data/Gemfile ADDED
@@ -0,0 +1,35 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rack', '>= 1.4.1'
4
+ #gem 'rack', path: "../../ruby/rack"
5
+ gem 'spoon', '~> 0.0.4'
6
+
7
+ group :development do
8
+ gem 'jeweler', '~> 1.8.7'
9
+ end
10
+
11
+ group :test do
12
+ gem 'guard'
13
+ gem 'guard-minitest'
14
+ gem 'multipart-post'
15
+ gem 'pry'
16
+ gem 'rcov'
17
+ gem 'rspec'
18
+ gem 'capybara'
19
+ gem 'poltergeist'
20
+
21
+ # sinatra spec
22
+ gem 'sinatra'
23
+ gem 'haml'
24
+ # rails4 spec
25
+ gem 'rails', '~> 4.0.0'
26
+ gem 'activerecord-jdbc-adapter'
27
+ gem 'jdbc-sqlite3'
28
+ gem 'sass-rails', '~> 4.0.0'
29
+ gem 'uglifier', '>= 1.3.0'
30
+ gem 'coffee-rails', '~> 4.0.0'
31
+ gem 'therubyrhino'
32
+ gem 'jquery-rails', '>= 3.0'
33
+ gem 'turbolinks'
34
+ gem 'jbuilder', '~> 1.2'
35
+ end
@@ -0,0 +1,244 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actionmailer (4.0.2)
5
+ actionpack (= 4.0.2)
6
+ mail (~> 2.5.4)
7
+ actionpack (4.0.2)
8
+ activesupport (= 4.0.2)
9
+ builder (~> 3.1.0)
10
+ erubis (~> 2.7.0)
11
+ rack (~> 1.5.2)
12
+ rack-test (~> 0.6.2)
13
+ activemodel (4.0.2)
14
+ activesupport (= 4.0.2)
15
+ builder (~> 3.1.0)
16
+ activerecord (4.0.2)
17
+ activemodel (= 4.0.2)
18
+ activerecord-deprecated_finders (~> 1.0.2)
19
+ activesupport (= 4.0.2)
20
+ arel (~> 4.0.0)
21
+ activerecord-deprecated_finders (1.0.3)
22
+ activerecord-jdbc-adapter (1.3.4)
23
+ activerecord (>= 2.2)
24
+ activesupport (4.0.2)
25
+ i18n (~> 0.6, >= 0.6.4)
26
+ minitest (~> 4.2)
27
+ multi_json (~> 1.3)
28
+ thread_safe (~> 0.1)
29
+ tzinfo (~> 0.3.37)
30
+ addressable (2.3.5)
31
+ arel (4.0.1)
32
+ atomic (1.1.14)
33
+ atomic (1.1.14-java)
34
+ builder (3.1.4)
35
+ capybara (2.2.0)
36
+ mime-types (>= 1.16)
37
+ nokogiri (>= 1.3.3)
38
+ rack (>= 1.0.0)
39
+ rack-test (>= 0.5.4)
40
+ xpath (~> 2.0)
41
+ celluloid (0.15.2)
42
+ timers (~> 1.1.0)
43
+ cliver (0.3.2)
44
+ coderay (1.1.0)
45
+ coffee-rails (4.0.1)
46
+ coffee-script (>= 2.2.0)
47
+ railties (>= 4.0.0, < 5.0)
48
+ coffee-script (2.2.0)
49
+ coffee-script-source
50
+ execjs
51
+ coffee-script-source (1.6.3)
52
+ diff-lcs (1.2.5)
53
+ erubis (2.7.0)
54
+ execjs (2.0.2)
55
+ faraday (0.8.8)
56
+ multipart-post (~> 1.2.0)
57
+ ffi (1.9.3)
58
+ ffi (1.9.3-java)
59
+ formatador (0.2.4)
60
+ git (1.2.6)
61
+ github_api (0.10.1)
62
+ addressable
63
+ faraday (~> 0.8.1)
64
+ hashie (>= 1.2)
65
+ multi_json (~> 1.4)
66
+ nokogiri (~> 1.5.2)
67
+ oauth2
68
+ guard (2.2.5)
69
+ formatador (>= 0.2.4)
70
+ listen (~> 2.1)
71
+ lumberjack (~> 1.0)
72
+ pry (>= 0.9.12)
73
+ thor (>= 0.18.1)
74
+ guard-minitest (0.5.0)
75
+ guard (>= 0.4)
76
+ haml (4.0.4)
77
+ tilt
78
+ hashie (2.0.5)
79
+ highline (1.6.20)
80
+ hike (1.2.3)
81
+ httpauth (0.2.0)
82
+ i18n (0.6.9)
83
+ jbuilder (1.5.3)
84
+ activesupport (>= 3.0.0)
85
+ multi_json (>= 1.2.0)
86
+ jdbc-sqlite3 (3.7.2.1)
87
+ jeweler (1.8.8)
88
+ builder
89
+ bundler (~> 1.0)
90
+ git (>= 1.2.5)
91
+ github_api (= 0.10.1)
92
+ highline (>= 1.6.15)
93
+ nokogiri (= 1.5.10)
94
+ rake
95
+ rdoc
96
+ jquery-rails (3.0.4)
97
+ railties (>= 3.0, < 5.0)
98
+ thor (>= 0.14, < 2.0)
99
+ json (1.8.1-java)
100
+ jwt (0.1.8)
101
+ multi_json (>= 1.5)
102
+ listen (2.4.0)
103
+ celluloid (>= 0.15.2)
104
+ rb-fsevent (>= 0.9.3)
105
+ rb-inotify (>= 0.9)
106
+ lumberjack (1.0.4)
107
+ mail (2.5.4)
108
+ mime-types (~> 1.16)
109
+ treetop (~> 1.4.8)
110
+ method_source (0.8.2)
111
+ mime-types (1.25.1)
112
+ minitest (4.7.5)
113
+ multi_json (1.8.2)
114
+ multi_xml (0.5.5)
115
+ multipart-post (1.2.0)
116
+ nokogiri (1.5.10-java)
117
+ oauth2 (0.9.2)
118
+ faraday (~> 0.8)
119
+ httpauth (~> 0.2)
120
+ jwt (~> 0.1.4)
121
+ multi_json (~> 1.0)
122
+ multi_xml (~> 0.5)
123
+ rack (~> 1.2)
124
+ poltergeist (1.5.0)
125
+ capybara (~> 2.1)
126
+ cliver (~> 0.3.1)
127
+ multi_json (~> 1.0)
128
+ websocket-driver (>= 0.2.0)
129
+ polyglot (0.3.3)
130
+ pry (0.9.12.4)
131
+ coderay (~> 1.0)
132
+ method_source (~> 0.8)
133
+ slop (~> 3.4)
134
+ pry (0.9.12.4-java)
135
+ coderay (~> 1.0)
136
+ method_source (~> 0.8)
137
+ slop (~> 3.4)
138
+ spoon (~> 0.0)
139
+ rack (1.5.2)
140
+ rack-protection (1.5.1)
141
+ rack
142
+ rack-test (0.6.2)
143
+ rack (>= 1.0)
144
+ rails (4.0.2)
145
+ actionmailer (= 4.0.2)
146
+ actionpack (= 4.0.2)
147
+ activerecord (= 4.0.2)
148
+ activesupport (= 4.0.2)
149
+ bundler (>= 1.3.0, < 2.0)
150
+ railties (= 4.0.2)
151
+ sprockets-rails (~> 2.0.0)
152
+ railties (4.0.2)
153
+ actionpack (= 4.0.2)
154
+ activesupport (= 4.0.2)
155
+ rake (>= 0.8.7)
156
+ thor (>= 0.18.1, < 2.0)
157
+ rake (10.1.1)
158
+ rb-fsevent (0.9.4)
159
+ rb-inotify (0.9.3)
160
+ ffi (>= 0.5.0)
161
+ rcov (0.9.11)
162
+ rcov (0.9.11-java)
163
+ rdoc (4.1.0)
164
+ json (~> 1.4)
165
+ rspec (2.14.1)
166
+ rspec-core (~> 2.14.0)
167
+ rspec-expectations (~> 2.14.0)
168
+ rspec-mocks (~> 2.14.0)
169
+ rspec-core (2.14.7)
170
+ rspec-expectations (2.14.4)
171
+ diff-lcs (>= 1.1.3, < 2.0)
172
+ rspec-mocks (2.14.4)
173
+ sass (3.2.13)
174
+ sass-rails (4.0.1)
175
+ railties (>= 4.0.0, < 5.0)
176
+ sass (>= 3.1.10)
177
+ sprockets-rails (~> 2.0.0)
178
+ sinatra (1.4.4)
179
+ rack (~> 1.4)
180
+ rack-protection (~> 1.4)
181
+ tilt (~> 1.3, >= 1.3.4)
182
+ slop (3.4.7)
183
+ spoon (0.0.4)
184
+ ffi
185
+ sprockets (2.10.1)
186
+ hike (~> 1.2)
187
+ multi_json (~> 1.0)
188
+ rack (~> 1.0)
189
+ tilt (~> 1.1, != 1.3.0)
190
+ sprockets-rails (2.0.1)
191
+ actionpack (>= 3.0)
192
+ activesupport (>= 3.0)
193
+ sprockets (~> 2.8)
194
+ therubyrhino (2.0.2)
195
+ therubyrhino_jar (>= 1.7.3)
196
+ therubyrhino_jar (1.7.4)
197
+ thor (0.18.1)
198
+ thread_safe (0.1.3)
199
+ atomic
200
+ thread_safe (0.1.3-java)
201
+ atomic
202
+ tilt (1.4.1)
203
+ timers (1.1.0)
204
+ treetop (1.4.15)
205
+ polyglot
206
+ polyglot (>= 0.3.1)
207
+ turbolinks (2.1.0)
208
+ coffee-rails
209
+ tzinfo (0.3.38)
210
+ uglifier (2.4.0)
211
+ execjs (>= 0.3.0)
212
+ json (>= 1.8.0)
213
+ websocket-driver (0.3.2)
214
+ websocket-driver (0.3.2-java)
215
+ xpath (2.0.0)
216
+ nokogiri (~> 1.3)
217
+
218
+ PLATFORMS
219
+ java
220
+
221
+ DEPENDENCIES
222
+ activerecord-jdbc-adapter
223
+ capybara
224
+ coffee-rails (~> 4.0.0)
225
+ guard
226
+ guard-minitest
227
+ haml
228
+ jbuilder (~> 1.2)
229
+ jdbc-sqlite3
230
+ jeweler (~> 1.8.7)
231
+ jquery-rails (>= 3.0)
232
+ multipart-post
233
+ poltergeist
234
+ pry
235
+ rack (>= 1.4.1)
236
+ rails (~> 4.0.0)
237
+ rcov
238
+ rspec
239
+ sass-rails (~> 4.0.0)
240
+ sinatra
241
+ spoon (~> 0.0.4)
242
+ therubyrhino
243
+ turbolinks
244
+ uglifier (>= 1.3.0)
@@ -0,0 +1,24 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'minitest' do
5
+ # with Minitest::Unit
6
+ watch(%r|^test/(.*)\/?test_(.*)\.rb|)
7
+ watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
8
+ watch(%r|^test/test_helper\.rb|) { "test" }
9
+
10
+ # with Minitest::Spec
11
+ # watch(%r|^spec/(.*)_spec\.rb|)
12
+ # watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
13
+ # watch(%r|^spec/spec_helper\.rb|) { "spec" }
14
+
15
+ # Rails 3.2
16
+ # watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/controllers/#{m[1]}_test.rb" }
17
+ # watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
18
+ # watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
19
+
20
+ # Rails
21
+ # watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/functional/#{m[1]}_test.rb" }
22
+ # watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
23
+ # watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
24
+ end
@@ -0,0 +1,6 @@
1
+ Known issues
2
+ ============
3
+
4
+ * Doesn't provide a way to stop daemonized instances
5
+
6
+ * Doesn't support rack async.callback
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012-2014 Isaiah Peng
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,147 @@
1
+ [![Build Status](https://travis-ci.org/isaiah/jubilee.png?branch=master)](https://travis-ci.org/isaiah/jubilee)
2
+
3
+ Jubilee server
4
+ =========
5
+
6
+ > "We need a web framework for Vertx.", you said.
7
+
8
+ > "But why not use Vertx in your Rails applications, it's the most productive web framework ever created."
9
+
10
+ The Answer is Jubilee, a rack server with [vertx 2.0](http://vertx.io) awesomeness builtin. Check out the
11
+ [demo](http://192.241.201.68:8080/) [application](https://github.com/isaiah/jubilee/tree/master/examples/chatapp).
12
+
13
+ Why another rack server?
14
+ ------------------------
15
+
16
+ > "Vert.x is a lightweight, high performance application platform for the JVM
17
+ > that's designed for modern mobile, web, and enterprise applications."
18
+ > - vertx.io site
19
+
20
+ In short, Vertx is nodejs on the JVM, only much more faster, checkout the awesome
21
+ [benchmarks](http://vertxproject.wordpress.com/2012/05/09/vert-x-vs-node-js-simple-http-benchmarks/)
22
+
23
+ By using Vertx, jubilee inherent advantages in terms of performance, and all
24
+ the other cool features of Vertx:
25
+
26
+ * [EventBus](https://github.com/isaiah/jubilee/wiki/Event-Bus)
27
+ * [SharedData](https://github.com/isaiah/jubilee/wiki/SharedData)
28
+ * [Clustering](https://github.com/isaiah/jubilee/wiki/Clustering)
29
+
30
+
31
+
32
+ Installation
33
+ ------------
34
+
35
+ $ jruby -S gem install jubilee
36
+
37
+ Jubilee requires JRuby 1.7.5 or later, and JDK 7+
38
+
39
+ Get started
40
+ -----------
41
+
42
+ $ cd a-rack-app
43
+ $ jruby -S jubilee
44
+
45
+ Setup
46
+ -----
47
+
48
+ If you use bundler, you might want to add `jubilee` to your Gemfile,
49
+ this is also required if you want use rails http streaming,
50
+
51
+ $ jubilee
52
+
53
+ or if you prefer to use the rack handler(e.g. development) use:
54
+
55
+ $ rails s jubilee
56
+
57
+ or
58
+
59
+ $ rackup -s jubilee
60
+
61
+ Event Bus
62
+ =========
63
+
64
+ Event Bus is a pub/sub mechanism, it can be used from server to server, server
65
+ to client and client to client, with the same API!
66
+
67
+ Examples
68
+ --------
69
+
70
+ Assume necessary javascript files are loaded in the page (they can be found [here](https://github.com/isaiah/jubilee/tree/master/examples/client)),
71
+ start jubilee in a rack application with:
72
+
73
+ ```
74
+ $ jubilee --eventbus /eventbus
75
+ ```
76
+
77
+ In one browser:
78
+
79
+ ```javascript
80
+ var eb = new vertx.EventBus("/eventbus");
81
+ eb.registerHandler("test", function(data){
82
+ console.info(data);
83
+ });
84
+
85
+ ```
86
+
87
+ In another:
88
+
89
+ ```javascript
90
+ var eb = new vertx.EventBus("/eventbus");
91
+ eb.send("test", "hello, world");
92
+ ```
93
+
94
+ For more advanced examples, checkout the
95
+ [chatapp](https://github.com/isaiah/jubilee/tree/master/examples/chatapp).
96
+
97
+ Performance Tuning
98
+ -------------------
99
+
100
+ If you're creating a lot of connections to a Jubilee(Vert.x) server in a short
101
+ period of time, e.g. benchmarking with tools like [wrk](https://github.com/wg/wrk),
102
+ you may need to tweak some settings in order to avoid the TCP accept queue
103
+ getting full. This can result in connections being refused or packets being
104
+ dropped during the handshake which can then cause the client to retry.
105
+
106
+ A classic symptom of this is if you see long connection times just over
107
+ 3000ms at your client.
108
+
109
+ How to tune this is operating system specific but in Linux you need to
110
+ increase a couple of settings in the TCP / Net config (10000 is an
111
+ arbitrarily large number)
112
+
113
+ ```shell
114
+ sudo sysctl -w net.core.somaxconn=10000
115
+ sudo sysctl -w net.ipv4.tcp_max_syn_backlog=10000
116
+ ```
117
+
118
+ For other operating systems, please consult your operating system
119
+ documentation.
120
+
121
+ Contributing
122
+ -------------
123
+
124
+ All kinds of contributions are welcome.
125
+
126
+ File an issue [here](https://github.com/isaiah/jubilee/issues) if you encounter any problems. Or if you prefer to fix by yourself:
127
+
128
+ 1. Fork it
129
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
130
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
131
+ 4. Push to the branch (`git push origin my-new-feature`)
132
+ 5. Create new Pull Request
133
+
134
+ License
135
+ --------
136
+
137
+ See [LICENSE.txt](https://github.com/isaiah/jubilee/blob/master/LICENSE.txt)
138
+
139
+ Acknowledgment
140
+ --------------
141
+
142
+ YourKit is kindly supporting Jubilee Server with its full-featured Java Profiler.
143
+ YourKit, LLC is the creator of innovative and intelligent tools for profiling
144
+ Java and .NET applications. Take a look at YourKit's leading software products:
145
+ [YourKit Java
146
+ Profiler](http://www.yourkit.com/java/profiler/index.jsp) and
147
+ [YourKit .NET Profiler](http://www.yourkit.com/.net/profiler/index.jsp).