ji2p-base 0.0.5-universal-java-11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/core_ext.rb +57 -0
- data/lib/gen_server.rb +57 -0
- data/lib/ji2p.rb +26 -0
- data/lib/ji2p/bundler.rb +165 -0
- data/lib/ji2p/environment.rb +35 -0
- data/lib/ji2p/package/gem_installer.rb +91 -0
- data/lib/ji2p/package/gemfile.rb +234 -0
- data/lib/ji2p/package/jar_dependencies.rb +23 -0
- data/lib/ji2p/package/proxy_support.rb +50 -0
- data/lib/ji2p/utils/blocking_queue.rb +32 -0
- data/lib/ji2p/utils/byte_value.rb +61 -0
- data/lib/ji2p/version.rb +3 -0
- data/lib/maybe.rb +148 -0
- metadata +183 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a3309d89cdb124ccae61ce85f5b93e8962b36bbabc465b6a50f40b79d81eeb63
|
4
|
+
data.tar.gz: 04cb540e79eaea6fcfb299d4d8fa104e8342bf2f0b23b4661b3f3c1c17469306
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 36b4987adaf56340996556898eb9236bb1567a0b3ea5dc4db2b4e27fb83eef98f1ac68a3c01af5646b98a94fa80bd5a9428d8e1a1f31b4a00d1597e7e1b88053
|
7
|
+
data.tar.gz: 72e63765ae2436be82e5f59ee2636ecafa3fb4b51dbbf98b0aec01f4768e5452c9c77d4dad6301a7e732fd3534147fd502efe7be05b49360e46a2c71b12ea894
|
data/lib/core_ext.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
|
2
|
+
class Hash
|
3
|
+
def to_properties
|
4
|
+
# Java::JavaUtil::Properties
|
5
|
+
props = java_import('java.util.Properties').first.new
|
6
|
+
self.each do |k,v|
|
7
|
+
props[k.to_s] = v.to_s
|
8
|
+
end
|
9
|
+
props
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.from_properties props,convert_symbols=false
|
13
|
+
return unless props.is_a? java_import('java.util.Properties').first
|
14
|
+
hash = new
|
15
|
+
props.each do |k,v|
|
16
|
+
k = k.to_sym if convert_symbols
|
17
|
+
hash[k] = v
|
18
|
+
end
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Object
|
24
|
+
def try(*a, &b)
|
25
|
+
if a.empty? && block_given?
|
26
|
+
yield self
|
27
|
+
else
|
28
|
+
public_send(*a, &b) if respond_to?(a.first)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class NilClass
|
34
|
+
def try(*args)
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
|
38
|
+
#def method_missing(method, *args)
|
39
|
+
# nil
|
40
|
+
#end
|
41
|
+
end
|
42
|
+
|
43
|
+
class String #:nodoc:
|
44
|
+
|
45
|
+
unless method_defined?(:ascii_only?)
|
46
|
+
# Backport from Ruby 1.9 checks for non-us-ascii characters.
|
47
|
+
def ascii_only?
|
48
|
+
self !~ MATCH_NON_US_ASCII
|
49
|
+
end
|
50
|
+
|
51
|
+
MATCH_NON_US_ASCII = /[^\x00-\x7f]/
|
52
|
+
end
|
53
|
+
|
54
|
+
unless method_defined?(:bytesize)
|
55
|
+
alias :bytesize :length
|
56
|
+
end
|
57
|
+
end
|
data/lib/gen_server.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require "ostruct"
|
2
|
+
require "securerandom"
|
3
|
+
|
4
|
+
module GenServer
|
5
|
+
class << self
|
6
|
+
def call(pid, method, *args)
|
7
|
+
entry = fetch_entry(pid)
|
8
|
+
value, state = entry.module.send(method, entry.state, *args)
|
9
|
+
entry.state = state
|
10
|
+
update_entry(pid, entry)
|
11
|
+
value
|
12
|
+
end
|
13
|
+
|
14
|
+
def cast(pid, method, *args)
|
15
|
+
entry = fetch_entry(pid)
|
16
|
+
entry.state = entry.module.send(method, entry.state, *args)
|
17
|
+
update_entry(pid, entry)
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
def start_link(mod, *args)
|
22
|
+
state = mod.init(*args)
|
23
|
+
add_entry(mod, state)
|
24
|
+
end
|
25
|
+
|
26
|
+
def terminate(pid)
|
27
|
+
remove_entry(pid)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def add_entry(mod, state)
|
33
|
+
SecureRandom.uuid.tap do |uuid|
|
34
|
+
entries[uuid] = OpenStruct.new(
|
35
|
+
:module => mod,
|
36
|
+
:state => state
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def entries
|
42
|
+
@entries ||= {}
|
43
|
+
end
|
44
|
+
|
45
|
+
def fetch_entry(pid)
|
46
|
+
entries[pid]
|
47
|
+
end
|
48
|
+
|
49
|
+
def remove_entry(pid)
|
50
|
+
entries.delete(pid)
|
51
|
+
end
|
52
|
+
|
53
|
+
def update_entry(pid, entry)
|
54
|
+
entries[pid] = entry
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/ji2p.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'logger'
|
2
|
+
require 'java'
|
3
|
+
$CLASSPATH << "file:///#{File.expand_path(File.join(__dir__, '..', 'config'))}/"
|
4
|
+
|
5
|
+
require 'ji2p/environment.rb'
|
6
|
+
|
7
|
+
module Ji2p
|
8
|
+
require_relative 'ji2p/version.rb'
|
9
|
+
|
10
|
+
# https://github.com/jruby/jruby/wiki/RedBridge
|
11
|
+
java_import 'java.lang.System'
|
12
|
+
System.setProperty("org.jruby.embed.localcontext.scope", "singleton") # concurrent, threadsafe, etc.
|
13
|
+
|
14
|
+
def self.logger
|
15
|
+
@logger ||= Logger.new(STDOUT)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.disable_crypto_restriction
|
19
|
+
# java.lang.Class.for_name('javax.crypto.JceSecurity').get_declared_field('isRestricted').tap{|f| f.accessible = true; f.set nil, false}
|
20
|
+
security_class = java.lang.Class.for_name('javax.crypto.JceSecurity')
|
21
|
+
restricted_field = security_class.get_declared_field('isRestricted')
|
22
|
+
restricted_field.accessible = true
|
23
|
+
restricted_field.set nil, false
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/lib/ji2p/bundler.rb
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Ji2p
|
4
|
+
module Bundler
|
5
|
+
extend self
|
6
|
+
|
7
|
+
def setup!(options = {})
|
8
|
+
options = {:without => [:development]}.merge(options)
|
9
|
+
options[:without] = Array(options[:without])
|
10
|
+
|
11
|
+
::Gem.clear_paths
|
12
|
+
ENV['GEM_HOME'] = ENV['GEM_PATH'] = Environment.ji2p_gem_home
|
13
|
+
::Gem.paths = ENV
|
14
|
+
|
15
|
+
# set BUNDLE_GEMFILE ENV before requiring bundler to avoid bundler recurse and load unrelated Gemfile(s)
|
16
|
+
ENV["BUNDLE_GEMFILE"] = Environment::GEMFILE_PATH
|
17
|
+
|
18
|
+
require 'bundler'
|
19
|
+
|
20
|
+
::Bundler.settings.set_local(:path, Environment::BUNDLE_DIR)
|
21
|
+
::Bundler.settings.set_local(:without, options[:without])
|
22
|
+
# in the context of Bundler.setup it looks like this is useless here because Gemfile path can only be specified using
|
23
|
+
# the ENV, see https://github.com/bundler/bundler/blob/v1.8.3/lib/bundler/shared_helpers.rb#L103
|
24
|
+
::Bundler.settings.set_local(:gemfile, Environment::GEMFILE_PATH)
|
25
|
+
|
26
|
+
::Bundler.reset!
|
27
|
+
::Bundler.setup
|
28
|
+
end
|
29
|
+
|
30
|
+
# execute bundle install and capture any $stdout output. any raised exception in the process will be trapped
|
31
|
+
# and returned. logs errors to $stdout.
|
32
|
+
# @param [Hash] options invoke options with default values, :max_tries => 10, :clean => false, :install => false, :update => false
|
33
|
+
# @option options [Boolean] :max_tries The number of times bundler is going to try the installation before failing (default: 10)
|
34
|
+
# @option options [Boolean] :clean It cleans the unused gems (default: false)
|
35
|
+
# @option options [Boolean] :install Run the installation of a set of gems defined in a Gemfile (default: false)
|
36
|
+
# @option options [Boolean, String, Array] :update Update the current environment, must be either false or a String or an Array of String (default: false)
|
37
|
+
# @option options [Boolean] :local Do not attempt to fetch gems remotely and use the gem cache instead (default: false)
|
38
|
+
# @option options [Boolean] :package Locks and then caches all dependencies to be reused later on (default: false)
|
39
|
+
# @option options [Boolean] :all It packages dependencies defined with :git or :path (default: false)
|
40
|
+
# @option options [Array] :without Exclude gems that are part of the specified named group (default: [:development])
|
41
|
+
# @return [String, Exception] the installation captured output and any raised exception or nil if none
|
42
|
+
def invoke!(options = {})
|
43
|
+
options = {:max_tries => 10, :clean => false, :install => false, :update => false, :local => false,
|
44
|
+
:jobs => 12, :all => false, :package => false, :without => [:development]}.merge(options)
|
45
|
+
options[:without] = Array(options[:without])
|
46
|
+
options[:update] = Array(options[:update]) if options[:update]
|
47
|
+
|
48
|
+
::Gem.clear_paths
|
49
|
+
ENV['GEM_HOME'] = ENV['GEM_PATH'] = Ji2p::Environment.ji2p_gem_home
|
50
|
+
::Gem.paths = ENV
|
51
|
+
# set BUNDLE_GEMFILE ENV before requiring bundler to avoid bundler recurse and load unrelated Gemfile(s).
|
52
|
+
# in the context of calling Bundler::CLI this is not really required since Bundler::CLI will look at
|
53
|
+
# Bundler.settings[:gemfile] unlike Bundler.setup. For the sake of consistency and defensive/future proofing, let's keep it here.
|
54
|
+
ENV["BUNDLE_GEMFILE"] = Ji2p::Environment::GEMFILE_PATH
|
55
|
+
|
56
|
+
require 'bundler'
|
57
|
+
require 'bundler/cli'
|
58
|
+
|
59
|
+
# force Rubygems sources to our Gemfile sources
|
60
|
+
::Gem.sources = ::Gem::SourceList.from(options[:rubygems_source]) if options[:rubygems_source]
|
61
|
+
|
62
|
+
::Bundler.settings.set_local(:path, Ji2p::Environment::BUNDLE_DIR)
|
63
|
+
::Bundler.settings.set_local(:gemfile, Ji2p::Environment::GEMFILE_PATH)
|
64
|
+
::Bundler.settings.set_local(:without, options[:without])
|
65
|
+
::Bundler.settings.set_local(:force, options[:force])
|
66
|
+
|
67
|
+
if !debug?
|
68
|
+
# Will deal with transient network errors
|
69
|
+
execute_bundler_with_retry(options)
|
70
|
+
else
|
71
|
+
options[:verbose] = true
|
72
|
+
execute_bundler(options)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def execute_bundler_with_retry(options)
|
77
|
+
try = 0
|
78
|
+
# capture_stdout also traps any raised exception and pass them back as the function return [output, exception]
|
79
|
+
output, exception = capture_stdout do
|
80
|
+
loop do
|
81
|
+
begin
|
82
|
+
execute_bundler(options)
|
83
|
+
break
|
84
|
+
rescue ::Bundler::VersionConflict => e
|
85
|
+
$stderr.puts("Plugin version conflict, aborting")
|
86
|
+
raise(e)
|
87
|
+
rescue ::Bundler::GemNotFound => e
|
88
|
+
$stderr.puts("Plugin not found, aborting")
|
89
|
+
raise(e)
|
90
|
+
rescue => e
|
91
|
+
if try >= options[:max_tries]
|
92
|
+
$stderr.puts("Too many retries, aborting, caused by #{e.class}")
|
93
|
+
$stderr.puts(e.message) if ENV["DEBUG"]
|
94
|
+
raise(e)
|
95
|
+
end
|
96
|
+
|
97
|
+
try += 1
|
98
|
+
$stderr.puts("Error #{e.class}, retrying #{try}/#{options[:max_tries]}")
|
99
|
+
$stderr.puts(e.message)
|
100
|
+
sleep(0.5)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
raise exception if exception
|
105
|
+
|
106
|
+
return output
|
107
|
+
end
|
108
|
+
|
109
|
+
def execute_bundler(options)
|
110
|
+
::Bundler.reset!
|
111
|
+
::Bundler::CLI.start(bundler_arguments(options))
|
112
|
+
end
|
113
|
+
|
114
|
+
def debug?
|
115
|
+
ENV["DEBUG"]
|
116
|
+
end
|
117
|
+
|
118
|
+
# build Bundler::CLI.start arguments array from the given options hash
|
119
|
+
# @param option [Hash] the invoke! options hash
|
120
|
+
# @return [Array<String>] Bundler::CLI.start string arguments array
|
121
|
+
def bundler_arguments(options = {})
|
122
|
+
arguments = []
|
123
|
+
|
124
|
+
if options[:install]
|
125
|
+
arguments << "install"
|
126
|
+
arguments << "--clean" if options[:clean]
|
127
|
+
if options[:local]
|
128
|
+
arguments << "--local"
|
129
|
+
arguments << "--no-prune" # From bundler docs: Don't remove stale gems from the cache.
|
130
|
+
end
|
131
|
+
elsif options[:update]
|
132
|
+
arguments << "update"
|
133
|
+
arguments << options[:update]
|
134
|
+
arguments << "--local" if options[:local]
|
135
|
+
elsif options[:clean]
|
136
|
+
arguments << "clean"
|
137
|
+
elsif options[:package]
|
138
|
+
arguments << "package"
|
139
|
+
arguments << "--all" if options[:all]
|
140
|
+
end
|
141
|
+
|
142
|
+
arguments << "--verbose" if options[:verbose]
|
143
|
+
|
144
|
+
arguments.flatten
|
145
|
+
end
|
146
|
+
|
147
|
+
# capture any $stdout from the passed block. also trap any exception in that block, in which case the trapped exception will be returned
|
148
|
+
# @param [Proc] the code block to execute
|
149
|
+
# @return [String, Exception] the captured $stdout string and any trapped exception or nil if none
|
150
|
+
def capture_stdout(&block)
|
151
|
+
old_stdout = $stdout
|
152
|
+
$stdout = StringIO.new("", "w")
|
153
|
+
begin
|
154
|
+
block.call
|
155
|
+
rescue => e
|
156
|
+
return [$stdout.string, e]
|
157
|
+
end
|
158
|
+
|
159
|
+
[$stdout.string, nil]
|
160
|
+
ensure
|
161
|
+
$stdout = old_stdout
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
module Ji2p
|
4
|
+
module Environment
|
5
|
+
extend self
|
6
|
+
JI2P_HOME = ::File.expand_path(::File.join('..','..'), __dir__) unless defined? JI2P_HOME
|
7
|
+
|
8
|
+
BUNDLE_DIR = ::File.join(JI2P_HOME, "vendor", "bundle") unless defined? BUNDLE_DIR
|
9
|
+
GEMFILE_PATH = ::File.join(JI2P_HOME, "Gemfile") unless defined? GEMFILE_PATH
|
10
|
+
LOCAL_GEM_PATH = ::File.join(JI2P_HOME, 'vendor', 'local_gems') unless defined? LOCAL_GEM_PATH
|
11
|
+
CACHE_PATH = ::File.join(JI2P_HOME, "vendor", "cache") unless defined? CACHE_PATH
|
12
|
+
LOCKFILE = Pathname.new(::File.join(JI2P_HOME, "Gemfile.lock")) unless defined? LOCKFILE
|
13
|
+
GEMFILE = Pathname.new(::File.join(JI2P_HOME, "Gemfile")) unless defined? GEMFILE
|
14
|
+
|
15
|
+
def gem_ruby_version
|
16
|
+
RbConfig::CONFIG["ruby_version"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def ruby_abi_version
|
20
|
+
RUBY_VERSION[/(\d+\.\d+)(\.\d+)*/, 1]
|
21
|
+
end
|
22
|
+
|
23
|
+
def ruby_engine
|
24
|
+
RUBY_ENGINE
|
25
|
+
end
|
26
|
+
|
27
|
+
def ji2p_gem_home
|
28
|
+
::File.join(BUNDLE_DIR, ruby_engine, gem_ruby_version)
|
29
|
+
end
|
30
|
+
|
31
|
+
def vendor_path(path)
|
32
|
+
return ::File.join(JI2P_HOME, "vendor", path)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
|
2
|
+
require "pathname"
|
3
|
+
require "rubygems/package"
|
4
|
+
require "fileutils"
|
5
|
+
|
6
|
+
require_relative 'environment.rb'
|
7
|
+
|
8
|
+
module Ji2p
|
9
|
+
module Package
|
10
|
+
class GemInstaller
|
11
|
+
GEM_HOME = Pathname.new(::File.join(Ji2p::Environment::BUNDLE_DIR, "jruby", "2.5.0"))
|
12
|
+
SPECIFICATIONS_DIR = "specifications"
|
13
|
+
GEMS_DIR = "gems"
|
14
|
+
CACHE_DIR = "cache"
|
15
|
+
|
16
|
+
attr_reader :gem_home
|
17
|
+
|
18
|
+
def initialize(gem_file, display_post_install_message = false, gem_home = GEM_HOME)
|
19
|
+
@gem_file = gem_file
|
20
|
+
@gem = ::Gem::Package.new(@gem_file)
|
21
|
+
@gem_home = Pathname.new(gem_home)
|
22
|
+
@display_post_install_message = display_post_install_message
|
23
|
+
end
|
24
|
+
|
25
|
+
def install
|
26
|
+
create_destination_folders
|
27
|
+
extract_files
|
28
|
+
write_specification
|
29
|
+
copy_gem_file_to_cache
|
30
|
+
post_install_message
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.install(gem_file, display_post_install_message = false, gem_home = GEM_HOME)
|
34
|
+
self.new(gem_file, display_post_install_message, gem_home).install
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
def spec
|
39
|
+
@gem.spec
|
40
|
+
end
|
41
|
+
|
42
|
+
def spec_dir
|
43
|
+
gem_home.join(SPECIFICATIONS_DIR)
|
44
|
+
end
|
45
|
+
|
46
|
+
def cache_dir
|
47
|
+
gem_home.join(CACHE_DIR)
|
48
|
+
end
|
49
|
+
|
50
|
+
def spec_file
|
51
|
+
spec_dir.join("#{spec.full_name}.gemspec")
|
52
|
+
end
|
53
|
+
|
54
|
+
def gem_dir
|
55
|
+
gem_home.join(GEMS_DIR, spec.full_name)
|
56
|
+
end
|
57
|
+
|
58
|
+
def extract_files
|
59
|
+
@gem.extract_files gem_dir
|
60
|
+
end
|
61
|
+
|
62
|
+
def write_specification
|
63
|
+
::File.open(spec_file, 'w') do |file|
|
64
|
+
spec.installed_by_version = ::Gem.rubygems_version
|
65
|
+
file.puts spec.to_ruby_for_cache
|
66
|
+
file.fsync rescue nil # Force writing to disk
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def post_install_message
|
71
|
+
spec.post_install_message if display_post_install_message?
|
72
|
+
end
|
73
|
+
|
74
|
+
def display_post_install_message?
|
75
|
+
@display_post_install_message && !spec.post_install_message.nil?
|
76
|
+
end
|
77
|
+
|
78
|
+
def copy_gem_file_to_cache
|
79
|
+
destination = ::File.join(cache_dir, ::File.basename(@gem_file))
|
80
|
+
FileUtils.cp(@gem_file, destination)
|
81
|
+
end
|
82
|
+
|
83
|
+
def create_destination_folders
|
84
|
+
FileUtils.mkdir_p(gem_home)
|
85
|
+
FileUtils.mkdir_p(gem_dir)
|
86
|
+
FileUtils.mkdir_p(spec_dir)
|
87
|
+
FileUtils.mkdir_p(cache_dir)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,234 @@
|
|
1
|
+
module Ji2p
|
2
|
+
module Package
|
3
|
+
class GemfileError < StandardError; end
|
4
|
+
|
5
|
+
class Gemfile
|
6
|
+
attr_accessor :gemset
|
7
|
+
|
8
|
+
HEADER = \
|
9
|
+
"# This is a Logstash generated Gemfile.\n" + \
|
10
|
+
"# If you modify this file manually all comments and formatting will be lost.\n\n"
|
11
|
+
|
12
|
+
# @params io [IO] any IO object that supports read, write, truncate, rewind
|
13
|
+
def initialize(io)
|
14
|
+
@io = io
|
15
|
+
@gemset = nil
|
16
|
+
end
|
17
|
+
|
18
|
+
def load(with_backup = true)
|
19
|
+
# encoding must be set to UTF-8 here to avoid ending up with Windows-1252 encoding on Windows
|
20
|
+
# which will break the DSL instance_eval of that string
|
21
|
+
@io.set_encoding(Encoding::UTF_8)
|
22
|
+
@gemset ||= DSL.parse(@io.read)
|
23
|
+
backup if with_backup
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def save
|
28
|
+
raise(GemfileError, "a Gemfile must first be loaded") unless @gemset
|
29
|
+
@io.truncate(0)
|
30
|
+
@io.rewind
|
31
|
+
@io.write(generate)
|
32
|
+
@io.flush
|
33
|
+
end
|
34
|
+
|
35
|
+
def generate
|
36
|
+
"#{HEADER}#{gemset.to_s}"
|
37
|
+
end
|
38
|
+
|
39
|
+
def find(name)
|
40
|
+
@gemset.find_gem(name)
|
41
|
+
end
|
42
|
+
|
43
|
+
# @param name [String] gem name
|
44
|
+
# @param *requirements params following name use the same notation as the Gemfile gem DSL statement
|
45
|
+
# @raise GemfileError if gem already exists in Gemfile
|
46
|
+
def add(name, *requirements)
|
47
|
+
@gemset.add_gem(Gem.parse(name, *requirements))
|
48
|
+
end
|
49
|
+
|
50
|
+
# update existing or add new and merge passed options with current gem options if it exists
|
51
|
+
# @param name [String] gem name
|
52
|
+
# @param *requirements params following name use the same notation as the Gemfile gem DSL statement
|
53
|
+
def update(name, *requirements)
|
54
|
+
@gemset.update_gem(Gem.parse(name, *requirements))
|
55
|
+
end
|
56
|
+
|
57
|
+
# overwrite existing or add new
|
58
|
+
# @param name [String] gem name
|
59
|
+
# @param *requirements params following name use the same notation as the Gemfile gem DSL statement
|
60
|
+
def overwrite(name, *requirements)
|
61
|
+
@gemset.overwrite_gem(Gem.parse(name, *requirements))
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Gem] removed gem or nil if not found
|
65
|
+
def remove(name)
|
66
|
+
@gemset.remove_gem(name)
|
67
|
+
end
|
68
|
+
|
69
|
+
def backup
|
70
|
+
@original_backup = @gemset.copy
|
71
|
+
end
|
72
|
+
|
73
|
+
def restore
|
74
|
+
@gemset = @original_backup
|
75
|
+
end
|
76
|
+
|
77
|
+
def defined_in_gemfile?(name)
|
78
|
+
@gemset.find_gem(name)
|
79
|
+
end
|
80
|
+
|
81
|
+
def restore!
|
82
|
+
restore
|
83
|
+
save
|
84
|
+
end
|
85
|
+
|
86
|
+
def locally_installed_gems
|
87
|
+
@gemset.gems.select { |gem| gem.options.include?(:path) }
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
class Gemset
|
92
|
+
attr_accessor :sources, :gems, :gemspec
|
93
|
+
|
94
|
+
def initialize
|
95
|
+
@sources = [] # list of urls
|
96
|
+
@gems = [] # list of Gem class
|
97
|
+
@gems_by_name = {} # hash of name => Gem
|
98
|
+
@gemspec = {} # gemspec is a options hash
|
99
|
+
end
|
100
|
+
|
101
|
+
def to_s
|
102
|
+
[sources_to_s, gemspec_to_s, gems_to_s].select{|s| !s.empty?}.join("\n") + "\n"
|
103
|
+
end
|
104
|
+
|
105
|
+
# @return [Gem] found gem or nil if not found
|
106
|
+
def find_gem(name)
|
107
|
+
@gems_by_name[name.downcase]
|
108
|
+
end
|
109
|
+
|
110
|
+
# @raise GemfileError if gem already exists
|
111
|
+
def add_gem(_gem)
|
112
|
+
raise(GemfileError, "duplicate gem #{_gem.name}") if find_gem(_gem.name)
|
113
|
+
@gems << _gem
|
114
|
+
@gems_by_name[_gem.name.downcase] = _gem
|
115
|
+
end
|
116
|
+
|
117
|
+
# update existing or add new
|
118
|
+
def update_gem(_gem)
|
119
|
+
if old = find_gem(_gem.name)
|
120
|
+
# always overwrite requirements if specified
|
121
|
+
old.requirements = _gem.requirements unless no_constrains?(_gem.requirements)
|
122
|
+
# but merge options
|
123
|
+
old.options = old.options.merge(_gem.options)
|
124
|
+
else
|
125
|
+
@gems << _gem
|
126
|
+
@gems_by_name[_gem.name.downcase] = _gem
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# update existing or add new
|
131
|
+
def overwrite_gem(_gem)
|
132
|
+
if old = find_gem(_gem.name)
|
133
|
+
@gems[@gems.index(old)] = _gem
|
134
|
+
else
|
135
|
+
@gems << _gem
|
136
|
+
end
|
137
|
+
@gems_by_name[_gem.name.downcase] = _gem
|
138
|
+
end
|
139
|
+
|
140
|
+
# @return [Gem] removed gem or nil if not found
|
141
|
+
def remove_gem(name)
|
142
|
+
if _gem = @gems_by_name.delete(name.downcase)
|
143
|
+
@gems.delete_at(@gems.index(_gem))
|
144
|
+
end
|
145
|
+
_gem
|
146
|
+
end
|
147
|
+
|
148
|
+
# deep clone self
|
149
|
+
def copy
|
150
|
+
Marshal.load(Marshal.dump(self))
|
151
|
+
end
|
152
|
+
|
153
|
+
private
|
154
|
+
|
155
|
+
def no_constrains?(requirements)
|
156
|
+
return true if requirements.nil? || requirements.empty?
|
157
|
+
|
158
|
+
# check for the dummy ">= 0" version constrain or any variations thereof
|
159
|
+
# which is in fact a "no constrain" constrain which we should discard
|
160
|
+
return true if requirements.size == 1 && requirements.first.to_s.gsub(/\s+/, "") == ">=0"
|
161
|
+
|
162
|
+
false
|
163
|
+
end
|
164
|
+
|
165
|
+
def sources_to_s
|
166
|
+
return "" if @sources.empty?
|
167
|
+
@sources.map{|source| "source #{source.inspect}"}.join("\n")
|
168
|
+
end
|
169
|
+
|
170
|
+
def gems_to_s
|
171
|
+
return "" if @gems.empty?
|
172
|
+
@gems.map do |gem|
|
173
|
+
requirements = gem.requirements.empty? ? nil : gem.requirements.map{|r| r.inspect}.join(", ")
|
174
|
+
options = gem.options.empty? ? nil : gem.options.map{|k, v| "#{k.inspect} => #{v.inspect}"}.join(", ")
|
175
|
+
"gem " + [gem.name.inspect, requirements, options].compact.join(", ")
|
176
|
+
end.join("\n")
|
177
|
+
end
|
178
|
+
|
179
|
+
def gemspec_to_s
|
180
|
+
return "" if @gemspec.empty?
|
181
|
+
options = @gemspec.map{|k, v| "#{k.inspect} => #{v.inspect}"}.join(", ")
|
182
|
+
"gemspec #{options}"
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# DSL is a minimal, incomplete Gemfile DSL subset parser, only what is currently required is implemented.
|
187
|
+
class DSL
|
188
|
+
attr_reader :gemset
|
189
|
+
|
190
|
+
def initialize
|
191
|
+
@gemset = Gemset.new
|
192
|
+
end
|
193
|
+
|
194
|
+
# @param gemfile_content [String] the Gemfile string content
|
195
|
+
# @return [Gemset] parsed Gemfile content as a Gemset
|
196
|
+
def self.parse(gemfile_content)
|
197
|
+
dsl = self.new
|
198
|
+
dsl.instance_eval(gemfile_content)
|
199
|
+
dsl.gemset
|
200
|
+
end
|
201
|
+
|
202
|
+
# DSL methods
|
203
|
+
|
204
|
+
def source(url)
|
205
|
+
@gemset.sources << url
|
206
|
+
end
|
207
|
+
|
208
|
+
def gem(name, *requirements)
|
209
|
+
parsed = Gem.parse(name, *requirements)
|
210
|
+
@gemset.add_gem(parsed)
|
211
|
+
end
|
212
|
+
|
213
|
+
def gemspec(options = {})
|
214
|
+
raise(GemfileError, "cannot declare multiple gemspec directives") unless @gemset.gemspec.empty?
|
215
|
+
@gemset.gemspec = options
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
class Gem
|
220
|
+
attr_accessor :name, :requirements, :options
|
221
|
+
|
222
|
+
def initialize(name, requirements = [], options = {})
|
223
|
+
@name = name
|
224
|
+
@requirements = requirements.map{|r| r.to_s.strip}.select{|r| !r.empty?}
|
225
|
+
@options = options
|
226
|
+
end
|
227
|
+
|
228
|
+
def self.parse(name, *requirements)
|
229
|
+
options = requirements.last.is_a?(Hash) ? requirements.pop : {}
|
230
|
+
self.new(name, requirements, options)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "jar_dependencies"
|
2
|
+
|
3
|
+
module Ji2p
|
4
|
+
module Package
|
5
|
+
module JarDependencies
|
6
|
+
extend self
|
7
|
+
|
8
|
+
def require_jar( *args )
|
9
|
+
return nil unless Jars.require?
|
10
|
+
result = Jars.require_jar( *args )
|
11
|
+
if result.is_a? String
|
12
|
+
# JAR_DEBUG=1 will now show theses
|
13
|
+
Jars.debug { "--- jar coordinate #{args[0..-2].join( ':' )} already loaded with version #{result} - omit version #{args[-1]}" }
|
14
|
+
Jars.debug { " try to load from #{caller.join("\n\t")}" }
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
Jars.debug { " register #{args.inspect} - #{result == true}" }
|
18
|
+
result
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "uri"
|
3
|
+
require "java"
|
4
|
+
require "erb"
|
5
|
+
|
6
|
+
module Ji2p
|
7
|
+
module Package
|
8
|
+
module ProxySupport
|
9
|
+
extend self
|
10
|
+
|
11
|
+
# Apply HTTP_PROXY and HTTPS_PROXY to the current environment
|
12
|
+
# this will be used by any JRUBY calls
|
13
|
+
def apply_env_proxy_settings(settings)
|
14
|
+
$stderr.puts("Using proxy #{settings}") if ENV["DEBUG"]
|
15
|
+
scheme = settings[:protocol].downcase
|
16
|
+
java.lang.System.setProperty("#{scheme}.proxyHost", settings[:host])
|
17
|
+
java.lang.System.setProperty("#{scheme}.proxyPort", settings[:port].to_s)
|
18
|
+
java.lang.System.setProperty("#{scheme}.proxyUsername", settings[:username].to_s)
|
19
|
+
java.lang.System.setProperty("#{scheme}.proxyPassword", settings[:password].to_s)
|
20
|
+
end
|
21
|
+
|
22
|
+
def extract_proxy_values_from_uri(proxy_uri)
|
23
|
+
{
|
24
|
+
:protocol => proxy_uri.scheme,
|
25
|
+
:host => proxy_uri.host,
|
26
|
+
:port => proxy_uri.port,
|
27
|
+
:username => proxy_uri.user,
|
28
|
+
:password => proxy_uri.password
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def parse_proxy_string(proxy_string)
|
33
|
+
proxy_uri = URI.parse(proxy_string)
|
34
|
+
if proxy_uri.kind_of?(URI::HTTP) # URI::HTTPS is already a subclass of URI::HTTP
|
35
|
+
proxy_uri
|
36
|
+
else
|
37
|
+
raise "Invalid proxy `#{proxy_uri}`. The URI is not HTTP/HTTPS."
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def get_proxy(key)
|
42
|
+
ENV[key.downcase] || ENV[key.upcase]
|
43
|
+
end
|
44
|
+
|
45
|
+
def proxy_string_exists?(proxy)
|
46
|
+
!proxy.nil? && !proxy.strip.empty?
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'thread'
|
2
|
+
|
3
|
+
module Ji2p
|
4
|
+
module Utils
|
5
|
+
class BlockingQueue
|
6
|
+
attr_reader :queue, :mutex, :cv
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@queue = Array.new
|
10
|
+
@mutex = Mutex.new
|
11
|
+
@cv = ConditionVariable.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def push(ele)
|
15
|
+
@mutex.synchronize do
|
16
|
+
@queue.push ele
|
17
|
+
@cv.signal
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def pop
|
22
|
+
@mutex.synchronize do
|
23
|
+
while @queue.empty?
|
24
|
+
@cv.wait(@mutex)
|
25
|
+
end
|
26
|
+
|
27
|
+
@queue.pop
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Ji2p
|
2
|
+
module Utils
|
3
|
+
module ByteValue
|
4
|
+
module_function
|
5
|
+
|
6
|
+
B = 1
|
7
|
+
KB = B << 10
|
8
|
+
MB = B << 20
|
9
|
+
GB = B << 30
|
10
|
+
TB = B << 40
|
11
|
+
PB = B << 50
|
12
|
+
|
13
|
+
def parse(text)
|
14
|
+
if !text.is_a?(String)
|
15
|
+
raise ArgumentError, "ByteValue::parse takes a String, got a `#{text.class.name}`"
|
16
|
+
end
|
17
|
+
number = text.to_f
|
18
|
+
factor = multiplier(text)
|
19
|
+
|
20
|
+
(number * factor).to_i
|
21
|
+
end
|
22
|
+
|
23
|
+
def multiplier(text)
|
24
|
+
case text
|
25
|
+
when /(?:k|kb)$/
|
26
|
+
KB
|
27
|
+
when /(?:m|mb)$/
|
28
|
+
MB
|
29
|
+
when /(?:g|gb)$/
|
30
|
+
GB
|
31
|
+
when /(?:t|tb)$/
|
32
|
+
TB
|
33
|
+
when /(?:p|pb)$/
|
34
|
+
PB
|
35
|
+
when /(?:b)$/
|
36
|
+
B
|
37
|
+
else
|
38
|
+
raise ArgumentError, "Unknown bytes value '#{text}'"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def human_readable(number)
|
43
|
+
value, unit = if number > PB
|
44
|
+
[number / PB, "pb"]
|
45
|
+
elsif number > TB
|
46
|
+
[number / TB, "tb"]
|
47
|
+
elsif number > GB
|
48
|
+
[number / GB, "gb"]
|
49
|
+
elsif number > MB
|
50
|
+
[number / MB, "mb"]
|
51
|
+
elsif number > KB
|
52
|
+
[number / KB, "kb"]
|
53
|
+
else
|
54
|
+
[number, "b"]
|
55
|
+
end
|
56
|
+
|
57
|
+
format("%.2d%s", value, unit)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/lib/ji2p/version.rb
ADDED
data/lib/maybe.rb
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
class Object
|
2
|
+
def try(*a, &b)
|
3
|
+
if a.empty? && block_given?
|
4
|
+
yield self
|
5
|
+
else
|
6
|
+
public_send(*a, &b) if respond_to?(a.first)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class NilClass
|
12
|
+
def try(*args)
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
|
16
|
+
#def method_missing(method, *args)
|
17
|
+
# nil
|
18
|
+
#end
|
19
|
+
end
|
20
|
+
|
21
|
+
Optional = Struct.new(:value) do
|
22
|
+
def and_then(&block)
|
23
|
+
if value.nil?
|
24
|
+
Optional.new(nil)
|
25
|
+
else
|
26
|
+
block.call(value)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def method_missing(*args, &block)
|
31
|
+
and_then do |value|
|
32
|
+
Optional.new(value.public_send(*args, &block))
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Many = Struct.new(:values) do
|
38
|
+
def and_then(&block)
|
39
|
+
Many.new(
|
40
|
+
values.map(&block).flat_map(&:values)
|
41
|
+
)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
Eventually = Struct.new(:block) do
|
46
|
+
def and_then(&block)
|
47
|
+
Eventually.new do |success|
|
48
|
+
run do |value|
|
49
|
+
block.call(value).run(&success)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
module Monad
|
56
|
+
def within(&block)
|
57
|
+
and_then do |value|
|
58
|
+
self.class.from_value(block.call(value))
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
Optional.include(Monad)
|
64
|
+
Many.include(Monad)
|
65
|
+
Eventually.include(Monad)
|
66
|
+
|
67
|
+
|
68
|
+
class Maybe
|
69
|
+
class Some
|
70
|
+
end
|
71
|
+
class None
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
module Functional
|
76
|
+
extend self
|
77
|
+
class Option
|
78
|
+
(Enumerable.instance_methods << :each).each do |enumerable_method|
|
79
|
+
define_method(enumerable_method) do |*args, &block|
|
80
|
+
res = enumerable_value.send(enumerable_method, *args, &block)
|
81
|
+
res.respond_to?(:each) ? Option(res.first) : res
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
alias_method :enumerable_value, :to_a
|
86
|
+
end
|
87
|
+
|
88
|
+
def Option(value)
|
89
|
+
if value.nil? || (value.respond_to?(:length) && value.length == 0)
|
90
|
+
None()
|
91
|
+
else
|
92
|
+
Some(value)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
class None < Option
|
97
|
+
def get
|
98
|
+
fail 'No such element'
|
99
|
+
end
|
100
|
+
|
101
|
+
def or_else(default = nil)
|
102
|
+
block_given? ? yield : default
|
103
|
+
end
|
104
|
+
|
105
|
+
def method_missing(*)
|
106
|
+
self
|
107
|
+
end
|
108
|
+
|
109
|
+
private
|
110
|
+
def enumerable_value
|
111
|
+
[]
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def None
|
116
|
+
None.new
|
117
|
+
end
|
118
|
+
|
119
|
+
class Some < Option
|
120
|
+
def initialize(value)
|
121
|
+
@value = value
|
122
|
+
end
|
123
|
+
|
124
|
+
def get
|
125
|
+
value
|
126
|
+
end
|
127
|
+
|
128
|
+
def or_else(*)
|
129
|
+
value
|
130
|
+
end
|
131
|
+
|
132
|
+
def method_missing(method_sym, *args, &block)
|
133
|
+
map { |value| value.send(method_sym, *args, &block) }
|
134
|
+
end
|
135
|
+
|
136
|
+
private
|
137
|
+
attr_reader :value
|
138
|
+
|
139
|
+
def enumerable_value
|
140
|
+
[value]
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
def Some(value)
|
145
|
+
Some.new(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
metadata
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ji2p-base
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
platform: universal-java-11
|
6
|
+
authors:
|
7
|
+
- Mikal Villa
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '2.0'
|
19
|
+
name: bundler
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.10.0
|
33
|
+
name: httparty
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
name: jar-dependencies
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '13.0'
|
61
|
+
name: rake
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.0'
|
75
|
+
name: warbler
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
name: awesome_print
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
name: rspec
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
name: pry
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '3.3'
|
131
|
+
name: ruby-maven
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.3'
|
139
|
+
description: JRuby interface for I2P
|
140
|
+
email: mikalv@mikalv.net
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- lib/core_ext.rb
|
146
|
+
- lib/gen_server.rb
|
147
|
+
- lib/ji2p.rb
|
148
|
+
- lib/ji2p/bundler.rb
|
149
|
+
- lib/ji2p/environment.rb
|
150
|
+
- lib/ji2p/package/gem_installer.rb
|
151
|
+
- lib/ji2p/package/gemfile.rb
|
152
|
+
- lib/ji2p/package/jar_dependencies.rb
|
153
|
+
- lib/ji2p/package/proxy_support.rb
|
154
|
+
- lib/ji2p/utils/blocking_queue.rb
|
155
|
+
- lib/ji2p/utils/byte_value.rb
|
156
|
+
- lib/ji2p/version.rb
|
157
|
+
- lib/maybe.rb
|
158
|
+
homepage: https://github.com/mikalv/ji2p
|
159
|
+
licenses:
|
160
|
+
- Apache-2.0
|
161
|
+
metadata:
|
162
|
+
allowed_push_host: https://rubygems.org
|
163
|
+
post_install_message: Thanks for installing!
|
164
|
+
rdoc_options: []
|
165
|
+
require_paths:
|
166
|
+
- lib
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
requirements:
|
178
|
+
- jar net.i2p, i2p, 0.9.43
|
179
|
+
rubygems_version: 3.0.6
|
180
|
+
signing_key:
|
181
|
+
specification_version: 4
|
182
|
+
summary: JRuby interface for I2P
|
183
|
+
test_files: []
|