lookout-jruby 1.3.1 → 2.0.0
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 +8 -8
- data/README.md +1 -7
- data/lib/lookout/jruby.rb +0 -14
- data/lib/lookout/jruby/version.rb +1 -1
- metadata +2 -4
- data/lib/lookout/jruby/jruby-6970-openssl.rb +0 -21
- data/lib/lookout/jruby/jruby-6970.rb +0 -78
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
Y2RiNGJlNmEwMmE1NzUyZTRhNmEyZjgwOWU0MGE3MWVmNGZiNWNlYg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NmQ2M2VjZWQzMmEyYjg1MTJmNzU0ZTRmMTUxMmViN2YwZTRiMDZhYg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Y2UzYmUxN2EzYzExMmRkOWU0M2M1MTIwMGJhNWNmMzUzNzI4ZWIzNzM2Nzcy
|
|
10
|
+
N2UxZmI5NjhiNmNhNjdlNjgyYTEwYTE5NjhkZGY0NmQ0MWQxOGMzMmY2NWQw
|
|
11
|
+
Y2IwMTI5MTFmNDJkN2QyMjIzNDU1MTQ5M2QwYTg1ZjcwYjA3ZDE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NTk4ZjhmYWQ1YmU4NTA0MGYzYTg2MTdiMDVjNzUyZTZiMjk5MzQ3ZjAyNTEx
|
|
14
|
+
MDhiOThjNWFmODBmZWEzZjEzOTQwMjNlYzlmNjViMzkzNmRhZDgxNDg0NGM5
|
|
15
|
+
OWQ4MjIyMTIzYzZlOTI0MzNiYmY5N2Y2MjdiZWU4NTA0YTFmN2Q=
|
data/README.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# Lookout::Jruby
|
|
2
2
|
|
|
3
|
-
JRuby hacks/compatibility code for
|
|
4
|
-
(https://jira.codehaus.org/browse/JRUBY-6970, fix taken from the Logstash
|
|
5
|
-
project) and for YAML/Configatron
|
|
6
|
-
|
|
7
|
-
Note: with JRuby 1.7+, openssl is baked in, and so this gem does not depend on
|
|
8
|
-
jruby-openssl. However, if you're using an older JRuby, you will need to have
|
|
9
|
-
jruby-openssl in your gemfile.
|
|
3
|
+
JRuby hacks/compatibility code for YAML/Configatron
|
|
10
4
|
|
|
11
5
|
## Installation
|
|
12
6
|
|
data/lib/lookout/jruby.rb
CHANGED
|
@@ -3,20 +3,6 @@ require "lookout/jruby/version"
|
|
|
3
3
|
module Lookout
|
|
4
4
|
module Jruby
|
|
5
5
|
if RUBY_PLATFORM == 'java'
|
|
6
|
-
require 'java'
|
|
7
|
-
|
|
8
|
-
# If we can require jruby-openssl - because it's available in the bundle -
|
|
9
|
-
# do so. If not, JRuby should have openssl baked in, as of 1.7.
|
|
10
|
-
begin
|
|
11
|
-
require 'jruby-openssl'
|
|
12
|
-
rescue LoadError => e
|
|
13
|
-
require 'openssl'
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# JRuby cert/path hack
|
|
17
|
-
require 'lookout/jruby/jruby-6970'
|
|
18
|
-
require 'lookout/jruby/jruby-6970-openssl'
|
|
19
|
-
|
|
20
6
|
# JRuby YAML hack
|
|
21
7
|
require 'lookout/jruby/psych'
|
|
22
8
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lookout-jruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ian Smith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -51,8 +51,6 @@ files:
|
|
|
51
51
|
- README.md
|
|
52
52
|
- Rakefile
|
|
53
53
|
- lib/lookout/jruby.rb
|
|
54
|
-
- lib/lookout/jruby/jruby-6970-openssl.rb
|
|
55
|
-
- lib/lookout/jruby/jruby-6970.rb
|
|
56
54
|
- lib/lookout/jruby/psych.rb
|
|
57
55
|
- lib/lookout/jruby/version.rb
|
|
58
56
|
- lookout-jruby.gemspec
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Workaround for JRUBY-6970 (https://jira.codehaus.org/browse/JRUBY-6970)
|
|
2
|
-
# taken from the Logstash project, see:
|
|
3
|
-
# <https://github.com/logstash/logstash/blob/master/lib/logstash/JRUBY-6970-openssl.rb>
|
|
4
|
-
class OpenSSL::SSL::SSLContext
|
|
5
|
-
alias_method :ca_path_JRUBY_6970=, :ca_path=
|
|
6
|
-
alias_method :ca_file_JRUBY_6970=, :ca_file=
|
|
7
|
-
|
|
8
|
-
def ca_file=(arg)
|
|
9
|
-
if arg =~ /^jar:file:\//
|
|
10
|
-
return ca_file_JRUBY_6970=(arg.gsub(/^jar:/, ""))
|
|
11
|
-
end
|
|
12
|
-
return ca_file_JRUBY_6970=(arg)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def ca_path=(arg)
|
|
16
|
-
if arg =~ /^jar:file:\//
|
|
17
|
-
return ca_path_JRUBY_6970=(arg.gsub(/^jar:/, ""))
|
|
18
|
-
end
|
|
19
|
-
return ca_path_JRUBY_6970=(arg)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Workaround for JRUBY-6970 (https://jira.codehaus.org/browse/JRUBY-6970)
|
|
2
|
-
# taken from the Logstash project, see:
|
|
3
|
-
# <https://github.com/logstash/logstash/blob/master/lib/logstash/JRUBY-6970.rb>
|
|
4
|
-
#
|
|
5
|
-
# Monkeypatch for JRUBY-6970
|
|
6
|
-
module Kernel
|
|
7
|
-
alias_method :require_JRUBY_6970_hack, :require
|
|
8
|
-
|
|
9
|
-
def require(path)
|
|
10
|
-
# Needed because otherwise we might require faraday/request twice and then
|
|
11
|
-
# we have a superclass mismatch
|
|
12
|
-
# https://groups.google.com/forum/#!msg/jruby-users/-lG4Fc2-3UA/bM0cIR_wRr8J
|
|
13
|
-
if path.include?('faraday/request') && defined?(Faraday::Request)
|
|
14
|
-
return false
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
if path =~ /^jar:file:.+!.+/
|
|
18
|
-
path = path.gsub(/^jar:/, "")
|
|
19
|
-
puts "JRUBY-6970: require(#{path})" if ENV["REQUIRE_DEBUG"] == "1"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# JRUBY-7065
|
|
23
|
-
path = File.expand_path(path) if path.include?("/../")
|
|
24
|
-
rc = require_JRUBY_6970_hack(path)
|
|
25
|
-
|
|
26
|
-
# Only monkeypatch openssl after it's been loaded.
|
|
27
|
-
if path == "openssl"
|
|
28
|
-
require "lookout/jruby/jruby-6970-openssl"
|
|
29
|
-
end
|
|
30
|
-
return rc
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Work around for a bug in File.expand_path that doesn't account for resources
|
|
35
|
-
# in jar paths.
|
|
36
|
-
#
|
|
37
|
-
# Should solve this error:
|
|
38
|
-
# Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException:
|
|
39
|
-
# (Errno::ENOENT) file:/home/jls/projects/logstash/build/data/unicode.data
|
|
40
|
-
class File
|
|
41
|
-
class << self
|
|
42
|
-
alias_method :expand_path_JRUBY_6970, :expand_path
|
|
43
|
-
|
|
44
|
-
def expand_path(path, dir=nil)
|
|
45
|
-
#p :expand_path => [path, dir]
|
|
46
|
-
if path =~ /(jar:)?file:\/.*\.jar!/
|
|
47
|
-
#p :expand_path_path => [path, dir]
|
|
48
|
-
jar, resource = path.split("!", 2)
|
|
49
|
-
#p :expand_path => [jar, resource]
|
|
50
|
-
if resource.nil? || resource == ""
|
|
51
|
-
# Nothing after the "!", nothing special to handle.
|
|
52
|
-
return expand_path_JRUBY_6970(path, dir)
|
|
53
|
-
else
|
|
54
|
-
resource = expand_path_JRUBY_6970(resource, dir)
|
|
55
|
-
# TODO(sissel): use LogStash::Util::UNAME
|
|
56
|
-
if RbConfig::CONFIG["host_os"] == "mswin32"
|
|
57
|
-
# 'expand_path' on "/" will return "C:/" on windows.
|
|
58
|
-
# So like.. we don't want that because technically this
|
|
59
|
-
# is the root of the jar, not of a disk.
|
|
60
|
-
puts :expand_path => [path, "#{jar}!#{resource.gsub(/^[A-Za-z]:/, "")}"]
|
|
61
|
-
return "#{jar}!#{resource.gsub(/^[A-Za-z]:/, "")}"
|
|
62
|
-
else
|
|
63
|
-
return "#{jar}!#{resource}"
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
elsif dir.to_s =~ /(jar:)?file:\/.*\.jar!/
|
|
67
|
-
jar, dir = dir.to_s.split("!", 2)
|
|
68
|
-
if dir.empty?
|
|
69
|
-
# sometimes the original dir is just 'file:/foo.jar!'
|
|
70
|
-
return File.join("#{jar}!", path)
|
|
71
|
-
end
|
|
72
|
-
return "#{jar}!#{expand_path_JRUBY_6970(path, dir)}"
|
|
73
|
-
else
|
|
74
|
-
return expand_path_JRUBY_6970(path, dir)
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
end
|