gpd-request 0.2.3 → 0.2.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: 5cba57a7c5bceb54d6fd774784c5d28653284e6c
4
- data.tar.gz: 32275d1921005e6a6b08776adcec2356725a98a4
3
+ metadata.gz: 57da85659927d3d37b7d381360db89ee8dc0e9a3
4
+ data.tar.gz: 86bfadad40cdd856538da424aa9d6dfa4433b29f
5
5
  SHA512:
6
- metadata.gz: a3d8e68195adad0d1879d03ae8cd70069ce746cb993347adc75b8a96b708fdc40d739513e8e473dd9f7accb00b736c5e4aa39f457ffda91d27f51fa8052cbcb7
7
- data.tar.gz: f795485a297d0021423d4d35b256033df2e657eab25c6d72f8acf902c00908d5d66565e7e82dcad51a3240b49b868af660d35fafbf5ca003a226183f95b74934
6
+ metadata.gz: dc18b2b3dda3ba140cd97e601e0fe938f0f03e2f37dc042796fb3bcc57dc0d0b4afd1c1d0983272a2a3bfea79b0a4e64d1a2f99952e0de5fff0445812606e3b5
7
+ data.tar.gz: 6c70669c6892038653590b354e60db5956c845a5f2a68c5ab0ebc3c01df97593c90386716aa5816d5fec518b2fa7ebe32616d61b377a6e3814c47ab515db39d1
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- �-&�]��@��9L��?�NLK�[NA�+�Hl��� ��F�V���l�����E0���zSZ����!-Q���Ȇ��^���lK�� $��Z���c2��4cW�������jF5�� :��>��xS[����nM)���\CS���U�@�̮,�1.Y�$�R1b0:��Ā���C
2
- ����:�ܳs��>����j ��ed�0���Y�w�/3�?_[�FFC� �*⏫�zک���`
1
+ wHpX%"�~�L�N OAD�"���3��Q©eEB ��v�|i��S��:��P���C���9Ò��T�<,�&s� r�� &�W�����Ȱ�ExU�+FQ���2�,���Q�ꑻ\�<^M��pi).%�v_2D;���D�6=eus!R�F�-��4w�.Y ����Ѫ@�[�I1Uy(�'+'Nz:�g��=/���5Ѐ?���h�����( ���_,��I��'��LIk8>�\IGX
data/lib/gpd-request.rb CHANGED
@@ -1,12 +1,13 @@
1
- require 'net/http'
2
- require 'rexml/document'
3
- include REXML
1
+ #!/usr/bin/env ruby
4
2
 
5
3
  # file: gpd-request.rb
6
4
 
5
+ require 'net/http'
6
+
7
+
7
8
  class GPDRequest
8
9
 
9
- def initialize(user, pass, headers={})
10
+ def initialize(user=nil, pass=nil, headers={})
10
11
  @headers = {
11
12
  "User-Agent" => "Ruby-GPDRequest"
12
13
  }.merge headers
@@ -17,9 +18,11 @@ class GPDRequest
17
18
  path = uri
18
19
  url = URI.parse(path)
19
20
  req = yield(url)
20
- req.basic_auth(@username, @password)
21
- response = Net::HTTP.new(url.host, url.port).start { |http| http.request(req) }
22
- Document.new(response.body).write
21
+ req.basic_auth(@username, @password) if @user
22
+ response = Net::HTTP.new(url.host, url.port).start do |http|
23
+ http.request(req)
24
+ end
25
+ response
23
26
  end
24
27
 
25
28
  def get(uri)
@@ -57,4 +60,4 @@ class GPDRequest
57
60
  end
58
61
  end
59
62
 
60
- end
63
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpd-request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,26 +10,28 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTEzMDIwNjIwNTcyNloXDTE0MDIwNjIwNTcyN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+ date: 2014-02-17 00:00:00.000000000 Z
33
35
  dependencies: []
34
36
  description:
35
37
  email: james@r0bertson.co.uk
@@ -48,17 +50,17 @@ require_paths:
48
50
  - lib
49
51
  required_ruby_version: !ruby/object:Gem::Requirement
50
52
  requirements:
51
- - - '>='
53
+ - - ">="
52
54
  - !ruby/object:Gem::Version
53
55
  version: '0'
54
56
  required_rubygems_version: !ruby/object:Gem::Requirement
55
57
  requirements:
56
- - - '>='
58
+ - - ">="
57
59
  - !ruby/object:Gem::Version
58
60
  version: '0'
59
61
  requirements: []
60
62
  rubyforge_project:
61
- rubygems_version: 2.0.0.rc.2
63
+ rubygems_version: 2.1.11
62
64
  signing_key:
63
65
  specification_version: 4
64
66
  summary: GPD-Request is a convenient Net::HTTP wrapper
metadata.gz.sig CHANGED
Binary file