hugs 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +8 -8
- data/lib/hugs/client.rb +0 -1
- data/lib/hugs/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
# Hugs
|
2
2
|
|
3
3
|
Hugs net-http-persistent with convenient delete, get, head, post, and put methods.
|
4
|
+
Automatically parses JSON and XML responses.
|
4
5
|
|
5
|
-
|
6
|
+
## Why?
|
7
|
+
|
8
|
+
Opted to write this gem for a few reasons:
|
6
9
|
|
7
10
|
* [Ganeti's API](http://docs.ganeti.org/ganeti/2.2/html/rapi.html), required
|
8
11
|
the sending of a message body with the HTTP Get request, which
|
9
|
-
[rest-client](https://github.com/archiloque/rest-client) does not
|
10
|
-
*
|
12
|
+
[rest-client](https://github.com/archiloque/rest-client) does not allow.
|
13
|
+
* A [fast](http://blog.segment7.net/articles/2010/05/07/net-http-is-not-slow),
|
11
14
|
thread-safe, and persistent client.
|
12
15
|
* [Excon](https://github.com/geemus/excon) does most everything right, <del>but is not
|
13
16
|
compatible with [VCR](https://github.com/myronmarston/vcr) (more specifically
|
14
17
|
[webmock](https://github.com/bblimke/webmock) and [fakeweb](https://github.com/chrisk/fakeweb))</del>.
|
15
18
|
There looks to be [work on this front](https://github.com/geemus/excon/issues#issue/29).
|
16
|
-
*
|
19
|
+
* Continued learning.
|
17
20
|
|
18
21
|
## Opinionated
|
19
22
|
|
20
|
-
|
21
|
-
* It is okay to parse the response.
|
22
|
-
* A Hash is returned when response is JSON.
|
23
|
-
* A Nokogiri::XML::Document is returned when XML.
|
23
|
+
Intended for but not limited to, endpoints that return JSON or XML.
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
data/lib/hugs/client.rb
CHANGED
data/lib/hugs/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: hugs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.7.
|
5
|
+
version: 2.7.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- John Dewey
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-06-
|
14
|
+
date: 2011-06-14 00:00:00 -07:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|