identity-api-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/.document +5 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +121 -0
- data/LICENSE +19 -0
- data/README.md +16 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/identity-api-client.gemspec +85 -0
- data/lib/identity-api-client/base.rb +5 -0
- data/lib/identity-api-client/client.rb +19 -0
- data/lib/identity-api-client/member.rb +10 -0
- data/lib/identity-api-client.rb +14 -0
- data/spec/client_spec.rb +19 -0
- data/spec/fixtures/details.json +1 -0
- data/spec/fixtures/request.json +1 -0
- data/spec/member_spec.rb +26 -0
- data/spec/spec_helper.rb +42 -0
- metadata +192 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3483daf289dcda276b0adceaf912f9c289055a5b
|
4
|
+
data.tar.gz: c03fad40d2ab0c117456de8703d2544bf39647dd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5d7b76363632a30fdf5d517a770cda5cf8a482957b19a06201139ed217a252d6b6a59a7b54aef9ddc3ae9e11bd34e5be237bb1f1ec9fcdec6ac0e3cf48adc820
|
7
|
+
data.tar.gz: 2cf5b9359075d5ce46133d724205044c99eda806416b01052c668d99b108020c9a24a6f06e1a5894975f550cdaa2ff7ca189ff1b2ca5b61b4b4bf50fa097169a
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
identity-api-client
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.3
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
gem 'vertebrae'
|
3
|
+
|
4
|
+
# Add dependencies to develop your gem here.
|
5
|
+
# Include everything needed to run rake, tests, features, etc.
|
6
|
+
group :development do
|
7
|
+
gem 'pry'
|
8
|
+
gem 'pry-byebug'
|
9
|
+
gem 'webmock'
|
10
|
+
gem "rspec", "~> 3.5.0"
|
11
|
+
gem "rdoc", "~> 3.12"
|
12
|
+
gem "bundler", "~> 1.0"
|
13
|
+
gem "juwelier", "~> 2.1.0"
|
14
|
+
gem "simplecov", ">= 0"
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (5.0.2)
|
5
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
6
|
+
i18n (~> 0.7)
|
7
|
+
minitest (~> 5.1)
|
8
|
+
tzinfo (~> 1.1)
|
9
|
+
addressable (2.4.0)
|
10
|
+
builder (3.2.3)
|
11
|
+
byebug (9.0.6)
|
12
|
+
coderay (1.1.1)
|
13
|
+
concurrent-ruby (1.0.5)
|
14
|
+
crack (0.4.3)
|
15
|
+
safe_yaml (~> 1.0.0)
|
16
|
+
descendants_tracker (0.0.4)
|
17
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
18
|
+
diff-lcs (1.3)
|
19
|
+
docile (1.1.5)
|
20
|
+
faraday (0.9.2)
|
21
|
+
multipart-post (>= 1.2, < 3)
|
22
|
+
faraday_middleware (0.11.0.1)
|
23
|
+
faraday (>= 0.7.4, < 1.0)
|
24
|
+
git (1.3.0)
|
25
|
+
github_api (0.14.5)
|
26
|
+
addressable (~> 2.4.0)
|
27
|
+
descendants_tracker (~> 0.0.4)
|
28
|
+
faraday (~> 0.8, < 0.10)
|
29
|
+
hashie (>= 3.4)
|
30
|
+
oauth2 (~> 1.0)
|
31
|
+
hashdiff (0.3.2)
|
32
|
+
hashie (3.5.5)
|
33
|
+
highline (1.7.8)
|
34
|
+
i18n (0.8.1)
|
35
|
+
json (1.8.6)
|
36
|
+
juwelier (2.1.3)
|
37
|
+
builder
|
38
|
+
bundler (>= 1.13)
|
39
|
+
git (>= 1.2.5)
|
40
|
+
github_api
|
41
|
+
highline (>= 1.6.15)
|
42
|
+
nokogiri (>= 1.5.10)
|
43
|
+
rake
|
44
|
+
rdoc
|
45
|
+
semver
|
46
|
+
jwt (1.5.6)
|
47
|
+
method_source (0.8.2)
|
48
|
+
mini_portile2 (2.1.0)
|
49
|
+
minitest (5.10.1)
|
50
|
+
multi_json (1.12.1)
|
51
|
+
multi_xml (0.6.0)
|
52
|
+
multipart-post (2.0.0)
|
53
|
+
nokogiri (1.7.0.1)
|
54
|
+
mini_portile2 (~> 2.1.0)
|
55
|
+
oauth2 (1.3.1)
|
56
|
+
faraday (>= 0.8, < 0.12)
|
57
|
+
jwt (~> 1.0)
|
58
|
+
multi_json (~> 1.3)
|
59
|
+
multi_xml (~> 0.5)
|
60
|
+
rack (>= 1.2, < 3)
|
61
|
+
pry (0.10.4)
|
62
|
+
coderay (~> 1.1.0)
|
63
|
+
method_source (~> 0.8.1)
|
64
|
+
slop (~> 3.4)
|
65
|
+
pry-byebug (3.4.2)
|
66
|
+
byebug (~> 9.0)
|
67
|
+
pry (~> 0.10)
|
68
|
+
rack (2.0.1)
|
69
|
+
rake (12.0.0)
|
70
|
+
rdoc (3.12.2)
|
71
|
+
json (~> 1.4)
|
72
|
+
rspec (3.5.0)
|
73
|
+
rspec-core (~> 3.5.0)
|
74
|
+
rspec-expectations (~> 3.5.0)
|
75
|
+
rspec-mocks (~> 3.5.0)
|
76
|
+
rspec-core (3.5.4)
|
77
|
+
rspec-support (~> 3.5.0)
|
78
|
+
rspec-expectations (3.5.0)
|
79
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
+
rspec-support (~> 3.5.0)
|
81
|
+
rspec-mocks (3.5.0)
|
82
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
+
rspec-support (~> 3.5.0)
|
84
|
+
rspec-support (3.5.0)
|
85
|
+
safe_yaml (1.0.4)
|
86
|
+
semver (1.0.1)
|
87
|
+
simplecov (0.13.0)
|
88
|
+
docile (~> 1.1.0)
|
89
|
+
json (>= 1.8, < 3)
|
90
|
+
simplecov-html (~> 0.10.0)
|
91
|
+
simplecov-html (0.10.0)
|
92
|
+
slop (3.6.0)
|
93
|
+
thread_safe (0.3.6)
|
94
|
+
tzinfo (1.2.2)
|
95
|
+
thread_safe (~> 0.1)
|
96
|
+
vertebrae (0.4.1)
|
97
|
+
activesupport
|
98
|
+
faraday (>= 0.9.2)
|
99
|
+
faraday_middleware
|
100
|
+
hashie
|
101
|
+
webmock (2.3.2)
|
102
|
+
addressable (>= 2.3.6)
|
103
|
+
crack (>= 0.3.2)
|
104
|
+
hashdiff
|
105
|
+
|
106
|
+
PLATFORMS
|
107
|
+
ruby
|
108
|
+
|
109
|
+
DEPENDENCIES
|
110
|
+
bundler (~> 1.0)
|
111
|
+
juwelier (~> 2.1.0)
|
112
|
+
pry
|
113
|
+
pry-byebug
|
114
|
+
rdoc (~> 3.12)
|
115
|
+
rspec (~> 3.5.0)
|
116
|
+
simplecov
|
117
|
+
vertebrae
|
118
|
+
webmock
|
119
|
+
|
120
|
+
BUNDLED WITH
|
121
|
+
1.14.6
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2015 ChangeSprout, Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# identity-api-client
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/controlshift/identity-api-client.svg?branch=master)](https://travis-ci.org/controlshift/identity-api-client)
|
4
|
+
|
5
|
+
API Client for 38 Degree's Identity API
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
identity = IdentityApiClient.new(host: 'id.test.com', api_token: 'abc123')
|
11
|
+
person = identity.member.details('abc123')
|
12
|
+
person.first_name
|
13
|
+
=> 'Jane'
|
14
|
+
person.last_name
|
15
|
+
=> 'Smith'
|
16
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'juwelier'
|
15
|
+
Juwelier::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "identity-api-client"
|
18
|
+
gem.homepage = "http://github.com/controlshift/identity-api-client"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{API Client for 38 Degree's Identity API}
|
21
|
+
gem.description = %Q{Provides a simple ruby binding to 38dgs identity API}
|
22
|
+
gem.email = 'nathan@controlshiftlabs.com'
|
23
|
+
gem.authors = ['Nathan Woodhull']
|
24
|
+
|
25
|
+
# dependencies defined in Gemfile
|
26
|
+
end
|
27
|
+
Juwelier::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
32
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['spec'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :spec
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "identity-api-client #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: identity-api-client 0.0.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "identity-api-client".freeze
|
9
|
+
s.version = "0.0.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Nathan Woodhull".freeze]
|
14
|
+
s.date = "2017-03-14"
|
15
|
+
s.description = "Provides a simple ruby binding to 38dgs identity API".freeze
|
16
|
+
s.email = "nathan@controlshiftlabs.com".freeze
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
".ruby-gemset",
|
25
|
+
".ruby-version",
|
26
|
+
".travis.yml",
|
27
|
+
"Gemfile",
|
28
|
+
"Gemfile.lock",
|
29
|
+
"LICENSE",
|
30
|
+
"README.md",
|
31
|
+
"Rakefile",
|
32
|
+
"VERSION",
|
33
|
+
"identity-api-client.gemspec",
|
34
|
+
"lib/identity-api-client.rb",
|
35
|
+
"lib/identity-api-client/base.rb",
|
36
|
+
"lib/identity-api-client/client.rb",
|
37
|
+
"lib/identity-api-client/member.rb",
|
38
|
+
"spec/client_spec.rb",
|
39
|
+
"spec/fixtures/details.json",
|
40
|
+
"spec/fixtures/request.json",
|
41
|
+
"spec/member_spec.rb",
|
42
|
+
"spec/spec_helper.rb"
|
43
|
+
]
|
44
|
+
s.homepage = "http://github.com/controlshift/identity-api-client".freeze
|
45
|
+
s.licenses = ["MIT".freeze]
|
46
|
+
s.rubygems_version = "2.6.8".freeze
|
47
|
+
s.summary = "API Client for 38 Degree's Identity API".freeze
|
48
|
+
|
49
|
+
if s.respond_to? :specification_version then
|
50
|
+
s.specification_version = 4
|
51
|
+
|
52
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<vertebrae>.freeze, [">= 0"])
|
54
|
+
s.add_development_dependency(%q<pry>.freeze, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
58
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
59
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
60
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
61
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<vertebrae>.freeze, [">= 0"])
|
64
|
+
s.add_dependency(%q<pry>.freeze, [">= 0"])
|
65
|
+
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
66
|
+
s.add_dependency(%q<webmock>.freeze, [">= 0"])
|
67
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
68
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
69
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
70
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
71
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
72
|
+
end
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<vertebrae>.freeze, [">= 0"])
|
75
|
+
s.add_dependency(%q<pry>.freeze, [">= 0"])
|
76
|
+
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
77
|
+
s.add_dependency(%q<webmock>.freeze, [">= 0"])
|
78
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
79
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
80
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
81
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
82
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module IdentityApiClient
|
2
|
+
class Client < Vertebrae::API
|
3
|
+
def member
|
4
|
+
@member ||= IdentityApiClient::Member.new(client: self)
|
5
|
+
end
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def extract_data_from_params(params)
|
10
|
+
params.to_json
|
11
|
+
end
|
12
|
+
|
13
|
+
def default_options
|
14
|
+
{
|
15
|
+
user_agent: 'IdentityApiClient'
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'vertebrae'
|
2
|
+
require 'identity-api-client/client'
|
3
|
+
require 'identity-api-client/base'
|
4
|
+
require 'identity-api-client/member'
|
5
|
+
|
6
|
+
module IdentityApiClient
|
7
|
+
extend Vertebrae::Base
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def new(options = {}, &block)
|
11
|
+
IdentityApiClient::Client.new(options, &block)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe IdentityApiClient::Client do
|
4
|
+
let(:options) { { :host => 'foo.bar.com', :api_token => 'abc123' }}
|
5
|
+
subject { described_class.new(options) }
|
6
|
+
|
7
|
+
it 'should respond to member' do
|
8
|
+
expect(subject).to respond_to(:member)
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'setup options ' do
|
12
|
+
let(:config) { subject.connection.configuration }
|
13
|
+
|
14
|
+
it 'should initialize the options' do
|
15
|
+
expect(config.host).to eq 'foo.bar.com'
|
16
|
+
expect(config.options[:api_token]).to eq 'abc123'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"first_name": "Joe", "last_name": "Bloggs", "email": "joe@bloggs.com"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"guid":"abcdef1234567890","api_token":"1234567890abcdef"}
|
data/spec/member_spec.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe IdentityApiClient::Member do
|
4
|
+
subject { IdentityApiClient.new(host: 'test.com', api_token: '1234567890abcdef') }
|
5
|
+
|
6
|
+
let(:request_path) { '/api/member/details' }
|
7
|
+
let(:request_body) { fixture('request.json').chomp }
|
8
|
+
|
9
|
+
describe 'success' do
|
10
|
+
let(:status) { 200 }
|
11
|
+
let(:body) { fixture('details.json') }
|
12
|
+
|
13
|
+
before(:each) do
|
14
|
+
stub_post(request_path).with(body: request_body).to_return(:body => body, :status => status,
|
15
|
+
:headers => {:content_type => "application/json; charset=utf-8"})
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should get member details back from the API' do
|
19
|
+
resp = subject.member.details('abcdef1234567890')
|
20
|
+
|
21
|
+
expect(resp.first_name).to eq('Joe')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'identity-api-client'
|
5
|
+
require 'webmock/rspec'
|
6
|
+
|
7
|
+
|
8
|
+
# Requires supporting files with custom matchers and macros, etc,
|
9
|
+
# in ./support/ and its subdirectories.
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.color = true
|
14
|
+
config.include WebMock::API
|
15
|
+
|
16
|
+
config.before(:each) do
|
17
|
+
WebMock.reset!
|
18
|
+
end
|
19
|
+
config.after(:each) do
|
20
|
+
WebMock.reset!
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def stub_get(path)
|
25
|
+
stub_identity_request(:get, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
def stub_post(path)
|
29
|
+
stub_identity_request(:post, path)
|
30
|
+
end
|
31
|
+
|
32
|
+
def stub_identity_request(method, path)
|
33
|
+
stub_request(method, "https://test.com" + path)
|
34
|
+
end
|
35
|
+
|
36
|
+
def fixture_path
|
37
|
+
File.expand_path("../fixtures", __FILE__)
|
38
|
+
end
|
39
|
+
|
40
|
+
def fixture(file)
|
41
|
+
File.new(File.join(fixture_path, '/', file)).read
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: identity-api-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nathan Woodhull
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: vertebrae
|
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: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
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: pry-byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
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: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
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: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rdoc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.12'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.12'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: juwelier
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.1.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.1.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Provides a simple ruby binding to 38dgs identity API
|
140
|
+
email: nathan@controlshiftlabs.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files:
|
144
|
+
- LICENSE
|
145
|
+
- README.md
|
146
|
+
files:
|
147
|
+
- ".document"
|
148
|
+
- ".rspec"
|
149
|
+
- ".ruby-gemset"
|
150
|
+
- ".ruby-version"
|
151
|
+
- ".travis.yml"
|
152
|
+
- Gemfile
|
153
|
+
- Gemfile.lock
|
154
|
+
- LICENSE
|
155
|
+
- README.md
|
156
|
+
- Rakefile
|
157
|
+
- VERSION
|
158
|
+
- identity-api-client.gemspec
|
159
|
+
- lib/identity-api-client.rb
|
160
|
+
- lib/identity-api-client/base.rb
|
161
|
+
- lib/identity-api-client/client.rb
|
162
|
+
- lib/identity-api-client/member.rb
|
163
|
+
- spec/client_spec.rb
|
164
|
+
- spec/fixtures/details.json
|
165
|
+
- spec/fixtures/request.json
|
166
|
+
- spec/member_spec.rb
|
167
|
+
- spec/spec_helper.rb
|
168
|
+
homepage: http://github.com/controlshift/identity-api-client
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata: {}
|
172
|
+
post_install_message:
|
173
|
+
rdoc_options: []
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
requirements: []
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 2.6.8
|
189
|
+
signing_key:
|
190
|
+
specification_version: 4
|
191
|
+
summary: API Client for 38 Degree's Identity API
|
192
|
+
test_files: []
|