edesky-client 0.0.6 → 0.0.7

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: 9e72cb09e79076b89dd8c5ec59c34bf9df05a194
4
- data.tar.gz: 40e322c2319f45e6f16afa30525bd78074e1b351
3
+ metadata.gz: ecbdaff003b73fec6771aa6adad0d1a3f1390f84
4
+ data.tar.gz: 56f85745039132be788bd667e8f068f51a8b4eaa
5
5
  SHA512:
6
- metadata.gz: d67e2154f888d41e96e401318c1bb9704b5953b53a7ad72a59e914d92df8b2eea7f632aa06f82efb5d16c8dd44ac993940d18d65f40ae33bb928d981c79e0fc3
7
- data.tar.gz: fb3f300b01e47251e9b97ce2de3966541c7489f1bb5f1a222b30d493810c7c65f61be53fe39b76d650da9e50a857f1166a090c5f6031892bea88baf7883d57f2
6
+ metadata.gz: 22e548acc7b0d58d03d9e916632fde5975a90a8832d4d2050fd778234aeadd558e72e4d762f37b8689cbd2e8c35e1dcf53ac63f250c4f46bd2e378837806965b
7
+ data.tar.gz: be0397c3191f31f275924d7519e9cb619d321bf07f7a1da7532e3a10bcad9efb0aea2b45b04e14e8961e69215ada4bb1b22c2c5419e6325e84f50ef1fba01402
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'edesky-client'
3
- s.version = '0.0.6'
4
- s.date = '2015-11-23'
3
+ s.version = '0.0.7'
4
+ s.date = '2015-11-29'
5
5
  s.summary = "Ruby klient pro edesky.cz API"
6
6
  s.description = "Ruby klient pro edesky.cz HTTP API, hledání dokumentů a úředních desek."
7
7
  s.authors = ["Marek Aufart"]
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
  s.homepage = 'https://github.com/edesky/edeskyclient_ruby'
13
13
  s.license = 'MIT'
14
- s.required_ruby_version = '>= 2.0.0'
14
+ s.required_ruby_version = '>= 1.9.3'
15
15
 
16
16
  s.add_runtime_dependency 'xml-simple', '~> 1.1'
17
17
  s.add_development_dependency 'minitest', '~> 5.0'
data/lib/edesky_client.rb CHANGED
@@ -52,7 +52,12 @@ class EdeskyClient
52
52
  def fetch(type, params)
53
53
  uri = URI(URI.join(@endpoint_url, type))
54
54
  uri.query = URI.encode_www_form(params)
55
- XmlSimple.xml_in(Net::HTTP.get(uri), :'ForceArray' => false)
55
+ http = Net::HTTP.new(uri.host, uri.port)
56
+ http.use_ssl = true
57
+ request = Net::HTTP::Get.new(uri.request_uri)
58
+ response = http.request(request)
59
+ # TODO(aufi): raise error on non-200 HTTP code
60
+ XmlSimple.xml_in(response.body, :'ForceArray' => false)
56
61
  end
57
62
 
58
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edesky-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Aufart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-23 00:00:00.000000000 Z
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple
@@ -62,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 2.0.0
65
+ version: 1.9.3
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="