bel_parser 1.0.3-java → 1.0.4-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: 6f361c605de318ce6ec8f629b1fbb3dd38d22454
4
- data.tar.gz: ac40b0b31f4590eb812ae37a42691be2147d2649
3
+ metadata.gz: ce3dec94758500ca12f20ec16d93cbf01874a8d3
4
+ data.tar.gz: 21510b5bc83a203e446ab76b9a19d7daca380731
5
5
  SHA512:
6
- metadata.gz: 90d04385c23b3ce4dcd3a29872046306001a79e637ef786a87d9ccb76ef80419983ea4c4a00e6eae987c956c6f9c10f79784db5a7bbd066cbb0b70425dc398f4
7
- data.tar.gz: b949467ff5387ea9312c1f16958d29bf924b564260f6d21e4c25b313c1f90e6b9ae0df2e1c7d97764a44a5512d5a8a66145d4741badc6aefb35f97840998e4d5
6
+ metadata.gz: 9e30b2bbb3c9ea3a736931ed056ed28b65635aa46a545f3c3a3ca72481f7a37cbeff080ede1b5a94ccec76bd6fa7680bbac1d63ac0310378e2a40c0ede402b03
7
+ data.tar.gz: 9b4b54e45db28ebbe356cb0942bcd89e845eaefcb04c68b574a5f145587151af9ad228cf9b7bc950fe53a8e4ecd980be6eff7f31645af6bc3eb1e0a295fe647a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -81,10 +81,9 @@ module BELParser
81
81
  scheme, host, port = URI(url_s).select(:scheme, :host, :port)
82
82
  validate_uri_scheme(scheme, url_s)
83
83
 
84
+ http = Net::HTTP.start(host, port)
84
85
  options_request = Net::HTTP::Options.new(url_s)
85
- options_response = Net::HTTP.start(host, port) do |http|
86
- http.request(Net::HTTP::Options.new(url_s))
87
- end
86
+ options_response = http.request(options_request)
88
87
  validate_200(options_response, url_s)
89
88
  validate_allowed_methods(options_response, url_s)
90
89
  end
@@ -60,20 +60,16 @@ module BELParser
60
60
  request['Range'] = 'bytes=0-5000'
61
61
  resource_uri = nil
62
62
 
63
- Net::HTTP.start(
64
- uri.hostname,
65
- uri.port) { |http|
66
-
67
- http.request(request) do |response|
68
- response.read_body do |chunk|
69
- uristring = chunk.lines.detect { |l| l =~ URISTRING_PATTERN }
70
- if uristring
71
- resource_uri = uristring.match(URISTRING_PATTERN)[1]
72
- break
73
- end
63
+ http = Net::HTTP.new(uri.hostname, uri.port)
64
+ http.request(request) do |response|
65
+ response.read_body do |chunk|
66
+ uristring = chunk.lines.detect { |l| l =~ URISTRING_PATTERN }
67
+ if uristring
68
+ resource_uri = uristring.match(URISTRING_PATTERN)[1]
69
+ break
74
70
  end
75
71
  end
76
- }
72
+ end
77
73
 
78
74
  RESOLVE_URI_LOCK.synchronize do
79
75
  @uri_hash ||= {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi