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 +4 -4
- data/edesky-client.gemspec +3 -3
- data/lib/edesky_client.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecbdaff003b73fec6771aa6adad0d1a3f1390f84
|
4
|
+
data.tar.gz: 56f85745039132be788bd667e8f068f51a8b4eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22e548acc7b0d58d03d9e916632fde5975a90a8832d4d2050fd778234aeadd558e72e4d762f37b8689cbd2e8c35e1dcf53ac63f250c4f46bd2e378837806965b
|
7
|
+
data.tar.gz: be0397c3191f31f275924d7519e9cb619d321bf07f7a1da7532e3a10bcad9efb0aea2b45b04e14e8961e69215ada4bb1b22c2c5419e6325e84f50ef1fba01402
|
data/edesky-client.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'edesky-client'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '2015-11-
|
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 = '>=
|
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
|
-
|
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.
|
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-
|
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:
|
65
|
+
version: 1.9.3
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|