oktakit 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -0,0 +1,3 @@
1
+ module Oktakit
2
+ VERSION = '0.1.0'.freeze
3
+ end
@@ -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: