omniauth-clearbit 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bb4db608d4d5fdef52ad6cb1a6bfa889c01a6cc2
4
+ data.tar.gz: d416baf8f2648cdb30dc9bee58c985f7f15fbcb0
5
+ SHA512:
6
+ metadata.gz: 96eb98eb53a89b1e40132fc79e16dfa4d8e053f7707bbe9de868869cc28d5d28dbb80a106a5410a4c09723c852433b04222e3e3c75ecdcb44f3ec5d1bde66036
7
+ data.tar.gz: 582458751da8be0d725e4c3f53c11492aa27385ebed54c1318d97f6f9b49b2d3d27300a0d275d40bcd8aa7947f9fb90b96332da524240be30652e6167f0a6a11
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ /pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-github.gemspec
4
+ gemspec
5
+
6
+ group :development, :test do
7
+ gem 'guard'
8
+ gem 'guard-rspec'
9
+ gem 'guard-bundler'
10
+ gem 'rb-fsevent'
11
+ gem 'growl'
12
+ end
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2016 Clearbit
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,9 @@
1
+ # OmniAuth Clearbit
2
+
3
+ This is the official OmniAuth strategy for authenticating to Clearbit.
4
+
5
+ ## Basic Usage
6
+
7
+ use OmniAuth::Builder do
8
+ provider :clearbit, ENV['CLEARBIT_KEY'], ENV['CLEARBIT_SECRET']
9
+ end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ desc 'Run specs'
8
+ task :default => :spec
@@ -0,0 +1,2 @@
1
+ require 'omniauth-clearbit/version'
2
+ require 'omniauth/strategies/clearbit'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Clearbit
3
+ VERSION = "1.1.2"
4
+ end
5
+ end
@@ -0,0 +1,30 @@
1
+ module OmniAuth
2
+ module Strategies
3
+ class Clearbit < OmniAuth::Strategies::OAuth2
4
+ option :client_options, {
5
+ site: 'https://clearbit.com',
6
+ authorize_url: 'https://clearbit.com/oauth/authorize',
7
+ token_url: 'https://clearbit.com/oauth/access_token'
8
+ }
9
+
10
+ uid { raw_info['id'].to_s }
11
+
12
+ info do
13
+ {
14
+ 'email' => raw_info['user']['email'],
15
+ 'name' => raw_info['user']['name'],
16
+ 'plans' => raw_info['plans']
17
+ }
18
+ end
19
+
20
+ extra do
21
+ { :raw_info => raw_info }
22
+ end
23
+
24
+ def raw_info
25
+ access_token.options[:mode] = :query
26
+ @raw_info ||= access_token.get('/oauth/account').parsed
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/omniauth-clearbit/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Alex MacCaw"]
6
+ gem.email = ["alex@clearbit.com"]
7
+ gem.description = %q{Official OmniAuth strategy for Clearbit.}
8
+ gem.summary = %q{Official OmniAuth strategy for Clearbit.}
9
+ gem.homepage = "https://clearbit.com/clearbit/omniauth-clearbit"
10
+ gem.license = "MIT"
11
+
12
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
13
+ gem.files = `git ls-files`.split("\n")
14
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ gem.name = "omniauth-clearbit"
16
+ gem.require_paths = ["lib"]
17
+ gem.version = OmniAuth::Clearbit::VERSION
18
+
19
+ gem.add_dependency 'omniauth', '~> 1.0'
20
+ # Nothing lower than omniauth-oauth2 1.1.1
21
+ # http://www.rubysec.com/advisories/CVE-2012-6134/
22
+ gem.add_dependency 'omniauth-oauth2', '>= 1.1.1', '< 2.0'
23
+ gem.add_development_dependency 'rspec', '~> 2.7'
24
+ gem.add_development_dependency 'rack-test'
25
+ gem.add_development_dependency 'simplecov'
26
+ gem.add_development_dependency 'webmock'
27
+ end
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-clearbit
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Alex MacCaw
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: omniauth-oauth2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.1
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.1
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '2.7'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.7'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rack-test
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: simplecov
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: webmock
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ description: Official OmniAuth strategy for Clearbit.
104
+ email:
105
+ - alex@clearbit.com
106
+ executables: []
107
+ extensions: []
108
+ extra_rdoc_files: []
109
+ files:
110
+ - ".gitignore"
111
+ - ".rspec"
112
+ - Gemfile
113
+ - LICENSE.txt
114
+ - README.md
115
+ - Rakefile
116
+ - lib/omniauth-clearbit.rb
117
+ - lib/omniauth-clearbit/version.rb
118
+ - lib/omniauth/strategies/clearbit.rb
119
+ - omniauth-clearbit.gemspec
120
+ homepage: https://clearbit.com/clearbit/omniauth-clearbit
121
+ licenses:
122
+ - MIT
123
+ metadata: {}
124
+ post_install_message:
125
+ rdoc_options: []
126
+ require_paths:
127
+ - lib
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ requirements: []
139
+ rubyforge_project:
140
+ rubygems_version: 2.5.1
141
+ signing_key:
142
+ specification_version: 4
143
+ summary: Official OmniAuth strategy for Clearbit.
144
+ test_files: []