cobweb 1.0.16 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.textile +1 -1
- data/lib/cobweb.rb +13 -2
- data/lib/cobweb_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjMzY2NkZjAzZjUzMmExMTM1NTQzOTU4ZWY0OWI3Yzk4ODFiOGRmZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjIwOTE0MzY0NzIwNDRhNTNjN2EzYTg3Njc4MzQyYzIwNzUzYmFmYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmZlODk5ZTZmMDI0MzVkN2M2NDM3MjMzYmM3MjA1MjQ5MDRmMmUwNzU2MzUw
|
10
|
+
YTM5MWNlM2Y4MjJhMWEwMDk3ZDQ3MDJkNDBhOTExNWRhNWU4OWE4N2JmYjU3
|
11
|
+
YzM2NzYzZWJmNjM3MjQzZThlOGM2NGMzMzAxZDdhZTFjMTQxYTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDBhZTdlZjc1NTljMGE4NTU2M2UyZWM5YzZhNjQ2OTc1ZTQ5NjJmOGRiY2E2
|
14
|
+
MTc4ZDAxMmRjNTlkMjMzZGRlZGZiODQzYmZlZWMwYzIxMTlhOWZlZDEyY2Fh
|
15
|
+
ZjFmYWY5NTgwYTc1OTY1ODdkOWY3NThhODk1ZWEwMWY1N2M4OTQ=
|
data/README.textile
CHANGED
data/lib/cobweb.rb
CHANGED
@@ -157,7 +157,7 @@ class Cobweb
|
|
157
157
|
@http.use_ssl = true
|
158
158
|
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
159
159
|
end
|
160
|
-
|
160
|
+
|
161
161
|
request_time = Time.now.to_f
|
162
162
|
@http.read_timeout = @options[:timeout].to_i
|
163
163
|
@http.open_timeout = @options[:timeout].to_i
|
@@ -168,6 +168,12 @@ class Cobweb
|
|
168
168
|
request_options['User-Agent']= options[:user_agent] if options.has_key?(:user_agent)
|
169
169
|
|
170
170
|
request = Net::HTTP::Get.new uri.request_uri, request_options
|
171
|
+
# authentication
|
172
|
+
if @options[:authentication] == "basic"
|
173
|
+
raise ":username and :password are required if using basic authentication" unless @options[:username] && @options[:password]
|
174
|
+
request.basic_auth @options[:username], @options[:password]
|
175
|
+
end
|
176
|
+
|
171
177
|
response = @http.request request
|
172
178
|
|
173
179
|
if @options[:follow_redirects] and response.code.to_i >= 300 and response.code.to_i < 400
|
@@ -324,7 +330,7 @@ class Cobweb
|
|
324
330
|
@http.use_ssl = true
|
325
331
|
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
326
332
|
end
|
327
|
-
|
333
|
+
|
328
334
|
request_time = Time.now.to_f
|
329
335
|
@http.read_timeout = @options[:timeout].to_i
|
330
336
|
@http.open_timeout = @options[:timeout].to_i
|
@@ -335,6 +341,11 @@ class Cobweb
|
|
335
341
|
request_options[ 'Cookie']= options[:cookies]
|
336
342
|
end
|
337
343
|
request = Net::HTTP::Head.new uri.request_uri, request_options
|
344
|
+
# authentication
|
345
|
+
if @options[:authentication] == "basic"
|
346
|
+
raise ":username and :password are required if using basic authentication" unless @options[:username] && @options[:password]
|
347
|
+
request.basic_auth @options[:username], @options[:password]
|
348
|
+
end
|
338
349
|
|
339
350
|
response = @http.request request
|
340
351
|
|
data/lib/cobweb_version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stewart McKee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|