omniauth-dotloop 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +183 -0
- data/.travis.yml +20 -0
- data/Gemfile +4 -0
- data/LICENSE.md +19 -0
- data/README.md +37 -0
- data/Rakefile +18 -0
- data/example/Gemfile +4 -0
- data/example/README.md +32 -0
- data/example/app.rb +27 -0
- data/example/config.ru +11 -0
- data/lib/omniauth-dotloop.rb +3 -0
- data/lib/omniauth-dotloop/version.rb +5 -0
- data/lib/omniauth/strategies/dotloop.rb +53 -0
- data/omniauth-dotloop.gemspec +25 -0
- data/spec/omniauth/strategies/dotloop_spec.rb +39 -0
- data/spec/spec_helper.rb +11 -0
- metadata +133 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 10bff2b7ae65da3f279fc6b06cc916a4edc0b28d
|
4
|
+
data.tar.gz: 3d18a00477fe7606bf1e75bbd5300da3091c209e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5364025d736ae0fd2cfb7fded2efb4525d29f372ad710a5ee6547f2e9c10bb2a94542690022c58c78702dc9effbf66a9f9a32e51565b742d4825344774ecbc66
|
7
|
+
data.tar.gz: 1e22b680fd2d97c514ce2c5c49c81a5da0ed844ac80f076bd287f52bce3d0868ddb68f206133bb26bf1b2c28c46dc2e33b897aea480a589fcd49ba2566b2ab08
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
Style/AlignParameters:
|
2
|
+
# Alignment of parameters in multi-line method calls.
|
3
|
+
#
|
4
|
+
# The `with_first_parameter` style aligns the following lines along the same
|
5
|
+
# column as the first parameter.
|
6
|
+
#
|
7
|
+
# method_call(a,
|
8
|
+
# b)
|
9
|
+
#
|
10
|
+
# The `with_fixed_indentation` style aligns the following lines with one
|
11
|
+
# level of indentation relative to the start of the line with the method call.
|
12
|
+
#
|
13
|
+
# method_call(a,
|
14
|
+
# b)
|
15
|
+
EnforcedStyle: with_fixed_indentation
|
16
|
+
SupportedStyles:
|
17
|
+
- with_first_parameter
|
18
|
+
- with_fixed_indentation
|
19
|
+
|
20
|
+
Style/BracesAroundHashParameters:
|
21
|
+
EnforcedStyle: context_dependent
|
22
|
+
SupportedStyles:
|
23
|
+
# The `braces` style enforces braces around all method parameters that are
|
24
|
+
# hashes.
|
25
|
+
- braces
|
26
|
+
# The `no_braces` style checks that the last parameter doesn't have braces
|
27
|
+
# around it.
|
28
|
+
- no_braces
|
29
|
+
# The `context_dependent` style checks that the last parameter doesn't have
|
30
|
+
# braces around it, but requires braces if the second to last parameter is
|
31
|
+
# also a hash literal.
|
32
|
+
- context_dependent
|
33
|
+
|
34
|
+
# Indentation of `when`.
|
35
|
+
Style/CaseIndentation:
|
36
|
+
EnforcedStyle: end
|
37
|
+
SupportedStyles:
|
38
|
+
- case
|
39
|
+
- end
|
40
|
+
IndentOneStep: false
|
41
|
+
|
42
|
+
Style/ClassAndModuleChildren:
|
43
|
+
# Checks the style of children definitions at classes and modules.
|
44
|
+
#
|
45
|
+
# Basically there are two different styles:
|
46
|
+
#
|
47
|
+
# `nested` - have each child on a separate line
|
48
|
+
# class Foo
|
49
|
+
# class Bar
|
50
|
+
# end
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# `compact` - combine definitions as much as possible
|
54
|
+
# class Foo::Bar
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# The compact style is only forced, for classes / modules with one child.
|
58
|
+
EnforcedStyle: nested
|
59
|
+
SupportedStyles:
|
60
|
+
- nested
|
61
|
+
- compact
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Style/CommandLiteral:
|
65
|
+
EnforcedStyle: mixed
|
66
|
+
# backticks: Always use backticks.
|
67
|
+
# percent_x: Always use %x.
|
68
|
+
# mixed: Use backticks on single-line commands, and %x on multi-line commands.
|
69
|
+
SupportedStyles:
|
70
|
+
- backticks
|
71
|
+
- percent_x
|
72
|
+
- mixed
|
73
|
+
# If false, the cop will always recommend using %x if one or more backticks
|
74
|
+
# are found in the command string.
|
75
|
+
AllowInnerBackticks: false
|
76
|
+
|
77
|
+
Style/HashSyntax:
|
78
|
+
EnforcedStyle: hash_rockets
|
79
|
+
SupportedStyles:
|
80
|
+
- ruby19
|
81
|
+
- hash_rockets
|
82
|
+
|
83
|
+
# Checks the indentation of the first element in an array literal.
|
84
|
+
Style/IndentArray:
|
85
|
+
# The value `special_inside_parentheses` means that array literals with
|
86
|
+
# brackets that have their opening bracket on the same line as a surrounding
|
87
|
+
# opening round parenthesis, shall have their first element indented relative
|
88
|
+
# to the first position inside the parenthesis.
|
89
|
+
#
|
90
|
+
# The value `consistent` means that the indentation of the first element shall
|
91
|
+
# always be relative to the first position of the line where the opening
|
92
|
+
# bracket is.
|
93
|
+
#
|
94
|
+
# The value `align_brackets` means that the indentation of the first element
|
95
|
+
# shall always be relative to the position of the opening bracket.
|
96
|
+
EnforcedStyle: consistent
|
97
|
+
SupportedStyles:
|
98
|
+
- special_inside_parentheses
|
99
|
+
- consistent
|
100
|
+
- align_brackets
|
101
|
+
# By default, the indentation width from Style/IndentationWidth is used
|
102
|
+
# But it can be overridden by setting this parameter
|
103
|
+
IndentationWidth: ~
|
104
|
+
|
105
|
+
# Checks the indentation of the first key in a hash literal.
|
106
|
+
Style/IndentHash:
|
107
|
+
# The value `special_inside_parentheses` means that hash literals with braces
|
108
|
+
# that have their opening brace on the same line as a surrounding opening
|
109
|
+
# round parenthesis, shall have their first key indented relative to the
|
110
|
+
# first position inside the parenthesis.
|
111
|
+
# The value `consistent` means that the indentation of the first key shall
|
112
|
+
# always be relative to the first position of the line where the opening
|
113
|
+
# brace is.
|
114
|
+
EnforcedStyle: consistent
|
115
|
+
SupportedStyles:
|
116
|
+
- special_inside_parentheses
|
117
|
+
- consistent
|
118
|
+
|
119
|
+
Style/MultilineMethodCallIndentation:
|
120
|
+
EnforcedStyle: indented
|
121
|
+
SupportedStyles:
|
122
|
+
- aligned
|
123
|
+
- indented
|
124
|
+
# By default, the indentation width from Style/IndentationWidth is used
|
125
|
+
# But it can be overridden by setting this parameter
|
126
|
+
IndentationWidth: ~
|
127
|
+
|
128
|
+
Style/MultilineOperationIndentation:
|
129
|
+
EnforcedStyle: indented
|
130
|
+
SupportedStyles:
|
131
|
+
- aligned
|
132
|
+
- indented
|
133
|
+
|
134
|
+
Style/SymbolProc:
|
135
|
+
IgnoredMethods:
|
136
|
+
- proc
|
137
|
+
- respond_to
|
138
|
+
|
139
|
+
# Enforces: "Provide an exception class and message as arguments to raise."
|
140
|
+
# Overly restrictive when testing ActiveRecord errors
|
141
|
+
# EG: ActiveRecord::RecordInvalid.new(model_with_errs) doesn't take a message
|
142
|
+
Style/RaiseArgs:
|
143
|
+
Enabled: false
|
144
|
+
|
145
|
+
##################### Metrics #############################
|
146
|
+
|
147
|
+
Metrics/BlockLength:
|
148
|
+
Enabled: false
|
149
|
+
|
150
|
+
Metrics/ClassLength:
|
151
|
+
CountComments: false # count full line comments?
|
152
|
+
Max: 100
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Metrics/MethodLength:
|
156
|
+
CountComments: false # count full line comments?
|
157
|
+
Max: 10
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Metrics/ModuleLength:
|
161
|
+
Enabled: false
|
162
|
+
|
163
|
+
Metrics/LineLength:
|
164
|
+
Max: 120
|
165
|
+
|
166
|
+
##################### Lint ################################
|
167
|
+
|
168
|
+
Lint/AssignmentInCondition:
|
169
|
+
Description: "Don't use assignment in conditions."
|
170
|
+
Enabled: false
|
171
|
+
|
172
|
+
##################### Performance #########################
|
173
|
+
|
174
|
+
# Performance improvement is negligible and the readability is poor. See:
|
175
|
+
# https://github.com/bbatsov/rubocop/issues/2614
|
176
|
+
Performance/Casecmp:
|
177
|
+
Enabled: false
|
178
|
+
|
179
|
+
##################### Rails ###############################
|
180
|
+
|
181
|
+
Rails/ActionFilter:
|
182
|
+
Description: 'Enforces consistent use of action filter methods.'
|
183
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copied from:
|
2
|
+
# https://github.com/omniauth/omniauth/blob/master/.travis.yml
|
3
|
+
before_install: gem update bundler
|
4
|
+
cache: bundler
|
5
|
+
env:
|
6
|
+
global:
|
7
|
+
- JRUBY_OPTS="$JRUBY_OPTS --debug"
|
8
|
+
language: ruby
|
9
|
+
rvm:
|
10
|
+
- jruby-9000
|
11
|
+
- 2.1.10 # EOL Soon
|
12
|
+
- 2.2.6
|
13
|
+
- 2.3.3
|
14
|
+
- 2.4.0
|
15
|
+
- ruby-head
|
16
|
+
matrix:
|
17
|
+
allow_failures:
|
18
|
+
- rvm: ruby-head
|
19
|
+
fast_finish: true
|
20
|
+
sudo: false
|
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) 2017 Contactually, 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
|
11
|
+
all 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
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# OmniAuth Dotloop
|
2
|
+
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/omniauth-dotloop.svg)][gem]
|
4
|
+
[![Build Status](http://img.shields.io/travis/contactually/omniauth-dotloop.svg)][travis]
|
5
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/contactually/omniauth-dotloop.svg)][codeclimate]
|
6
|
+
|
7
|
+
[gem]: https://rubygems.org/gems/omniauth-dotloop
|
8
|
+
[travis]: http://travis-ci.org/contactually/omniauth-dotloop
|
9
|
+
[codeclimate]: https://codeclimate.com/github/contactually/omniauth-dotloop
|
10
|
+
|
11
|
+
Gem to authenticate applications to Dotloop via OAuth2.
|
12
|
+
|
13
|
+
# Background
|
14
|
+
Dotloop has a full API (docs at https://dotloop.github.io/public-api/) and uses to OAuth2 for authentication (https://dotloop.github.io/public-api/#authentication).
|
15
|
+
|
16
|
+
# Setup
|
17
|
+
Register for your OAuth2 credentials by creating a client at https://www.dotloop.com/my/account/#/clients.
|
18
|
+
|
19
|
+
NOTE: You'll need at least `Account Access: Read` to use this strategy.
|
20
|
+
|
21
|
+
## Standard setup:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
# Add to your initializers/omniauth.rb
|
25
|
+
|
26
|
+
use OmniAuth::Builder do
|
27
|
+
provider :dotloop, ENV['DOTLOOP_APP_ID'], ENV['DOTLOOP_APP_SECRET']
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
## Setup with Devise:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
# Add to your devise.rb
|
35
|
+
|
36
|
+
config.omniauth :dotloop, ENV['DOTLOOP_APP_ID'], ENV['DOTLOOP_APP_SECRET']
|
37
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
RSpec::Core::RakeTask.new
|
6
|
+
|
7
|
+
task :test => :spec
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'rubocop/rake_task'
|
11
|
+
RuboCop::RakeTask.new
|
12
|
+
rescue LoadError
|
13
|
+
task :rubocop do
|
14
|
+
$stderr.puts 'RuboCop is disabled'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
task :default => [:spec, :rubocop]
|
data/example/Gemfile
ADDED
data/example/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Example App
|
2
|
+
|
3
|
+
This folder contains a sample Sinatra app to test the Dotloop OAuth2 flow.
|
4
|
+
|
5
|
+
## Setup
|
6
|
+
|
7
|
+
Ensure your Dotloop App ID and Secret are available in the environment:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
export DOTLOOP_APP_ID=YOUR_APP_ID_HERE
|
11
|
+
export DOTLOOP_APP_SECRET=YOUR_APP_SECRET_HERE
|
12
|
+
```
|
13
|
+
|
14
|
+
Run bundle install from the command line:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
bundle install
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Run the app:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
rackup -p 4567
|
26
|
+
```
|
27
|
+
|
28
|
+
NOTE: Since Dotloop requires SSL, you'll probably need to set up a tunnel using a service like ngrok:
|
29
|
+
|
30
|
+
```bash
|
31
|
+
ngrok http -subdomain=some-custom-subdomain 4567
|
32
|
+
```
|
data/example/app.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
|
3
|
+
# Configure sinatra
|
4
|
+
set :run, false
|
5
|
+
set :raise_errors, true
|
6
|
+
set :protection, :except => [:json_csrf]
|
7
|
+
|
8
|
+
# Setup logging to file
|
9
|
+
log = File.new('app.log', 'a+')
|
10
|
+
$stdout.reopen(log)
|
11
|
+
$stderr.reopen(log)
|
12
|
+
$stderr.sync = true
|
13
|
+
$stdout.sync = true
|
14
|
+
|
15
|
+
get '/' do
|
16
|
+
redirect '/auth/dotloop'
|
17
|
+
end
|
18
|
+
|
19
|
+
get '/auth/:provider/callback' do
|
20
|
+
content_type 'application/json'
|
21
|
+
MultiJson.encode(request.env)
|
22
|
+
end
|
23
|
+
|
24
|
+
get '/auth/failure' do
|
25
|
+
content_type 'application/json'
|
26
|
+
MultiJson.encode(request.env)
|
27
|
+
end
|
data/example/config.ru
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'omniauth-dotloop'
|
3
|
+
require './app.rb'
|
4
|
+
|
5
|
+
use Rack::Session::Cookie, :secret => 'abc123'
|
6
|
+
|
7
|
+
use OmniAuth::Builder do
|
8
|
+
provider :dotloop, ENV['DOTLOOP_APP_ID'], ENV['DOTLOOP_APP_SECRET']
|
9
|
+
end
|
10
|
+
|
11
|
+
run Sinatra::Application
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
# Authentication strategy for connecting with the Dotloop API.
|
6
|
+
class Dotloop < OmniAuth::Strategies::OAuth2
|
7
|
+
# Give your strategy a name.
|
8
|
+
option :name, 'dotloop'
|
9
|
+
|
10
|
+
# This is where you pass the options you would pass when
|
11
|
+
# initializing your consumer from the OAuth gem.
|
12
|
+
option :client_options, :site => 'https://api-gateway.dotloop.com/public/v2/',
|
13
|
+
:authorize_url => 'https://auth.dotloop.com/oauth/authorize',
|
14
|
+
:token_url => 'https://auth.dotloop.com/oauth/token',
|
15
|
+
:auth_scheme => :basic_auth
|
16
|
+
|
17
|
+
# These are called after authentication has succeeded. If
|
18
|
+
# possible, you should try to set the UID without making
|
19
|
+
# additional calls (if the user id is returned with the token
|
20
|
+
# or as a URI parameter). This may not be possible with all
|
21
|
+
# providers.
|
22
|
+
uid { raw_info['id'] }
|
23
|
+
|
24
|
+
# https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema#schema-10-and-later
|
25
|
+
info do
|
26
|
+
{
|
27
|
+
:name => name_from_raw_info,
|
28
|
+
:email => raw_info['email'],
|
29
|
+
:first_name => raw_info['firstName'],
|
30
|
+
:last_name => raw_info['lastName']
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
extra do
|
35
|
+
{
|
36
|
+
:raw_info => raw_info
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
def raw_info
|
41
|
+
@raw_info ||= access_token.get('account').parsed['data']
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def name_from_raw_info
|
47
|
+
return unless raw_info['firstName'] || raw_info['lastName']
|
48
|
+
|
49
|
+
"#{raw_info['firstName']} #{raw_info['lastName']}".strip
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.expand_path('../lib/omniauth-dotloop/version', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.authors = 'Contactually'
|
5
|
+
gem.email = 'api@contactually.com'
|
6
|
+
gem.description = 'OmniAuth OAuth2 strategy for Contactually.'
|
7
|
+
gem.summary = gem.description
|
8
|
+
gem.homepage = 'https://github.com/dotloop/omniauth-dotloop'
|
9
|
+
gem.licenses = %w(MIT)
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = 'omniauth-dotloop'
|
15
|
+
gem.require_paths = %w(lib)
|
16
|
+
gem.version = OmniAuth::Dotloop::VERSION
|
17
|
+
|
18
|
+
# Lock at 1.3.x due to https://github.com/intridea/omniauth-oauth2/issues/81
|
19
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.3.1'
|
20
|
+
|
21
|
+
gem.add_development_dependency 'rack-test'
|
22
|
+
gem.add_development_dependency 'rake'
|
23
|
+
gem.add_development_dependency 'rspec'
|
24
|
+
gem.add_development_dependency 'rubocop'
|
25
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OmniAuth::Strategies::OAuth2 do
|
4
|
+
def app
|
5
|
+
->(_env) { [200, {}, ['Hello.']] }
|
6
|
+
end
|
7
|
+
|
8
|
+
let(:strategy) do
|
9
|
+
OmniAuth::Strategies::Dotloop.new(nil, @options || {}).tap do |strategy|
|
10
|
+
allow(strategy).to receive(:request) { @request }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
before do
|
15
|
+
@request = double('Request')
|
16
|
+
allow(@request).to receive(:params) { {} }
|
17
|
+
OmniAuth.config.test_mode = true
|
18
|
+
end
|
19
|
+
|
20
|
+
after do
|
21
|
+
OmniAuth.config.test_mode = false
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'client options' do
|
25
|
+
subject { strategy.options.client_options }
|
26
|
+
|
27
|
+
it 'has correct api site' do
|
28
|
+
expect(subject.site).to eq('https://api-gateway.dotloop.com/public/v2/')
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'has correct access token path' do
|
32
|
+
expect(subject.token_url).to eq('https://auth.dotloop.com/oauth/token')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'has correct authorize url' do
|
36
|
+
expect(subject.authorize_url).to eq('https://auth.dotloop.com/oauth/authorize')
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('..', __FILE__)
|
2
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
|
4
|
+
require 'rspec'
|
5
|
+
require 'rack/test'
|
6
|
+
require 'omniauth-dotloop'
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
|
10
|
+
config.include Rack::Test::Methods
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-dotloop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Contactually
|
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: omniauth-oauth2
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rack-test
|
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: rake
|
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: rspec
|
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: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: OmniAuth OAuth2 strategy for Contactually.
|
84
|
+
email: api@contactually.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- ".gitignore"
|
90
|
+
- ".rspec"
|
91
|
+
- ".rubocop.yml"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE.md
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- example/Gemfile
|
98
|
+
- example/README.md
|
99
|
+
- example/app.rb
|
100
|
+
- example/config.ru
|
101
|
+
- lib/omniauth-dotloop.rb
|
102
|
+
- lib/omniauth-dotloop/version.rb
|
103
|
+
- lib/omniauth/strategies/dotloop.rb
|
104
|
+
- omniauth-dotloop.gemspec
|
105
|
+
- spec/omniauth/strategies/dotloop_spec.rb
|
106
|
+
- spec/spec_helper.rb
|
107
|
+
homepage: https://github.com/dotloop/omniauth-dotloop
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.5.1
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: OmniAuth OAuth2 strategy for Contactually.
|
131
|
+
test_files:
|
132
|
+
- spec/omniauth/strategies/dotloop_spec.rb
|
133
|
+
- spec/spec_helper.rb
|