bel_parser 1.0.3 → 1.0.4

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: 4647de6538942a6a002e45a2e6a260920cf889d7
4
- data.tar.gz: ef4be77c47a01419a46c5ac442dc276ac71e7789
3
+ metadata.gz: 8cee37750129d98c6ebb23306cf320d2c3d487fd
4
+ data.tar.gz: 5cb260daec5153b1ee13609d36f77061c63ecd31
5
5
  SHA512:
6
- metadata.gz: a35f51b5f4056e019b12bebc28ffd065f487780b23665f29147e9624ec8a30d712d5374688eb986294f0e46b2cb476cdd45a108a5e9c3eddead2c0a8c777f170
7
- data.tar.gz: 252c2c6f742cb1a4ed0ae7d8e162d2f43344a8cab269cd4638f6a6e814570a820b847ae5601ba1a6ed044e62457803c83d019bbf036b464186b283d5d85e318e
6
+ metadata.gz: 55ea0d27228e94075296bc69f20cb9cb134f7d2fd0d310f427b0b8736fadbc44f708cbfb0191254869d4c6051f1d45053b8313d9f4df406bc4dc2195a06df78a
7
+ data.tar.gz: 1f002cbf2704df4fc4db3df20db58ff3841bab479a7b6efa5c52ad037cc2ae1c24d31ea372226efa6232dd6483f3e0ab0b7eb60e188148591fdc9d5c246e2c9d
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: ruby
6
6
  authors:
7
7
  - Anthony Bargnesi