crud_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/crud_client.gemspec +38 -0
- data/lib/crud_client/crud_client.rb +107 -0
- data/lib/crud_client/future_wrapper.rb +11 -0
- data/lib/crud_client/request.rb +19 -0
- data/lib/crud_client/version.rb +3 -0
- data/lib/crud_client.rb +8 -0
- data/lib/init.rb +1 -0
- data/spec/crud_client_spec.rb +105 -0
- data/spec/init_spec.rb +7 -0
- data/spec/request_spec.rb +37 -0
- data/spec/spec_helper.rb +7 -0
- metadata +290 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7e76e667bdd01448e65e8d85fff7f9fb48f4df73
|
4
|
+
data.tar.gz: 82c83138d330436b34aae68ac642c9de2f9956a6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 893132684feebb1ea998d4c2db851bdf3638379088bcdfd773b94a798d4a3d6f49cc1320dbca88dd3a04bd9ebb8ab86f98e9ffb4af0fdc39cef243e031687666
|
7
|
+
data.tar.gz: f95829a325a9a73dd800b6672380c48d480e496b97d03488c88ca51984bcb863133c71e98b539bbd5a55295fa7f03142ffd147d069d2e515d553d87caef8c732
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
crud-client
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Jay OConnor
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# CrudClient
|
2
|
+
Easy-ish API management for use with Napa
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'crud_client'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install crud_client
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Define the following ENV variables for best results
|
23
|
+
```
|
24
|
+
SERVICE_NAME
|
25
|
+
RACK_ENV
|
26
|
+
HEADER_PASSWORD
|
27
|
+
```
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
1. Fork it ( https://github.com/[my-github-username]/crud_client/fork )
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/crud_client.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require File.expand_path('../lib/crud_client/version', __FILE__)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "crud_client"
|
8
|
+
spec.version = CrudClient::VERSION
|
9
|
+
spec.authors = ["Jay OConnor"]
|
10
|
+
spec.email = ["jay@bellycard.com"]
|
11
|
+
spec.description = %q{Easy connections to APIs}
|
12
|
+
spec.summary = %q{Easy connections to APIs}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = ""
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'faraday'
|
22
|
+
spec.add_dependency 'faraday_middleware'
|
23
|
+
spec.add_dependency 'hashie'
|
24
|
+
spec.add_dependency 'activesupport'
|
25
|
+
spec.add_dependency 'celluloid'
|
26
|
+
spec.add_dependency 'celluloid-io'
|
27
|
+
spec.add_dependency 'imprint'
|
28
|
+
spec.add_dependency 'napa'
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'rspec'
|
33
|
+
spec.add_development_dependency 'pry'
|
34
|
+
spec.add_development_dependency 'git'
|
35
|
+
spec.add_development_dependency 'rubocop'
|
36
|
+
spec.add_development_dependency 'guard-rspec'
|
37
|
+
spec.add_development_dependency 'simplecov'
|
38
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'active_support/all'
|
3
|
+
require 'faraday'
|
4
|
+
require 'faraday_middleware'
|
5
|
+
require 'hashie'
|
6
|
+
require 'celluloid/io'
|
7
|
+
require 'imprint'
|
8
|
+
require 'napa'
|
9
|
+
|
10
|
+
module CrudClient
|
11
|
+
class CrudClient
|
12
|
+
include Celluloid::IO
|
13
|
+
cattr_accessor :trace_id
|
14
|
+
|
15
|
+
def self.get(*args)
|
16
|
+
request = Request.new(*args)
|
17
|
+
issue_request(:get, "#{request_url}/#{request.id}", request.options)
|
18
|
+
end
|
19
|
+
self.singleton_class.send(:alias_method, :index, :get)
|
20
|
+
self.singleton_class.send(:alias_method, :show, :get)
|
21
|
+
|
22
|
+
def self.post(*args)
|
23
|
+
request = Request.new(*args)
|
24
|
+
issue_request(:post, "#{request_url}/#{request.id}", request.options)
|
25
|
+
end
|
26
|
+
self.singleton_class.send(:alias_method, :create, :post)
|
27
|
+
|
28
|
+
def self.put(*args)
|
29
|
+
request = Request.new(*args)
|
30
|
+
issue_request(:put, "#{request_url}/#{request.id}", request.options)
|
31
|
+
end
|
32
|
+
self.singleton_class.send(:alias_method, :update, :put)
|
33
|
+
|
34
|
+
def self.delete(*args)
|
35
|
+
request = Request.new(*args)
|
36
|
+
issue_request(:delete, "#{request_url}/#{request.id}", request.options)
|
37
|
+
end
|
38
|
+
self.singleton_class.send(:alias_method, :destroy, :delete)
|
39
|
+
|
40
|
+
def self.request_url
|
41
|
+
"#{base_url}/#{name.demodulize.underscore.pluralize}"
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.base_url
|
45
|
+
url = ENV["#{name.split('::')[0].underscore.upcase}_URL"]
|
46
|
+
url ||= default_base_url
|
47
|
+
url
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.issue_request(method, url, options)
|
51
|
+
raise "HEADER_PASSWORD Environment Variable is not set." if ENV['HEADER_PASSWORD'].nil? && ENV['RACK_ENV'] != 'test'
|
52
|
+
|
53
|
+
self.trace_id = Imprint::Tracer.get_trace_id.to_s.dup
|
54
|
+
|
55
|
+
# use a new celluloid actor thread
|
56
|
+
future = Celluloid::Future.new do
|
57
|
+
begin
|
58
|
+
logger = defined?(Rails) ? Rails.logger : Napa::Logger.logger
|
59
|
+
logger.info("#{ENV['SERVICE_NAME']} is calling #{self.name}")
|
60
|
+
response = conn.send(method, url, options) do |request|
|
61
|
+
request.headers = request.headers.merge(headers)
|
62
|
+
end
|
63
|
+
to_return_type response.body
|
64
|
+
rescue => e
|
65
|
+
# Throw this to honeybadger with a context of what's going on if it is defined.
|
66
|
+
Honeybadger.notify(e, context: { method: method,
|
67
|
+
url: url,
|
68
|
+
options: options,
|
69
|
+
response_status: response.try(:status),
|
70
|
+
response_body: response.try(:body) }) if defined?(Honeybadger)
|
71
|
+
# re-raise the error
|
72
|
+
raise e
|
73
|
+
end
|
74
|
+
end
|
75
|
+
future.extend(FutureWrapper)
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.to_return_type response_body
|
79
|
+
# attempt to parse json and mashify it here to catch errors better
|
80
|
+
Hashie::Mash.new(JSON.parse(response_body))
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.conn
|
84
|
+
connection = Faraday.new do |conn|
|
85
|
+
conn.request :json
|
86
|
+
conn.adapter Faraday.default_adapter
|
87
|
+
end
|
88
|
+
connection
|
89
|
+
end
|
90
|
+
|
91
|
+
def issue_request(method, url, options)
|
92
|
+
self.class.issue_request(method, url, options)
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.headers
|
96
|
+
{
|
97
|
+
'Password' => ENV['HEADER_PASSWORD'],
|
98
|
+
'X_B3_TRACEID' => trace_id,
|
99
|
+
'User-Agent' => "#{Napa::Identity.name}/#{Napa::Identity.revision}"
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.production?
|
104
|
+
(ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'production'
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module CrudClient
|
2
|
+
class Request
|
3
|
+
attr_reader :id
|
4
|
+
|
5
|
+
def initialize(*args)
|
6
|
+
@args = *args
|
7
|
+
@id = extract_id
|
8
|
+
end
|
9
|
+
|
10
|
+
def options
|
11
|
+
@args.any? ? @args.first.to_hash : {}
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
def extract_id
|
16
|
+
@args.shift unless @args.first.is_a?(Hash)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/crud_client.rb
ADDED
data/lib/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Kernel::silence_warnings { Imprint::Tracer.const_set('TRACER_HEADER', 'HTTP_X_B3_TRACEID') }
|
@@ -0,0 +1,105 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'crud_client/crud_client'
|
3
|
+
|
4
|
+
class PapaFake
|
5
|
+
end
|
6
|
+
class PapaFake::FakeService < CrudClient::CrudClient
|
7
|
+
end
|
8
|
+
|
9
|
+
module Imprint
|
10
|
+
class Tracer
|
11
|
+
def self.get_trace_id
|
12
|
+
'some-trace-id'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe CrudClient::CrudClient do
|
18
|
+
ENV['PAPA_FAKE_URL'] = "http://localhost:9292"
|
19
|
+
ENV['SERVICE_NAME'] = "fake-service"
|
20
|
+
context 'when making class level requests' do
|
21
|
+
it 'performs a get' do
|
22
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
23
|
+
expect(method).to eq(:get)
|
24
|
+
expect(url).to eq("http://localhost:9292/fake_services/1")
|
25
|
+
}.and_return('{}')
|
26
|
+
PapaFake::FakeService.get("1")
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'performs a show (get)' do
|
30
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
31
|
+
expect(method).to eq(:get)
|
32
|
+
expect(url).to eq("http://localhost:9292/fake_services/1")
|
33
|
+
}.and_return('{}')
|
34
|
+
PapaFake::FakeService.show("1")
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'performs an arbitrary call' do
|
38
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
39
|
+
expect(method).to eq(:get)
|
40
|
+
expect(url).to eq("http://localhost:9292/fake_services/cookie")
|
41
|
+
}.and_return('{}')
|
42
|
+
PapaFake::FakeService.get("cookie")
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'when the get request contains a hash' do
|
46
|
+
it 'performs an index' do
|
47
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
48
|
+
expect(method).to eq(:get)
|
49
|
+
expect(url).to eq("http://localhost:9292/fake_services/")
|
50
|
+
expect(options).to eq({ foo: 'bar' })
|
51
|
+
}.and_return('{}')
|
52
|
+
PapaFake::FakeService.get(foo: 'bar')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context 'when the get request contains nothing' do
|
57
|
+
it 'performs an index' do
|
58
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
59
|
+
expect(method).to eq(:get)
|
60
|
+
expect(url).to eq("http://localhost:9292/fake_services/")
|
61
|
+
expect(options).to eq({})
|
62
|
+
}.and_return('{}')
|
63
|
+
PapaFake::FakeService.get
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'performs a post' do
|
68
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
69
|
+
expect(method).to eq(:post)
|
70
|
+
expect(url).to eq("http://localhost:9292/fake_services/")
|
71
|
+
expect(options).to eq({ foo: 'bar' })
|
72
|
+
}.and_return('{}')
|
73
|
+
PapaFake::FakeService.post(foo: 'bar')
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'performs a put' do
|
77
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
78
|
+
expect(method).to eq(:put)
|
79
|
+
expect(url).to eq("http://localhost:9292/fake_services/1")
|
80
|
+
expect(options).to eq({ foo: 'bar' })
|
81
|
+
}.and_return('{}')
|
82
|
+
PapaFake::FakeService.put("1", foo: 'bar')
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'performs a delete' do
|
86
|
+
PapaFake::FakeService.should_receive(:issue_request){ |method, url, options|
|
87
|
+
expect(method).to eq(:delete)
|
88
|
+
expect(url).to eq("http://localhost:9292/fake_services/1")
|
89
|
+
expect(options).to eq({ foo: 'bar' })
|
90
|
+
}.and_return('{}')
|
91
|
+
PapaFake::FakeService.delete("1", foo: 'bar')
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'adds a tracer bullet to the request' do
|
95
|
+
PapaFake::FakeService.issue_request(:get, '/', {})
|
96
|
+
expect(PapaFake::FakeService.headers['X_B3_TRACEID'].empty?).to_not be true
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'adds a User-Agent header to the request' do
|
100
|
+
PapaFake::FakeService.issue_request(:get, '/', {})
|
101
|
+
expect(PapaFake::FakeService.headers['User-Agent']).to include(ENV['SERVICE_NAME'])
|
102
|
+
expect(PapaFake::FakeService.headers['User-Agent']).to match(/\/.+\z/)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/spec/init_spec.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'crud_client/request'
|
3
|
+
|
4
|
+
describe CrudClient::Request do
|
5
|
+
describe '#extract_id' do
|
6
|
+
it 'returns the id if the first arg is not a hash' do
|
7
|
+
request = CrudClient::Request.new(123, {foo: 'bar', bar: 'baz'})
|
8
|
+
expect(request.id).to eq(123)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns nil if the first arg is hash' do
|
12
|
+
request = CrudClient::Request.new({foo: 'bar', bar: 'baz'})
|
13
|
+
expect(request.id).to be_nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '#options' do
|
18
|
+
it 'returns a hash of options if supplied' do
|
19
|
+
request = CrudClient::Request.new({foo: 'bar', bar: 'baz'})
|
20
|
+
expect(request.options.class).to be(Hash)
|
21
|
+
expect(request.options[:foo]).to eq('bar')
|
22
|
+
expect(request.options[:bar]).to eq('baz')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns an empty hash if no options are supplied' do
|
26
|
+
request = CrudClient::Request.new()
|
27
|
+
expect(request.options.class).to be(Hash)
|
28
|
+
expect(request.options).to eq({})
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'returns an empty hash if only an id is supplied' do
|
32
|
+
request = CrudClient::Request.new(123)
|
33
|
+
expect(request.options.class).to be(Hash)
|
34
|
+
expect(request.options).to eq({})
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,290 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: crud_client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jay OConnor
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
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: faraday_middleware
|
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: hashie
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: celluloid
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: celluloid-io
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: imprint
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: napa
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: bundler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.3'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.3'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: pry
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: git
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rubocop
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: guard-rspec
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - '>='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - '>='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: simplecov
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - '>='
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
description: Easy connections to APIs
|
238
|
+
email:
|
239
|
+
- jay@bellycard.com
|
240
|
+
executables: []
|
241
|
+
extensions: []
|
242
|
+
extra_rdoc_files: []
|
243
|
+
files:
|
244
|
+
- .gitignore
|
245
|
+
- .ruby-gemset
|
246
|
+
- .ruby-version
|
247
|
+
- Gemfile
|
248
|
+
- LICENSE.txt
|
249
|
+
- README.md
|
250
|
+
- Rakefile
|
251
|
+
- crud_client.gemspec
|
252
|
+
- lib/crud_client.rb
|
253
|
+
- lib/crud_client/crud_client.rb
|
254
|
+
- lib/crud_client/future_wrapper.rb
|
255
|
+
- lib/crud_client/request.rb
|
256
|
+
- lib/crud_client/version.rb
|
257
|
+
- lib/init.rb
|
258
|
+
- spec/crud_client_spec.rb
|
259
|
+
- spec/init_spec.rb
|
260
|
+
- spec/request_spec.rb
|
261
|
+
- spec/spec_helper.rb
|
262
|
+
homepage: ''
|
263
|
+
licenses:
|
264
|
+
- ''
|
265
|
+
metadata: {}
|
266
|
+
post_install_message:
|
267
|
+
rdoc_options: []
|
268
|
+
require_paths:
|
269
|
+
- lib
|
270
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
271
|
+
requirements:
|
272
|
+
- - '>='
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: '0'
|
275
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
277
|
+
- - '>='
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: '0'
|
280
|
+
requirements: []
|
281
|
+
rubyforge_project:
|
282
|
+
rubygems_version: 2.2.2
|
283
|
+
signing_key:
|
284
|
+
specification_version: 4
|
285
|
+
summary: Easy connections to APIs
|
286
|
+
test_files:
|
287
|
+
- spec/crud_client_spec.rb
|
288
|
+
- spec/init_spec.rb
|
289
|
+
- spec/request_spec.rb
|
290
|
+
- spec/spec_helper.rb
|