lookout-jruby 2.1.0 → 2.2.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 +4 -4
- data/.travis.yml +4 -0
- data/README.md +1 -1
- data/Rakefile +4 -2
- data/lib/lookout/jruby/psych.rb +20 -0
- data/lib/lookout/jruby/version.rb +1 -1
- data/lookout-jruby.gemspec +4 -3
- data/spec/some.yml +1 -0
- data/spec/yaml_spec.rb +33 -0
- metadata +31 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2787a5e23b8927d67987b9b33751b54c5a3bf43
|
4
|
+
data.tar.gz: c8185a3ef4a80f90abf25f7bc42fa76e13d89900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2affda2e94e729f07340a9b60e87b509bcacc1718a0ba40c6a966cec6aced5fc0503a4e380d955e1a43672d2b4c8308dc0981fe73901d3072713e9aed9fef264
|
7
|
+
data.tar.gz: 7e6fe8e4a25bed4f7959692b6b1aa1c7918f6b9030c6a9ddb3186ef9a506de857dbcb0855f3c53872aed39008118ac3c5a763545cfedd14d75c678b2b6c82df5
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/lookout/jruby/psych.rb
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
# this is workaround for https://github.com/jruby/jruby/issues/3306
|
2
|
+
|
3
|
+
# jruby-9k just works
|
4
|
+
if JRUBY_VERSION.start_with?("1.")
|
5
|
+
require 'yaml'
|
6
|
+
module YAML
|
7
|
+
class << self
|
8
|
+
alias :_load_file :load_file
|
9
|
+
|
10
|
+
def load_file( filename )
|
11
|
+
if filename.start_with?("uri:classloader:/")
|
12
|
+
self.load(File.read(filename))
|
13
|
+
else
|
14
|
+
_load_file(filename)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
1
21
|
# This hack is required because YAML is all kinds of messed up and incompatible
|
2
22
|
# with our version of Configatron under JRuby
|
3
23
|
module Psych
|
data/lookout-jruby.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Ian Smith"]
|
10
10
|
spec.email = ["ian.smith@lookout.com"]
|
11
11
|
spec.summary = %q{JRuby hacks}
|
12
|
-
spec.description = %q{}
|
13
|
-
spec.homepage = ""
|
12
|
+
spec.description = %q{JRuby hacks for some yaml issues}
|
13
|
+
spec.homepage = "https://github.com/lookout/lookout-jruby"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -19,5 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
-
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "rake", '~> 10.2'
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3.3'
|
23
24
|
end
|
data/spec/some.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
hello: world
|
data/spec/yaml_spec.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
unless defined? JRUBY_VERSION
|
2
|
+
exit
|
3
|
+
end
|
4
|
+
|
5
|
+
$: << File.expand_path( '../../lib', __FILE__ )
|
6
|
+
|
7
|
+
$CLASSPATH << File.dirname(__FILE__)
|
8
|
+
|
9
|
+
require 'lookout/jruby'
|
10
|
+
require 'yaml'
|
11
|
+
|
12
|
+
describe YAML do
|
13
|
+
|
14
|
+
let( :expected ) { { 'hello' => 'world' } }
|
15
|
+
|
16
|
+
it 'is not patched for jruby-9k' do
|
17
|
+
if JRUBY_VERSION.start_with?('9.')
|
18
|
+
expect( YAML.respond_to?(:_load_file) ).to be false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'loads file from filesystem' do
|
23
|
+
data = YAML.load_file(File.expand_path('../some.yml', __FILE__))
|
24
|
+
expect( data ).to eq expected
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'loads file from classloader' do
|
28
|
+
data = YAML.load_file('uri:classloader:/some.yml')
|
29
|
+
expect( data ).to eq expected
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
metadata
CHANGED
@@ -1,44 +1,58 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lookout-jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.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: 2015-
|
11
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ~>
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '1.5'
|
14
19
|
name: bundler
|
20
|
+
prerelease: false
|
21
|
+
type: :development
|
15
22
|
version_requirements: !ruby/object:Gem::Requirement
|
16
23
|
requirements:
|
17
24
|
- - ~>
|
18
25
|
- !ruby/object:Gem::Version
|
19
26
|
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
20
28
|
requirement: !ruby/object:Gem::Requirement
|
21
29
|
requirements:
|
22
30
|
- - ~>
|
23
31
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
32
|
+
version: '10.2'
|
33
|
+
name: rake
|
25
34
|
prerelease: false
|
26
35
|
type: :development
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
36
|
version_requirements: !ruby/object:Gem::Requirement
|
30
37
|
requirements:
|
31
|
-
- -
|
38
|
+
- - ~>
|
32
39
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
40
|
+
version: '10.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
34
42
|
requirement: !ruby/object:Gem::Requirement
|
35
43
|
requirements:
|
36
|
-
- -
|
44
|
+
- - ~>
|
37
45
|
- !ruby/object:Gem::Version
|
38
|
-
version: '
|
46
|
+
version: '3.3'
|
47
|
+
name: rspec
|
39
48
|
prerelease: false
|
40
49
|
type: :development
|
41
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.3'
|
55
|
+
description: JRuby hacks for some yaml issues
|
42
56
|
email:
|
43
57
|
- ian.smith@lookout.com
|
44
58
|
executables: []
|
@@ -46,6 +60,7 @@ extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- .gitignore
|
63
|
+
- .travis.yml
|
49
64
|
- Gemfile
|
50
65
|
- LICENSE.txt
|
51
66
|
- README.md
|
@@ -54,7 +69,9 @@ files:
|
|
54
69
|
- lib/lookout/jruby/psych.rb
|
55
70
|
- lib/lookout/jruby/version.rb
|
56
71
|
- lookout-jruby.gemspec
|
57
|
-
|
72
|
+
- spec/some.yml
|
73
|
+
- spec/yaml_spec.rb
|
74
|
+
homepage: https://github.com/lookout/lookout-jruby
|
58
75
|
licenses:
|
59
76
|
- MIT
|
60
77
|
metadata: {}
|
@@ -78,4 +95,6 @@ rubygems_version: 2.4.5
|
|
78
95
|
signing_key:
|
79
96
|
specification_version: 4
|
80
97
|
summary: JRuby hacks
|
81
|
-
test_files:
|
98
|
+
test_files:
|
99
|
+
- spec/some.yml
|
100
|
+
- spec/yaml_spec.rb
|