oktakit 0.1.0
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 +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +84 -0
- data/.travis.yml +6 -0
- data/Gemfile +13 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/Rakefile +19 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/dev.yml +11 -0
- data/lib/oktakit.rb +8 -0
- data/lib/oktakit/client.rb +165 -0
- data/lib/oktakit/client/admin_roles.rb +160 -0
- data/lib/oktakit/client/apps.rb +363 -0
- data/lib/oktakit/client/events.rb +20 -0
- data/lib/oktakit/client/factors.rb +223 -0
- data/lib/oktakit/client/groups.rb +149 -0
- data/lib/oktakit/client/identity_providers.rb +274 -0
- data/lib/oktakit/client/schemas.rb +65 -0
- data/lib/oktakit/client/templates.rb +99 -0
- data/lib/oktakit/client/users.rb +290 -0
- data/lib/oktakit/error.rb +166 -0
- data/lib/oktakit/response/raise_error.rb +19 -0
- data/lib/oktakit/version.rb +3 -0
- data/oktakit.gemspec +25 -0
- metadata +101 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'oktakit/error'
|
3
|
+
|
4
|
+
module Oktakit
|
5
|
+
# Faraday response middleware
|
6
|
+
module Response
|
7
|
+
# This class raises an Oktakit-flavored exception based
|
8
|
+
# HTTP status codes returned by the API
|
9
|
+
class RaiseError < Faraday::Response::Middleware
|
10
|
+
private
|
11
|
+
|
12
|
+
def on_complete(response)
|
13
|
+
if error = Oktakit::Error.from_response(response)
|
14
|
+
raise error
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/oktakit.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'oktakit/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'oktakit'
|
8
|
+
spec.version = Oktakit::VERSION
|
9
|
+
spec.authors = ['Graeme Johnson', 'Julian Nadeau']
|
10
|
+
spec.email = ['graeme.johnson@shopify.com', 'julian@shopify.com']
|
11
|
+
|
12
|
+
spec.summary = 'Ruby toolkit for working with the Okta API'
|
13
|
+
spec.homepage = 'https://github.com/shopify/oktakit'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = 'exe'
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.required_ruby_version = '>= 2.0'
|
22
|
+
|
23
|
+
spec.add_dependency 'sawyer', '~> 0.6.0'
|
24
|
+
spec.add_development_dependency 'bundler'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: oktakit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Graeme Johnson
|
8
|
+
- Julian Nadeau
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-07-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: sawyer
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.6.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.6.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
description:
|
43
|
+
email:
|
44
|
+
- graeme.johnson@shopify.com
|
45
|
+
- julian@shopify.com
|
46
|
+
executables: []
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- ".gitignore"
|
51
|
+
- ".rspec"
|
52
|
+
- ".rubocop.yml"
|
53
|
+
- ".travis.yml"
|
54
|
+
- Gemfile
|
55
|
+
- LICENSE.txt
|
56
|
+
- README.md
|
57
|
+
- Rakefile
|
58
|
+
- bin/console
|
59
|
+
- bin/setup
|
60
|
+
- dev.yml
|
61
|
+
- lib/oktakit.rb
|
62
|
+
- lib/oktakit/client.rb
|
63
|
+
- lib/oktakit/client/admin_roles.rb
|
64
|
+
- lib/oktakit/client/apps.rb
|
65
|
+
- lib/oktakit/client/events.rb
|
66
|
+
- lib/oktakit/client/factors.rb
|
67
|
+
- lib/oktakit/client/groups.rb
|
68
|
+
- lib/oktakit/client/identity_providers.rb
|
69
|
+
- lib/oktakit/client/schemas.rb
|
70
|
+
- lib/oktakit/client/templates.rb
|
71
|
+
- lib/oktakit/client/users.rb
|
72
|
+
- lib/oktakit/error.rb
|
73
|
+
- lib/oktakit/response/raise_error.rb
|
74
|
+
- lib/oktakit/version.rb
|
75
|
+
- oktakit.gemspec
|
76
|
+
homepage: https://github.com/shopify/oktakit
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '2.0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.5.1
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Ruby toolkit for working with the Okta API
|
100
|
+
test_files: []
|
101
|
+
has_rdoc:
|