xsr 1.2.0 → 1.2.2
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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/LICENSE +22 -0
- data/README.md +9 -4
- data/test/helper.rb +3 -5
- data/xsr.gemspec +4 -4
- metadata +20 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39ab889ea831529ef693fb4e8155a602fc967347
|
4
|
+
data.tar.gz: 197db55a65aa0f54fd1e8f4b0ef886d73c0ad902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3601a3830756dd838531c5d92f5291687c3cfd656efb281a58f490d4792114495d1a077bf2352209210fc69f21701587a099875b673e8bf67e7702d2463bff0
|
7
|
+
data.tar.gz: 87525098dbf9e68d27db92dc02d455f5ce7d58830a0741b65eddb2e92126630903ac22241bfb3e1f30e6a6b87332143402bf25f6255477691473202e7bacf3db
|
data/.travis.yml
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Matias Owsianik
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
[][gemnasium]
|
5
5
|
[][codeclimate]
|
6
6
|
[][travis]
|
7
|
+
[][codeclimate]
|
7
8
|
|
8
9
|
[gem]: http://badge.fury.io/rb/xsr
|
9
10
|
[gemnasium]: https://gemnasium.com/matiasow/xsr
|
@@ -43,7 +44,7 @@ And then invoke a service:
|
|
43
44
|
resp = client.get('http://api.something.io')
|
44
45
|
resp.success?
|
45
46
|
#=> true
|
46
|
-
resp.
|
47
|
+
resp.body
|
47
48
|
#=> JSON response as a Ruby Hash Object
|
48
49
|
```
|
49
50
|
###Supported HTTP verbs
|
@@ -104,13 +105,17 @@ resp.not_found?
|
|
104
105
|
resp.server_error?
|
105
106
|
#=> Response status code is 500
|
106
107
|
|
107
|
-
resp.
|
108
|
+
resp.body
|
108
109
|
#=> JSON response as a Ruby Hash object
|
109
110
|
|
110
|
-
resp.
|
111
|
-
#->
|
111
|
+
resp.http_response
|
112
|
+
#-> Call http_response to get full Net::HTTPResponse object
|
112
113
|
```
|
113
114
|
|
114
115
|
##What's next?
|
115
116
|
I'm not planning to add more features right now, but feel free to fork this repo and add any extra functionality you consider that should be included. Please, submit a PR with proposed changes or fixes.
|
116
117
|
Just keep in mind a minimalist paradigm (https://youtu.be/tXVr2E1vfmk).
|
118
|
+
|
119
|
+
##License
|
120
|
+
|
121
|
+
XSR is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
data/test/helper.rb
CHANGED
data/xsr.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'xsr'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.2'
|
4
4
|
s.summary = "XSR: eXtremely Simple REST Client"
|
5
5
|
s.description = "A very simple library to talk to a REST/JSON API"
|
6
|
-
s.authors = ["
|
6
|
+
s.authors = ["matiasow"]
|
7
7
|
s.email = ['matiasow@gmail.com']
|
8
8
|
s.homepage = 'http://github.com/matiasow/xsr'
|
9
9
|
s.license = 'MIT'
|
10
10
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
|
13
|
-
s.add_dependency "multi_json"
|
14
|
-
s.add_development_dependency "cutest"
|
13
|
+
s.add_dependency "multi_json", '~> 1.11', '>= 1.11.0'
|
14
|
+
s.add_development_dependency "cutest", '~> 1.2', '>= 1.2.2'
|
15
15
|
end
|
metadata
CHANGED
@@ -1,43 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- matiasow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 1.11.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.11'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 1.11.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: cutest
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.2'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
42
|
+
version: 1.2.2
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.2'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
52
|
+
version: 1.2.2
|
41
53
|
description: A very simple library to talk to a REST/JSON API
|
42
54
|
email:
|
43
55
|
- matiasow@gmail.com
|
@@ -47,6 +59,7 @@ extra_rdoc_files: []
|
|
47
59
|
files:
|
48
60
|
- ".gitignore"
|
49
61
|
- ".travis.yml"
|
62
|
+
- LICENSE
|
50
63
|
- README.md
|
51
64
|
- lib/xsr.rb
|
52
65
|
- lib/xsr/client.rb
|