ji2p 0.0.4-universal-java-11 → 0.0.5-universal-java-11
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.
- checksums.yaml +4 -4
- data/.gitignore +11 -0
- data/.jrubyrc +54 -0
- data/Gemfile +27 -0
- data/Gemfile.lock +183 -0
- data/Mavenfile +32 -0
- data/README.md +96 -0
- data/Rakefile +49 -0
- data/bin/bundle +1 -1
- data/clean_compiled.sh +2 -0
- data/config/config.ru +7 -0
- data/config/defaults.yml +13 -0
- data/config/jvm.options +37 -0
- data/config/warble.rb +182 -0
- data/install_gems.sh +2 -0
- data/ji2p.gemspec +64 -0
- data/lib/core_ext.rb +3 -3
- data/lib/ji2p/version.rb +1 -1
- metadata +64 -61
- data/lib/actor_system/actor.rb +0 -10
- data/lib/actor_system/concurrent/processor.rb +0 -21
- data/lib/actor_system/concurrent/worker.rb +0 -13
- data/lib/actor_system/core/minimal.rb +0 -84
- data/lib/actor_system/core/observable_implementation.rb +0 -58
- data/lib/actor_system/core/props.rb +0 -45
- data/lib/actor_system/dispatcher.rb +0 -12
- data/lib/actor_system/mailbox.rb +0 -7
- data/lib/actor_system/message.rb +0 -60
- data/lib/ji2p/rspec.rb +0 -16
- data/lib/net/i2p/client/mstreaming/0.9.43/mstreaming-0.9.43.jar +0 -0
- data/lib/net/i2p/client/streaming/0.9.43/streaming-0.9.43.jar +0 -0
- data/lib/net/i2p/i2p/0.9.43/i2p-0.9.43.jar +0 -0
- data/lib/net/i2p/router/0.9.43/router-0.9.43.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7a3e3a45765d0dedef22a15ff8bb0b91d1c633db825ef042e8d68621827ee81
|
4
|
+
data.tar.gz: af125c051e8f10df94c6be1c768f320f4d10f3b724bbc034a00e8eda2960b0f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb8568c1cc1df4da3a66594a0dabe13630425c21bd4080e3d7f055dea374b7d2be56aea9b582dbf49bc93fc8ce1b9b9b417ffe6383de7dd35af01bac1c0db77
|
7
|
+
data.tar.gz: 2ab97cb9cd0b2b084ad85286e36ee157974e5b3d6534fdd739696e768cc7986bfa190c919c7eb3bc172a557e298beb825a26e9b5ae4972677757c8c6ae5d1dda
|
data/.gitignore
ADDED
data/.jrubyrc
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
#log.exceptions=true
|
2
|
+
#log.backtraces=true
|
3
|
+
#log.callers=true
|
4
|
+
#errno.backtrace=true
|
5
|
+
|
6
|
+
# Dump to console all bytecode generated at runtime.
|
7
|
+
# Options: [true, false], Default: false.
|
8
|
+
|
9
|
+
#compile.dump=false
|
10
|
+
|
11
|
+
# Compile with all "mostly harmless" compiler optimizations.
|
12
|
+
# Options: [true, false], Default: false.
|
13
|
+
|
14
|
+
#compile.fastest=false
|
15
|
+
|
16
|
+
# Use invokedynamic for optimizing Ruby code.
|
17
|
+
# Options: [true, false], Default: false.
|
18
|
+
|
19
|
+
#compile.invokedynamic=false
|
20
|
+
|
21
|
+
# Set compilation mode. JIT = at runtime; FORCE = before execution.
|
22
|
+
# Options: [JIT, FORCE, OFF], Default: JIT.
|
23
|
+
|
24
|
+
#compile.mode=JIT
|
25
|
+
|
26
|
+
# Enable or disable ObjectSpace.each_object.
|
27
|
+
# Options: [true, false], Default: false.
|
28
|
+
|
29
|
+
#objectspace.enabled=false
|
30
|
+
|
31
|
+
# Look for .class before .rb to load AOT-compiled code
|
32
|
+
# Options: [true, false], Default: false.
|
33
|
+
|
34
|
+
#aot.loadClasses=false
|
35
|
+
|
36
|
+
# Use java.lang.reflect.Proxy for interface impl.
|
37
|
+
# Options: [true, false], Default: false.
|
38
|
+
|
39
|
+
#interfaces.useProxy=false
|
40
|
+
|
41
|
+
# Load Java support (class extensions) lazily on demand or ahead of time.
|
42
|
+
# Options: [true, false], Default: true.
|
43
|
+
|
44
|
+
#ji.load.lazy=true
|
45
|
+
|
46
|
+
# Try to set inaccessible Java methods to be accessible.
|
47
|
+
# Options: [true, false], Default: true.
|
48
|
+
|
49
|
+
#ji.setAccessible=true
|
50
|
+
|
51
|
+
|
52
|
+
cli.rubygems.enable=true
|
53
|
+
cli.rubyopt.enable=true
|
54
|
+
|
data/Gemfile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
ruby '2.5.7', :engine => 'jruby', :engine_version => '9.2.9'
|
4
|
+
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
|
8
|
+
#gem 'celluloid'
|
9
|
+
gem 'concurrent-ruby', require: 'concurrent'
|
10
|
+
gem 'concurrent-ruby-edge', require: 'concurrent-edge'
|
11
|
+
|
12
|
+
gem 'better_errors'
|
13
|
+
gem 'binding_of_caller'
|
14
|
+
|
15
|
+
gem 'sinatra'
|
16
|
+
gem 'sinatra-contrib'
|
17
|
+
|
18
|
+
#gem 'websocket-driver'
|
19
|
+
#gem 'faye'
|
20
|
+
#gem 'faye-websocket'
|
21
|
+
#gem 'minitest'
|
22
|
+
#gem 'rspec-core'
|
23
|
+
|
24
|
+
#group :development do
|
25
|
+
# gem 'irbtools-more', require: 'irbtools/binding'
|
26
|
+
#end
|
27
|
+
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ji2p (0.0.4-universal-java-11)
|
5
|
+
activerecord (>= 3.0.18)
|
6
|
+
activerecord-jdbc-adapter (~> 0)
|
7
|
+
activerecord-jdbcsqlite3-adapter (~> 0)
|
8
|
+
activesupport (>= 4.1.11)
|
9
|
+
bundler (~> 2.0)
|
10
|
+
dbd-jdbc (~> 0)
|
11
|
+
dbi (~> 0)
|
12
|
+
httparty (>= 0.10.0)
|
13
|
+
jar-dependencies (~> 0)
|
14
|
+
jruby-rack (~> 0)
|
15
|
+
puma (~> 4.3)
|
16
|
+
rack (~> 2.0)
|
17
|
+
rake (~> 0)
|
18
|
+
sinatra (~> 2.0.7)
|
19
|
+
warbler (~> 0)
|
20
|
+
|
21
|
+
GEM
|
22
|
+
remote: https://rubygems.org/
|
23
|
+
specs:
|
24
|
+
activemodel (6.0.1)
|
25
|
+
activesupport (= 6.0.1)
|
26
|
+
activerecord (6.0.1)
|
27
|
+
activemodel (= 6.0.1)
|
28
|
+
activesupport (= 6.0.1)
|
29
|
+
activerecord-jdbc-adapter (0.9.7-java)
|
30
|
+
activerecord-jdbcsqlite3-adapter (0.9.7-java)
|
31
|
+
activerecord-jdbc-adapter (= 0.9.7)
|
32
|
+
jdbc-sqlite3 (>= 3.6.3.054)
|
33
|
+
activesupport (6.0.1)
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
35
|
+
i18n (>= 0.7, < 2)
|
36
|
+
minitest (~> 5.1)
|
37
|
+
tzinfo (~> 1.1)
|
38
|
+
zeitwerk (~> 2.2)
|
39
|
+
awesome_print (0.4.0)
|
40
|
+
backports (3.15.0)
|
41
|
+
better_errors (2.5.1)
|
42
|
+
coderay (>= 1.0.0)
|
43
|
+
erubi (>= 1.0.0)
|
44
|
+
rack (>= 0.9.0)
|
45
|
+
binding.repl (3.0.0)
|
46
|
+
binding_of_caller (0.8.0)
|
47
|
+
debug_inspector (>= 0.0.1)
|
48
|
+
cd (1.0.1)
|
49
|
+
clipboard (1.3.3)
|
50
|
+
code (0.9.2)
|
51
|
+
coderay (~> 1.1)
|
52
|
+
method_source (~> 0.9)
|
53
|
+
coderay (1.1.2)
|
54
|
+
concurrent-ruby (1.1.5)
|
55
|
+
concurrent-ruby-edge (0.5.0)
|
56
|
+
concurrent-ruby (~> 1.1.5)
|
57
|
+
dbd-jdbc (0.1.6-java)
|
58
|
+
dbi (0.4.5)
|
59
|
+
deprecated (= 2.0.1)
|
60
|
+
debug_inspector (0.0.3)
|
61
|
+
debugging (1.1.1)
|
62
|
+
binding.repl (~> 3.0)
|
63
|
+
paint (>= 0.9, < 3.0)
|
64
|
+
deprecated (2.0.1)
|
65
|
+
erubi (1.9.0)
|
66
|
+
every_day_irb (2.1.0)
|
67
|
+
cd (~> 1.0)
|
68
|
+
fancy_irb (1.2.0)
|
69
|
+
paint (>= 0.9, < 3.0)
|
70
|
+
unicode-display_width (~> 1.1)
|
71
|
+
ffi (1.11.2-java)
|
72
|
+
hirb (0.7.3)
|
73
|
+
httparty (0.17.1)
|
74
|
+
mime-types (~> 3.0)
|
75
|
+
multi_xml (>= 0.5.2)
|
76
|
+
i18n (1.7.0)
|
77
|
+
concurrent-ruby (~> 1.0)
|
78
|
+
interactive_editor (0.0.11)
|
79
|
+
spoon (>= 0.0.1)
|
80
|
+
irb (1.0.0)
|
81
|
+
irbtools (3.0.0)
|
82
|
+
binding.repl (~> 3.0)
|
83
|
+
clipboard (~> 1.3)
|
84
|
+
code (>= 0.9.2, < 2.0)
|
85
|
+
coderay (~> 1.1)
|
86
|
+
debugging (~> 1.1)
|
87
|
+
every_day_irb (~> 2.0)
|
88
|
+
fancy_irb (~> 1.1)
|
89
|
+
hirb (~> 0.7, >= 0.7.3)
|
90
|
+
interactive_editor (~> 0.0, >= 0.0.10)
|
91
|
+
irb (>= 0.9.6)
|
92
|
+
methodfinder (~> 2.2)
|
93
|
+
object_shadow (~> 1.1)
|
94
|
+
ori (~> 0.1.0)
|
95
|
+
os
|
96
|
+
paint (>= 0.9, < 3.0)
|
97
|
+
ruby_engine (~> 1.0)
|
98
|
+
ruby_info (~> 1.0)
|
99
|
+
ruby_version (~> 1.0)
|
100
|
+
wirb (~> 2.0)
|
101
|
+
jar-dependencies (0.4.0)
|
102
|
+
jdbc-sqlite3 (3.28.0)
|
103
|
+
jruby-jars (9.2.9.0)
|
104
|
+
jruby-rack (0.9.9)
|
105
|
+
method_source (0.9.2)
|
106
|
+
methodfinder (2.2.1)
|
107
|
+
mime-types (3.3)
|
108
|
+
mime-types-data (~> 3.2015)
|
109
|
+
mime-types-data (3.2019.1009)
|
110
|
+
minitest (5.13.0)
|
111
|
+
multi_json (1.14.1)
|
112
|
+
multi_xml (0.6.0)
|
113
|
+
mustermann (1.0.3)
|
114
|
+
nio4r (2.5.2-java)
|
115
|
+
object_shadow (1.1.0)
|
116
|
+
ori (0.1.0)
|
117
|
+
os (1.0.1)
|
118
|
+
paint (2.1.1)
|
119
|
+
pry (0.12.2-java)
|
120
|
+
coderay (~> 1.1.0)
|
121
|
+
method_source (~> 0.9.0)
|
122
|
+
spoon (~> 0.0)
|
123
|
+
puma (4.3.0-java)
|
124
|
+
nio4r (~> 2.0)
|
125
|
+
rack (2.0.7)
|
126
|
+
rack-protection (2.0.7)
|
127
|
+
rack
|
128
|
+
rake (0.9.6)
|
129
|
+
rspec (0.9.4)
|
130
|
+
ruby-maven (3.3.12)
|
131
|
+
ruby-maven-libs (~> 3.3.9)
|
132
|
+
ruby-maven-libs (3.3.9)
|
133
|
+
ruby_engine (1.0.1)
|
134
|
+
ruby_info (1.0.1)
|
135
|
+
ruby_version (1.0.1)
|
136
|
+
sinatra (2.0.7)
|
137
|
+
mustermann (~> 1.0)
|
138
|
+
rack (~> 2.0)
|
139
|
+
rack-protection (= 2.0.7)
|
140
|
+
tilt (~> 2.0)
|
141
|
+
sinatra-contrib (2.0.7)
|
142
|
+
backports (>= 2.8.2)
|
143
|
+
multi_json
|
144
|
+
mustermann (~> 1.0)
|
145
|
+
rack-protection (= 2.0.7)
|
146
|
+
sinatra (= 2.0.7)
|
147
|
+
tilt (~> 2.0)
|
148
|
+
spoon (0.0.6)
|
149
|
+
ffi
|
150
|
+
thread_safe (0.3.6-java)
|
151
|
+
tilt (2.0.10)
|
152
|
+
tzinfo (1.2.5)
|
153
|
+
thread_safe (~> 0.1)
|
154
|
+
unicode-display_width (1.6.0)
|
155
|
+
warbler (0.9.14)
|
156
|
+
jruby-jars (>= 1.3.1)
|
157
|
+
rake (>= 0.7.3)
|
158
|
+
wirb (2.1.2)
|
159
|
+
paint (>= 0.9, < 3.0)
|
160
|
+
zeitwerk (2.2.1)
|
161
|
+
|
162
|
+
PLATFORMS
|
163
|
+
java
|
164
|
+
|
165
|
+
DEPENDENCIES
|
166
|
+
awesome_print (~> 0)
|
167
|
+
better_errors
|
168
|
+
binding_of_caller
|
169
|
+
concurrent-ruby
|
170
|
+
concurrent-ruby-edge
|
171
|
+
irbtools (~> 3.0)
|
172
|
+
ji2p!
|
173
|
+
pry (~> 0)
|
174
|
+
rspec (~> 0)
|
175
|
+
ruby-maven (~> 3.3)
|
176
|
+
sinatra
|
177
|
+
sinatra-contrib
|
178
|
+
|
179
|
+
RUBY VERSION
|
180
|
+
ruby 2.5.7p0 (jruby 9.2.9.0)
|
181
|
+
|
182
|
+
BUNDLED WITH
|
183
|
+
2.0.2
|
data/Mavenfile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#-*- mode: ruby -*-
|
2
|
+
gemfile
|
3
|
+
|
4
|
+
packaging :jar
|
5
|
+
|
6
|
+
jruby_version = '9.2.9.0'
|
7
|
+
|
8
|
+
pom( 'org.jruby:jruby', jruby_version )
|
9
|
+
jar( 'org.jruby.rack:jruby-rack', '1.1.21', :exclusions => [ 'com.github.jnr:jffi', 'org.jruby:jruby-complete' ] )
|
10
|
+
jar( 'org.jruby:jruby-stdlib', jruby_version )
|
11
|
+
|
12
|
+
jruby_plugin!( :gem,
|
13
|
+
:includeLibDirectoryInResources => true,
|
14
|
+
:includeRubygemsInTestResources => false,
|
15
|
+
:includeRubygemsInResources => true )
|
16
|
+
|
17
|
+
plugin( :dependency, '2.8', :phase => 'prepare-package',
|
18
|
+
:artifactItems => [ { :groupId => 'org.jruby',
|
19
|
+
:artifactId => 'jruby-stdlib',
|
20
|
+
:version => jruby_version,
|
21
|
+
:outputDirectory => '${project.build.outputDirectory}' } ] ) do
|
22
|
+
execute_goal( :unpack )
|
23
|
+
end
|
24
|
+
|
25
|
+
resource :directory => '.', :includes => [ 'bin/**', 'config/**', 'lib/**' ]
|
26
|
+
|
27
|
+
use( :jruby_pack ) do
|
28
|
+
pack_jar
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# vim: syntax=Ruby
|
data/README.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Ji2p - JRuby library
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
**Note:** This is a JRuby only gem, it depends on java.
|
6
|
+
|
7
|
+
Gemfile:
|
8
|
+
```
|
9
|
+
gem 'ji2p', '~> 0.0.2'
|
10
|
+
```
|
11
|
+
|
12
|
+
CLI:
|
13
|
+
```
|
14
|
+
jgem install ji2p
|
15
|
+
```
|
16
|
+
|
17
|
+
## Examples
|
18
|
+
|
19
|
+
### Generate / Load destination and private key
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'ji2p'
|
23
|
+
# Generate new
|
24
|
+
kp = Ji2p::Control::Keypair.generate!
|
25
|
+
# Read private key(s) to serializable string
|
26
|
+
pkey_string = kp.private_key_format
|
27
|
+
# Load destination from private key stream
|
28
|
+
stream = StringIO.new pkey_string
|
29
|
+
kp = Ji2p::Control::Keypair.load_from_stream! stream
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
### Rack HTTP Server
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'ji2p'
|
37
|
+
|
38
|
+
app = Proc.new { |env| ['200', {'Content-Type' => 'text/html'}, ['get rack\'d']] }
|
39
|
+
|
40
|
+
kp = Ji2p::Control::Keypair.generate!
|
41
|
+
ssmgr = Ji2p::Control::SocketManager.defineManager! "testing", kp
|
42
|
+
ssmgr.connectTunnel
|
43
|
+
socket = ssmgr.getServerSocket
|
44
|
+
server = Ji2p::Server::HttpServer.new(app, socket)
|
45
|
+
|
46
|
+
puts "Your destination: #{kp.dest.base32}"
|
47
|
+
|
48
|
+
server.run
|
49
|
+
```
|
50
|
+
|
51
|
+
**Supported servers/technologies:**
|
52
|
+
* WEBrick
|
53
|
+
* FCGI
|
54
|
+
* CGI
|
55
|
+
* SCGI
|
56
|
+
* LiteSpeed
|
57
|
+
* Thin
|
58
|
+
* Agoo
|
59
|
+
* Ebb
|
60
|
+
* Fuzed
|
61
|
+
* Glassfish v3
|
62
|
+
* Phusion Passenger (which is mod_rack for Apache and for nginx)
|
63
|
+
* Puma
|
64
|
+
* vReel
|
65
|
+
* unixrack
|
66
|
+
* uWSGI
|
67
|
+
|
68
|
+
However, any valid Rack app will run the same on all these handlers, without changing anything.
|
69
|
+
|
70
|
+
**Frameworks that support rack:**
|
71
|
+
* Camping
|
72
|
+
* Coset
|
73
|
+
* Espresso
|
74
|
+
* Halcyon
|
75
|
+
* Hanami
|
76
|
+
* Mack
|
77
|
+
* Maveric
|
78
|
+
* Merb
|
79
|
+
* Padrino
|
80
|
+
* Racktools::SimpleApplication
|
81
|
+
* Ramaze
|
82
|
+
* Ruby on Rails
|
83
|
+
* vRum
|
84
|
+
* Sinatra
|
85
|
+
* Sin
|
86
|
+
* Vintage
|
87
|
+
* WABuR
|
88
|
+
* Waves
|
89
|
+
* Wee
|
90
|
+
* ... and many others.
|
91
|
+
|
92
|
+
## TODOs?
|
93
|
+
|
94
|
+
* Consider splitting up database code to a sub-gem
|
95
|
+
* Complete clustering support
|
96
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('Gemfile', __dir__)
|
2
|
+
require 'bundler/setup'
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$:.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
#lib = File.expand_path('rakelib', __dir__)
|
6
|
+
#$:.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
|
+
|
8
|
+
require 'ji2p'
|
9
|
+
|
10
|
+
#Dir['rakelib/*.rake'].each do |r|
|
11
|
+
# require_relative r
|
12
|
+
#end
|
13
|
+
|
14
|
+
namespace :gem do
|
15
|
+
desc "Release gem version #{Ji2p::VERSION} to rubygems"
|
16
|
+
task :release do
|
17
|
+
gem = "ji2p-#{Ji2p::VERSION}.gem"
|
18
|
+
|
19
|
+
puts "Building #{gem} ..."
|
20
|
+
res = `gem build ./ji2p.gemspec`
|
21
|
+
file = res.match('File: (.*)')[1]
|
22
|
+
next unless file
|
23
|
+
|
24
|
+
puts "Pushing #{file} ..."
|
25
|
+
system("gem push #{file}")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :server do
|
30
|
+
namespace :db do
|
31
|
+
desc 'Create a database for private keys'
|
32
|
+
task :create do
|
33
|
+
end
|
34
|
+
desc 'Delete the private key database'
|
35
|
+
task :drop do
|
36
|
+
end
|
37
|
+
end
|
38
|
+
namespace :rack do
|
39
|
+
desc 'Read config.ru and runs a rack server based upon the config'
|
40
|
+
task :start do
|
41
|
+
end
|
42
|
+
end
|
43
|
+
namespace :dbg do
|
44
|
+
desc 'Context aware IRB'
|
45
|
+
task :console do
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|