unrest 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +71 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/example/example.rb +5 -0
- data/example/path/json/file.json +8 -0
- data/example/path/xml/file.xml +7 -0
- data/lib/hash_recursive_merge.rb +74 -0
- data/lib/unrest/configuration.rb +70 -0
- data/lib/unrest/configuration_hash.rb +11 -0
- data/lib/unrest/exceptions.rb +15 -0
- data/lib/unrest/version.rb +3 -0
- data/lib/unrest.rb +136 -0
- data/unrest.gemspec +39 -0
- metadata +147 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a863008615e62441c65cd2fc7c729f2a8d52b279
|
4
|
+
data.tar.gz: ce3e716c37c0f88215171813a2752d2c8469e4ca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d2a857691424f87d618dd2785ffd9e9892b062bee8d4a4d3b0fb48d920c5700e730d13c28796ad230348f04505e599e221ba5d591464785dc01e9d3897bf6dcc
|
7
|
+
data.tar.gz: 1a136bbbc6a0929bd9ae584d384ce39424c10457c6c35af916f89f96789bd76393a4d633a4243c3b26f330be8d908ccf9bb7fa4fa33d042469aa52178b062fdc
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Steven Eksteen
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# unReST
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/unrest)
|
4
|
+
[](https://travis-ci.org/eksoverzero/unrest)
|
5
|
+
|
6
|
+
To build very quick little API clients for legacy or tiny APIs with no existing gems.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'unrest'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install unrest
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
unReST works by using files of request templates, and their directory structure, to dynamically build the API client.
|
27
|
+
|
28
|
+
Setting up a project like this, for example:
|
29
|
+
|
30
|
+
```
|
31
|
+
.
|
32
|
+
+-- example.rb
|
33
|
+
+-- ip.html
|
34
|
+
+-- image
|
35
|
+
| +-- png.xml
|
36
|
+
| +-- svg.html
|
37
|
+
| +-- jpeg.json
|
38
|
+
| +-- webp.text
|
39
|
+
```
|
40
|
+
|
41
|
+
This will generate an API client with access to the follwoing endpoints/methods:
|
42
|
+
|
43
|
+
```
|
44
|
+
# example.rb
|
45
|
+
require('unrest')
|
46
|
+
|
47
|
+
client = Unrest.new('https://httpbin.org')
|
48
|
+
```
|
49
|
+
|
50
|
+
- `client.ip`: https://httpbin.org/ip
|
51
|
+
- `client.image_png`: https://httpbin.org/image/png
|
52
|
+
- `client.image_svg`: https://httpbin.org/image/svg
|
53
|
+
- `client.image_jpeg`: https://httpbin.org/image/jpeg
|
54
|
+
- `client.image_webp`: https://httpbin.org/image/webp
|
55
|
+
|
56
|
+
The file extentions: `xml`, `html`, `json` and `text` will be used against the API and the results formatted accordingly. Since, in the exampe, we will be sending nothing to the API- these files can be empty.
|
57
|
+
|
58
|
+
## Development
|
59
|
+
|
60
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
61
|
+
|
62
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
63
|
+
|
64
|
+
## Contributing
|
65
|
+
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/eksoverzero/unrest.
|
67
|
+
|
68
|
+
|
69
|
+
## License
|
70
|
+
|
71
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "unrest"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/example/example.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
#
|
2
|
+
# = Hash Recursive Merge
|
3
|
+
#
|
4
|
+
# Merges a Ruby Hash recursively, Also known as deep merge.
|
5
|
+
# Recursive version of Hash#merge and Hash#merge!.
|
6
|
+
#
|
7
|
+
# Category:: Ruby
|
8
|
+
# Package:: Hash
|
9
|
+
# Author:: Simone Carletti <weppos@weppos.net>
|
10
|
+
# Copyright:: 2007-2008 The Authors
|
11
|
+
# License:: MIT License
|
12
|
+
# Link:: http://www.simonecarletti.com/
|
13
|
+
# Source:: http://gist.github.com/gists/6391/
|
14
|
+
#
|
15
|
+
module HashRecursiveMerge
|
16
|
+
|
17
|
+
#
|
18
|
+
# Recursive version of Hash#merge!
|
19
|
+
#
|
20
|
+
# Adds the contents of +other_hash+ to +hsh+,
|
21
|
+
# merging entries in +hsh+ with duplicate keys with those from +other_hash+.
|
22
|
+
#
|
23
|
+
# Compared with Hash#merge!, this method supports nested hashes.
|
24
|
+
# When both +hsh+ and +other_hash+ contains an entry with the same key,
|
25
|
+
# it merges and returns the values from both arrays.
|
26
|
+
#
|
27
|
+
# h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}}
|
28
|
+
# h2 = {"b" => 254, "c" => {"c1" => 16, "c3" => 94}}
|
29
|
+
# h1.rmerge!(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}}
|
30
|
+
#
|
31
|
+
# Simply using Hash#merge! would return
|
32
|
+
#
|
33
|
+
# h1.merge!(h2) #=> {"a" => 100, "b" = >254, "c" => {"c1" => 16, "c3" => 94}}
|
34
|
+
#
|
35
|
+
def rmerge!(other_hash)
|
36
|
+
merge!(other_hash) do |key, oldval, newval|
|
37
|
+
oldval.class == self.class ? oldval.rmerge!(newval) : newval
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Recursive version of Hash#merge
|
43
|
+
#
|
44
|
+
# Compared with Hash#merge!, this method supports nested hashes.
|
45
|
+
# When both +hsh+ and +other_hash+ contains an entry with the same key,
|
46
|
+
# it merges and returns the values from both arrays.
|
47
|
+
#
|
48
|
+
# Compared with Hash#merge, this method provides a different approch
|
49
|
+
# for merging nasted hashes.
|
50
|
+
# If the value of a given key is an Hash and both +other_hash+ abd +hsh
|
51
|
+
# includes the same key, the value is merged instead replaced with
|
52
|
+
# +other_hash+ value.
|
53
|
+
#
|
54
|
+
# h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}}
|
55
|
+
# h2 = {"b" => 254, "c" => {"c1" => 16, "c3" => 94}}
|
56
|
+
# h1.rmerge(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}}
|
57
|
+
#
|
58
|
+
# Simply using Hash#merge would return
|
59
|
+
#
|
60
|
+
# h1.merge(h2) #=> {"a" => 100, "b" = >254, "c" => {"c1" => 16, "c3" => 94}}
|
61
|
+
#
|
62
|
+
def rmerge(other_hash)
|
63
|
+
r = {}
|
64
|
+
merge(other_hash) do |key, oldval, newval|
|
65
|
+
r[key] = oldval.class == self.class ? oldval.rmerge(newval) : newval
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
class Hash
|
73
|
+
include HashRecursiveMerge
|
74
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require 'unrest/configuration_hash'
|
3
|
+
|
4
|
+
class Unrest
|
5
|
+
def self.configure(options = nil, &block)
|
6
|
+
if !options.nil?
|
7
|
+
Configuration.instance.configure(options)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.config
|
12
|
+
Configuration.instance.data
|
13
|
+
end
|
14
|
+
|
15
|
+
class Configuration
|
16
|
+
include Singleton
|
17
|
+
|
18
|
+
OPTIONS = [
|
19
|
+
:https,
|
20
|
+
:timeout,
|
21
|
+
:headers,
|
22
|
+
:parameters,
|
23
|
+
:authentication
|
24
|
+
]
|
25
|
+
|
26
|
+
attr_accessor :data
|
27
|
+
|
28
|
+
def self.set_defaults
|
29
|
+
instance.set_defaults
|
30
|
+
end
|
31
|
+
|
32
|
+
OPTIONS.each do |o|
|
33
|
+
define_method o do
|
34
|
+
@data[o]
|
35
|
+
end
|
36
|
+
define_method "#{o}=" do |value|
|
37
|
+
@data[o] = value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def configure(options)
|
42
|
+
@data.rmerge!(options)
|
43
|
+
end
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
@data = Unrest::ConfigurationHash.new
|
47
|
+
set_defaults
|
48
|
+
end
|
49
|
+
|
50
|
+
def set_defaults
|
51
|
+
@data[:https] = false
|
52
|
+
@data[:timeout] = 5
|
53
|
+
@data[:headers] = {}
|
54
|
+
@data[:parameters] = {}
|
55
|
+
@data[:authentication] = {}
|
56
|
+
end
|
57
|
+
|
58
|
+
instance_eval(OPTIONS.map do |option|
|
59
|
+
o = option.to_s
|
60
|
+
<<-EOS
|
61
|
+
def #{o}
|
62
|
+
instance.data[:#{o}]
|
63
|
+
end
|
64
|
+
def #{o}=(value)
|
65
|
+
instance.data[:#{o}] = value
|
66
|
+
end
|
67
|
+
EOS
|
68
|
+
end.join("\n\n"))
|
69
|
+
end
|
70
|
+
end
|
data/lib/unrest.rb
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
require 'unrest/version'
|
2
|
+
require 'unrest/exceptions'
|
3
|
+
require 'unrest/configuration'
|
4
|
+
|
5
|
+
require 'uri'
|
6
|
+
require 'liquid'
|
7
|
+
require 'net/http'
|
8
|
+
require 'pathname'
|
9
|
+
require 'active_support'
|
10
|
+
require 'active_support/core_ext/hash/keys'
|
11
|
+
|
12
|
+
class Unrest
|
13
|
+
FILE_TYPES = ['.xml', '.html', '.json', '.text']
|
14
|
+
|
15
|
+
attr_accessor :url, :args
|
16
|
+
|
17
|
+
def initialize url, **args
|
18
|
+
@url = url
|
19
|
+
@args = args.deep_symbolize_keys
|
20
|
+
@options = @args[:options]
|
21
|
+
@arguments = @args[:arguments]
|
22
|
+
|
23
|
+
call = caller_locations.first.absolute_path
|
24
|
+
files = Dir[File.join(File.dirname(call), '**', '*') ]
|
25
|
+
.reject{ |path| File.directory? path }
|
26
|
+
.reject{ |file| !Unrest::FILE_TYPES.include?(File.extname(file))}
|
27
|
+
|
28
|
+
files.each do |file|
|
29
|
+
path = Pathname.new(file).relative_path_from(Pathname.new(call))
|
30
|
+
path = path.to_s[0..-(File.extname(path).length + 1)].split('/')[1..-1]
|
31
|
+
|
32
|
+
Unrest.class_eval do
|
33
|
+
define_method path.join('_').downcase do |args|
|
34
|
+
args.deep_symbolize_keys!
|
35
|
+
|
36
|
+
http_request(file, path.join('/'),
|
37
|
+
(@options.merge(args[:options]) rescue @options),
|
38
|
+
(@arguments.merge(args[:arguments]) rescue @arguments)
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def uri path=nil
|
48
|
+
URI.parse([url, path].compact.join('/'))
|
49
|
+
end
|
50
|
+
|
51
|
+
def ssl? uri
|
52
|
+
uri.scheme.casecmp('https') == 0
|
53
|
+
end
|
54
|
+
|
55
|
+
def http_client uri
|
56
|
+
http_client = Net::HTTP.new uri.host, uri.port
|
57
|
+
|
58
|
+
http_client.use_ssl = ssl?(uri)
|
59
|
+
http_client.open_timeout = configuration.timeout
|
60
|
+
http_client.read_timeout = configuration.timeout
|
61
|
+
http_client.set_debug_output($stdout)
|
62
|
+
|
63
|
+
http_client
|
64
|
+
end
|
65
|
+
|
66
|
+
def http_request file, path, options={}, arguments={}
|
67
|
+
uri = uri(path)
|
68
|
+
http_request = http_request_method(options[:http_request_method]).new uri.path
|
69
|
+
|
70
|
+
if configuration.authentication[:username] and configuration.authentication[:password]
|
71
|
+
http_request.basic_auth(
|
72
|
+
configuration.authentication[:username],
|
73
|
+
configuration.authentication[:password]
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
http_request_headers = options[:http_request_headers] || {}
|
78
|
+
|
79
|
+
http_request_headers.merge(http_request_headers(File.extname(file))).each do |attribute, value|
|
80
|
+
http_request[attribute] = value
|
81
|
+
end
|
82
|
+
|
83
|
+
http_request.body = http_request_body file, arguments
|
84
|
+
|
85
|
+
http_client(uri).request http_request
|
86
|
+
rescue Timeout::Error
|
87
|
+
raise Unrest::RequestTimeout
|
88
|
+
rescue Errno::EHOSTUNREACH, Errno::ETIMEDOUT, Errno::ENETUNREACH
|
89
|
+
raise Unrest::NetworkError
|
90
|
+
end
|
91
|
+
|
92
|
+
def http_request_body file, arguments={}
|
93
|
+
template = Liquid::Template.parse(File.read(file))
|
94
|
+
template.render(arguments.deep_stringify_keys)
|
95
|
+
end
|
96
|
+
|
97
|
+
def http_request_format extention
|
98
|
+
case extention
|
99
|
+
when '.xml'
|
100
|
+
http_request_format = 'text/xml'
|
101
|
+
when 'html'
|
102
|
+
http_request_format = 'text/html'
|
103
|
+
when 'json'
|
104
|
+
http_request_format = 'text/json'
|
105
|
+
else
|
106
|
+
http_request_format = 'text/plain'
|
107
|
+
end
|
108
|
+
|
109
|
+
{ 'Content-Type' => http_request_format }
|
110
|
+
end
|
111
|
+
|
112
|
+
def http_request_method method='get'
|
113
|
+
case method
|
114
|
+
when 'get'
|
115
|
+
Net::HTTP::Get
|
116
|
+
when 'put'
|
117
|
+
Net::HTTP::Put
|
118
|
+
when 'post'
|
119
|
+
Net::HTTP::Post
|
120
|
+
when 'patch'
|
121
|
+
Net::HTTP::Patch
|
122
|
+
when 'delete'
|
123
|
+
Net::HTTP::Delete
|
124
|
+
else
|
125
|
+
raise Unrest::ConfigurationError
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def http_request_headers extention=nil
|
130
|
+
configuration.headers.merge(http_request_format(extention))
|
131
|
+
end
|
132
|
+
|
133
|
+
def configuration
|
134
|
+
Unrest.config
|
135
|
+
end
|
136
|
+
end
|
data/unrest.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'unrest/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "unrest"
|
8
|
+
spec.version = Unrest::VERSION
|
9
|
+
spec.authors = ["Steven Eksteen"]
|
10
|
+
spec.email = ["steven@secondimpression.net"]
|
11
|
+
|
12
|
+
spec.summary = %q{unReSTful API client}
|
13
|
+
spec.homepage = "https://github.com/eksoverzero/unrest"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
# if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
+
# else
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
# "public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
f.match(%r{^(test|spec|features)/})
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
spec.add_runtime_dependency "liquid"
|
33
|
+
spec.add_runtime_dependency "activesupport"
|
34
|
+
|
35
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
37
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
38
|
+
spec.add_development_dependency "activesupport", "~> 5.0"
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: unrest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Steven Eksteen
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: liquid
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.14'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.0'
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- steven@secondimpression.net
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bin/console
|
112
|
+
- bin/setup
|
113
|
+
- example/example.rb
|
114
|
+
- example/path/json/file.json
|
115
|
+
- example/path/xml/file.xml
|
116
|
+
- lib/hash_recursive_merge.rb
|
117
|
+
- lib/unrest.rb
|
118
|
+
- lib/unrest/configuration.rb
|
119
|
+
- lib/unrest/configuration_hash.rb
|
120
|
+
- lib/unrest/exceptions.rb
|
121
|
+
- lib/unrest/version.rb
|
122
|
+
- unrest.gemspec
|
123
|
+
homepage: https://github.com/eksoverzero/unrest
|
124
|
+
licenses:
|
125
|
+
- MIT
|
126
|
+
metadata: {}
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options: []
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 2.5.1
|
144
|
+
signing_key:
|
145
|
+
specification_version: 4
|
146
|
+
summary: unReSTful API client
|
147
|
+
test_files: []
|