saxon-xslt 0.8.0-java → 0.8.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fa63f9f16b00b103c6b551c16bcd13cf05b9c3e
4
- data.tar.gz: 70f62470e1709fa2662f3718b3a305f8e8c6fda1
3
+ metadata.gz: 78d51bc1d1ad929a2a3a9fdfd306d393a071b79f
4
+ data.tar.gz: f617460d59c5c03e8dea14b09a0b7feee40fb04b
5
5
  SHA512:
6
- metadata.gz: 8c23a83bd4048fd45a9772e829d985d60fec74b5e243396c41ccb275591b3ea3c184141dac42fbff9f6e775085177f8f28cf6d2452c3611c7b2bb47e22fd9035
7
- data.tar.gz: 4b0e700ce889086ebb00a234f1bba72117893ea8a86a97e051afbb4db84a5c75bf991aa9b463410d50ca04535b63309d7ed405dea627fc34320dcca721a08b2d
6
+ metadata.gz: 9c7936845c41ddf3bd624fcb807e552a4b5c593cb29d98fcdde11088661d976be956e2aef5d2dbc14a662ff032333f02e331daaeeef7c36cb13f791f1e592806
7
+ data.tar.gz: de3633e9baf0ce519f6c1888a6eb7e136d971066c1e7e8fa08481452d7ac3ad0eea469184babf28512a7730ac7bc5f12941ee3133604a49100d67e731c945a75
@@ -1 +1 @@
1
- jruby-1.7.13
1
+ jruby-9.1.15.0
@@ -2,7 +2,7 @@ dist: trusty
2
2
  sudo: false
3
3
  language: ruby
4
4
  rvm:
5
- - jruby-9.1.14.0
5
+ - jruby-9.1.15.0
6
6
  - jruby-1.7.27
7
7
  jdk:
8
8
  - oraclejdk8
@@ -15,5 +15,5 @@ before_script:
15
15
  - if [ "$TRAVIS_JDK_VERSION" = "$JDK_VERSION_FOR_CODECLIMATE" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; chmod +x ./cc-test-reporter; fi
16
16
  script:
17
17
  - bundle exec rspec
18
- - if [ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_JDK_VERSION" = "$JDK_VERSION_FOR_CODECLIMATE" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
18
+ - if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_JDK_VERSION" = "$JDK_VERSION_FOR_CODECLIMATE" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
19
19
 
@@ -39,19 +39,30 @@ module Saxon
39
39
  ([icu] + optional).compact
40
40
  end
41
41
 
42
+ def self.jars_not_on_classpath?
43
+ begin
44
+ Java::net.sf.saxon.s9api.Processor
45
+ false
46
+ rescue
47
+ true
48
+ end
49
+ end
50
+
42
51
  def self.load!(saxon_home = File.expand_path('../../../vendor/saxonica', __FILE__))
43
52
  return false if @saxon_loaded
44
53
  LOAD_SEMAPHORE.synchronize do
45
54
  if Saxon::S9API.const_defined?(:Processor)
46
55
  false
47
56
  else
48
- saxon_home = Pathname.new(saxon_home)
49
- raise NoJarsError, saxon_home unless saxon_home.directory?
50
- jars = [main_jar(saxon_home)].compact
51
- raise MissingJarError if jars.empty?
52
- jars += extra_jars(saxon_home)
57
+ if jars_not_on_classpath?
58
+ saxon_home = Pathname.new(saxon_home)
59
+ raise NoJarsError, saxon_home unless saxon_home.directory?
60
+ jars = [main_jar(saxon_home)].compact
61
+ raise MissingJarError if jars.empty?
62
+ jars += extra_jars(saxon_home)
53
63
 
54
- add_jars_to_classpath!(saxon_home, jars)
64
+ add_jars_to_classpath!(saxon_home, jars)
65
+ end
55
66
  import_classes_to_namespace!
56
67
 
57
68
  @saxon_loaded = true
@@ -22,7 +22,7 @@ module Saxon
22
22
  # Given a File, or IO object which will return either #path or
23
23
  # #base_uri, return the #base_uri, if present, or the #path, if present, or
24
24
  # nil
25
- # @param [File, IO, String] path_io_or_string A Path, File, or IO
25
+ # @param [File, IO, String, java.org.] path_io_or_string A Path, File, or IO
26
26
  # object representing the input XML file or data, or a String containing
27
27
  # the XML
28
28
  def self.to_system_id(path_io_or_string)
@@ -33,10 +33,11 @@ module Saxon
33
33
  end
34
34
 
35
35
  # Given a File, IO, or String return a Java InputStream or StringReader
36
- # @param [File, IO, String] path_io_or_string input to be converted to an
37
- # input stream
36
+ # @param [File, IO, Stringi, org.jruby.util.IOInputStream]
37
+ # path_io_or_string input to be converted to an input stream
38
38
  # @return [java.io.InputStream, java.io.StringReader] the wrapped input
39
39
  def self.to_inputstream(path_io_or_string)
40
+ return path_io_or_string if org.jruby.util.IOInputStream === path_io_or_string
40
41
  return path_io_or_string.to_inputstream if path_io_or_string.respond_to?(:read)
41
42
  return java.io.StringReader.new(path_io_or_string)
42
43
  end
@@ -1,5 +1,5 @@
1
1
  module Saxon
2
2
  module XSLT
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
5
5
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Saxon::XSLT::VERSION
9
9
  gem.authors = ["Matt Patterson"]
10
10
  gem.email = ["matt@reprocessed.org"]
11
- gem.description = %q{Wraps the Saxon 9.5 HE XSLT 2.0 processor so that you can transform XSLT 2 stylesheets in JRuby. Sticks closely to the Nokogiri API}
12
- gem.summary = %q{Saxon 9.5 HE XSLT 2.0 for JRuby with Nokogiri's API}
11
+ gem.description = %q{Wraps the Saxon 9.8 HE XSLT 2.0 processor so that you can transform XSLT 2 stylesheets in JRuby. Sticks closely to the Nokogiri API}
12
+ gem.summary = %q{Saxon 9.8 HE XSLT 2.0 for JRuby with Nokogiri's API}
13
13
  gem.homepage = "https://github.com/fidothe/saxon-xslt"
14
14
  gem.licenses = ["MIT", "MPL-1.0"]
15
15
  gem.platform = 'java'
@@ -24,6 +24,6 @@ Gem::Specification.new do |gem|
24
24
  gem.add_development_dependency('vcr', '~> 2.9.2')
25
25
  gem.add_development_dependency('addressable', '~> 2.4.0')
26
26
  gem.add_development_dependency('webmock', '~> 1.18.0')
27
- gem.add_development_dependency('yard', '~> 0.8.7')
27
+ gem.add_development_dependency('yard', '~> 0.9.12')
28
28
  gem.add_development_dependency('simplecov', '~> 0.13')
29
29
  end
@@ -52,6 +52,15 @@ describe Saxon::SourceHelper do
52
52
  expect(source).to respond_to(:system_id)
53
53
  expect(source.input_stream.to_io.read).to eq(expected)
54
54
  end
55
+
56
+ it "copes with a directly created JRuby util IOInputStream" do
57
+ path = fixture_path('eg.xml')
58
+ input_stream = org.jruby.util.IOInputStream.new(File.open(path))
59
+ source = Saxon::SourceHelper.to_stream_source(input_stream)
60
+
61
+ expect(source).to respond_to(:system_id)
62
+ expect(source.input_stream.to_io.read).to eq(File.read(path))
63
+ end
55
64
  end
56
65
 
57
66
  context "StreamSource systemId" do
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saxon-xslt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: java
6
6
  authors:
7
7
  - Matt Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2018-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ~>
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '10.1'
19
19
  name: rake
@@ -21,13 +21,13 @@ dependencies:
21
21
  type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ~>
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3.0'
33
33
  name: rspec
@@ -35,13 +35,13 @@ dependencies:
35
35
  type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.9.2
47
47
  name: vcr
@@ -49,13 +49,13 @@ dependencies:
49
49
  type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.9.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 2.4.0
61
61
  name: addressable
@@ -63,13 +63,13 @@ dependencies:
63
63
  type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.18.0
75
75
  name: webmock
@@ -77,27 +77,27 @@ dependencies:
77
77
  type: :development
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.18.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.8.7
88
+ version: 0.9.12
89
89
  name: yard
90
90
  prerelease: false
91
91
  type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.8.7
96
+ version: 0.9.12
97
97
  - !ruby/object:Gem::Dependency
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0.13'
103
103
  name: simplecov
@@ -105,20 +105,21 @@ dependencies:
105
105
  type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.13'
111
- description: Wraps the Saxon 9.5 HE XSLT 2.0 processor so that you can transform XSLT 2 stylesheets in JRuby. Sticks closely to the Nokogiri API
111
+ description: Wraps the Saxon 9.8 HE XSLT 2.0 processor so that you can transform XSLT
112
+ 2 stylesheets in JRuby. Sticks closely to the Nokogiri API
112
113
  email:
113
114
  - matt@reprocessed.org
114
115
  executables: []
115
116
  extensions: []
116
117
  extra_rdoc_files: []
117
118
  files:
118
- - .gitignore
119
- - .rspec
120
- - .ruby-version
121
- - .travis.yml
119
+ - ".gitignore"
120
+ - ".rspec"
121
+ - ".ruby-version"
122
+ - ".travis.yml"
122
123
  - Gemfile
123
124
  - LICENSE.txt
124
125
  - README.md
@@ -164,20 +165,20 @@ require_paths:
164
165
  - lib
165
166
  required_ruby_version: !ruby/object:Gem::Requirement
166
167
  requirements:
167
- - - '>='
168
+ - - ">="
168
169
  - !ruby/object:Gem::Version
169
170
  version: '0'
170
171
  required_rubygems_version: !ruby/object:Gem::Requirement
171
172
  requirements:
172
- - - '>='
173
+ - - ">="
173
174
  - !ruby/object:Gem::Version
174
175
  version: '0'
175
176
  requirements: []
176
177
  rubyforge_project:
177
- rubygems_version: 2.1.9
178
+ rubygems_version: 2.6.14
178
179
  signing_key:
179
180
  specification_version: 4
180
- summary: Saxon 9.5 HE XSLT 2.0 for JRuby with Nokogiri's API
181
+ summary: Saxon 9.8 HE XSLT 2.0 for JRuby with Nokogiri's API
181
182
  test_files:
182
183
  - spec/fixtures/cassettes/Saxon_SourceHelper/returning_a_StreamSource/StreamSource_systemId/for_inputs_where_we_can_infer_the_path_or_URI/is_set_to_an_open-uri_d_URI_s_URI.yml
183
184
  - spec/fixtures/cassettes/Saxon_SourceHelper/returning_a_StreamSource/StreamSource_systemId/for_inputs_where_we_can_infer_the_path_or_URI/overrides_the_inferred_system_ID_if_set_explicitly.yml
@@ -193,4 +194,3 @@ test_files:
193
194
  - spec/saxon/xml_spec.rb
194
195
  - spec/saxon/xslt_spec.rb
195
196
  - spec/spec_helper.rb
196
- has_rdoc: