jubilee 2.1.0.beta-java → 2.1.0.rc1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +13 -1
  3. data/README.md +65 -54
  4. data/Rakefile +23 -21
  5. data/examples/chatapp/Gemfile +1 -2
  6. data/examples/chatapp/Gemfile.lock +2 -2
  7. data/examples/chatapp/README.md +14 -2
  8. data/examples/chatapp/app.rb +1 -0
  9. data/examples/chatapp/config.json +4 -0
  10. data/examples/chatapp/config.ru +0 -2
  11. data/jars/annotations-1.3.2.jar +0 -0
  12. data/jars/lang-jruby-2.1.0-final.jar +0 -0
  13. data/jars/log4j-1.2.16.jar +0 -0
  14. data/jars/slf4j-api-1.6.2.jar +0 -0
  15. data/jars/vertx-core-2.1.2.jar +0 -0
  16. data/jars/{vertx-hazelcast-2.1.1.jar → vertx-hazelcast-2.1.2.jar} +0 -0
  17. data/jars/{vertx-platform-2.1.1.jar → vertx-platform-2.1.2.jar} +0 -0
  18. data/lib/container.rb +117 -0
  19. data/lib/{vertx → core}/buffer.rb +1 -1
  20. data/lib/core/datagram.rb +280 -0
  21. data/lib/core/dns.rb +143 -0
  22. data/lib/{vertx → core}/event_bus.rb +79 -8
  23. data/lib/core/file_system.rb +479 -0
  24. data/lib/{vertx → core}/http.rb +635 -5
  25. data/lib/core/net.rb +251 -0
  26. data/lib/core/network_support.rb +77 -0
  27. data/lib/core/parsetools.rb +105 -0
  28. data/lib/{vertx → core}/shared_data.rb +2 -2
  29. data/lib/core/sock_js.rb +116 -0
  30. data/lib/{vertx → core}/ssl_support.rb +21 -1
  31. data/lib/{vertx → core}/streams.rb +32 -21
  32. data/lib/{vertx → core}/tcp_support.rb +22 -36
  33. data/lib/core/timers.rb +73 -0
  34. data/lib/core/vertx_require.rb +25 -0
  35. data/lib/{vertx → core}/wrapped_handler.rb +0 -0
  36. data/lib/jubilee.rb +5 -8
  37. data/lib/jubilee/cli.rb +1 -1
  38. data/lib/jubilee/jubilee.jar +0 -0
  39. data/lib/jubilee/jubilee_require.rb +24 -0
  40. data/lib/jubilee/version.rb +1 -1
  41. data/lib/test_utils.rb +66 -0
  42. data/lib/vertx.rb +13 -10
  43. data/lib/vertx_tests.rb +8 -0
  44. data/pom.xml +351 -0
  45. data/src/main/assembly/mod.xml +21 -0
  46. data/{java/src → src/main/java}/jubilee/JubileeService.java +0 -0
  47. data/{java/src → src/main/java}/org/jruby/jubilee/Const.java +0 -0
  48. data/{java/src → src/main/java}/org/jruby/jubilee/JubileeVerticle.java +12 -2
  49. data/src/main/java/org/jruby/jubilee/JubileeVerticleFactory.java +258 -0
  50. data/{java/src → src/main/java}/org/jruby/jubilee/RackApplication.java +3 -1
  51. data/{java/src → src/main/java}/org/jruby/jubilee/RackEnvironment.java +2 -2
  52. data/{java/src → src/main/java}/org/jruby/jubilee/RackEnvironmentHash.java +0 -0
  53. data/{java/src → src/main/java}/org/jruby/jubilee/RackInput.java +0 -0
  54. data/{java/src → src/main/java}/org/jruby/jubilee/RackResponse.java +0 -0
  55. data/{java/src → src/main/java}/org/jruby/jubilee/RubyCallable.java +0 -0
  56. data/{java/src → src/main/java}/org/jruby/jubilee/RubyHttpServerResponse.java +0 -0
  57. data/{java/src → src/main/java}/org/jruby/jubilee/RubyNetSocket.java +0 -0
  58. data/{java/src → src/main/java}/org/jruby/jubilee/RubyPlatformManager.java +0 -0
  59. data/{java/src → src/main/java}/org/jruby/jubilee/impl/RubyIORackInput.java +0 -0
  60. data/{java/src → src/main/java}/org/jruby/jubilee/impl/RubyNullIO.java +0 -0
  61. data/{java/src → src/main/java}/org/jruby/jubilee/utils/RubyHelper.java +0 -0
  62. data/{java/src → src/main/java}/org/jruby/jubilee/vertx/JubileeVertx.java +0 -0
  63. data/{java → src/main}/resources/META-INF/services/org.vertx.java.core.spi.cluster.ClusterManagerFactory +0 -0
  64. data/src/main/resources/META-INF/services/org.vertx.java.deploy.impl.jruby.JubileeVerticleFactory +1 -0
  65. data/{java → src/main}/resources/default-cluster.xml +0 -0
  66. data/src/main/resources/mod.json +11 -0
  67. data/test/jubilee/test_upload.rb +3 -1
  68. data/vertx_classpath.txt +12 -0
  69. metadata +69 -47
  70. data/Guardfile +0 -24
  71. data/jars/vertx-core-2.1.1.jar +0 -0
  72. data/java/src/org/jruby/jubilee/RubyChannel.java +0 -89
  73. data/lib/vertx/README.md +0 -7
data/Guardfile DELETED
@@ -1,24 +0,0 @@
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
Binary file
@@ -1,89 +0,0 @@
1
- package org.jruby.jubilee;
2
-
3
- import io.netty.channel.Channel;
4
- import org.jruby.Ruby;
5
- import org.jruby.RubyClass;
6
- import org.jruby.RubyModule;
7
- import org.jruby.RubyObject;
8
- import org.jruby.anno.JRubyClass;
9
- import org.jruby.anno.JRubyMethod;
10
- import org.jruby.runtime.ObjectAllocator;
11
- import org.jruby.runtime.ThreadContext;
12
- import org.jruby.runtime.builtin.IRubyObject;
13
-
14
- /**
15
- * Created by isaiah on 25/12/2013.
16
- */
17
- @JRubyClass(name = "Channel")
18
- public class RubyChannel extends RubyObject {
19
- private Channel chan;
20
-
21
- public static RubyClass createChannelClass(final Ruby runtime) {
22
- RubyModule vertxModule = runtime.getOrCreateModule("Jubilee");
23
- RubyClass klazz = vertxModule.defineClassUnder("Channel", runtime.getObject(), new ObjectAllocator() {
24
- @Override
25
- public IRubyObject allocate(Ruby ruby, RubyClass rubyClass) {
26
- return new RubyChannel(ruby, rubyClass);
27
- }
28
- });
29
- klazz.defineAnnotatedMethods(RubyChannel.class);
30
- return klazz;
31
- }
32
-
33
- public RubyChannel(Ruby ruby, RubyClass rubyClass) {
34
- super(ruby, rubyClass);
35
- }
36
-
37
- @JRubyMethod
38
- public IRubyObject read(ThreadContext context) throws InterruptedException {
39
- return context.runtime.getNil();
40
- }
41
-
42
- @JRubyMethod
43
- public IRubyObject write(ThreadContext context) {
44
- return context.runtime.getNil();
45
-
46
- }
47
-
48
- @JRubyMethod
49
- public IRubyObject readNonBlock(ThreadContext context) {
50
-
51
- return context.runtime.getNil();
52
- }
53
-
54
- @JRubyMethod
55
- public IRubyObject writeNonBlock(ThreadContext context) {
56
-
57
- return context.runtime.getNil();
58
- }
59
-
60
- @JRubyMethod
61
- public IRubyObject flush(ThreadContext context) {
62
-
63
- return context.runtime.getNil();
64
- }
65
-
66
- @JRubyMethod
67
- public IRubyObject close(ThreadContext context) {
68
-
69
- return context.runtime.getNil();
70
- }
71
-
72
- @JRubyMethod
73
- public IRubyObject closeRead(ThreadContext context) {
74
-
75
- return context.runtime.getNil();
76
- }
77
-
78
- @JRubyMethod
79
- public IRubyObject closeWrite(ThreadContext context) {
80
-
81
- return context.runtime.getNil();
82
- }
83
-
84
- @JRubyMethod(name = "closed?")
85
- public IRubyObject isClosed(ThreadContext context) {
86
-
87
- return context.runtime.getNil();
88
- }
89
- }
@@ -1,7 +0,0 @@
1
- Because embeded Vertx doesn't support modules, I have to copy the ruby api
2
- from the [mod-lang-jruby](https://github.com/vert-x/mod-lang-jruby) project.
3
-
4
- Some of the files that are not required for the jubilee api are removed.
5
-
6
- These files are exactly the same as the original project, except the directory
7
- name changed to follow the ruby conversion of namespaces.