omniauth-accredify 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62dcad4a9160c6995acc582789bb26a2dbfade08
4
- data.tar.gz: a742c6b6fee707e62827461fca298b3df6348600
3
+ metadata.gz: 71cedb436cf0fb2a2376039ff1308c7c6c2b7451
4
+ data.tar.gz: 919450921cacef9f707f4397782fd057a96bec21
5
5
  SHA512:
6
- metadata.gz: 7d6c1cc3d1b52da3c9d2370fb097845822b42ff4ab6d8cb23064ce5bfc8a732c7d9f10992987e93c1b268d6f77ed60762b79dc9e8fd1476cb36cf7ee8f35ee7e
7
- data.tar.gz: 979139d45923c69ecfb30c522c7326544a36c4e243135f0315e478b4513f3958b3c260e004b37aca19a38d8fb4c5688cd9ac8a4256cc397a003044287b0f8e8b
6
+ metadata.gz: b1b71e36e5b588a849dde4f1fbcb26234565f0452aae42b00dd31d0c39733c254355843654776a33a9cc10bcb191fcedf4c4124d0de1a993a32d0994c751aacf
7
+ data.tar.gz: 8d4c150a9a43fae9cc74e4725cce3a1464b73c5e119b340a6aced92aeacbb93d4e842c1f5519ea8d32427557e473ac96a38ea981f5e9009c1047c37e17707041
@@ -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-angellist.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,10 @@
1
+ guard 'rspec', :version => 2 do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
6
+
7
+ guard 'bundler' do
8
+ watch('Gemfile')
9
+ watch('omniauth-accredify.gemspec')
10
+ end
@@ -0,0 +1 @@
1
+ # Init
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc 'Default: run specs.'
6
+ task :default => :spec
7
+
8
+ desc "Run specs"
9
+ RSpec::Core::RakeTask.new
10
+
11
+ desc 'Run specs'
12
+ task :default => :spec
@@ -0,0 +1,2 @@
1
+ require "omniauth-accredify/version"
2
+ require 'omniauth/strategies/accredify'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Accredify
3
+ VERSION = "0.0.8"
4
+ end
5
+ end
@@ -0,0 +1,33 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Accredify < OmniAuth::Strategies::OAuth2
6
+ option :client_options, {
7
+ :site => 'https://api.accredify.com',
8
+ :authorize_url => 'https://api.accredify.com/oauth/authorize',
9
+ :token_url => 'https://api.accredify.com/oauth/token'
10
+ }
11
+
12
+ def request_phase
13
+ super
14
+ end
15
+
16
+ uid { user_data['id'] }
17
+
18
+ info do
19
+ {
20
+ 'email' => user_data['email'],
21
+ }
22
+ end
23
+
24
+ def user_data
25
+ access_token.options[:mode] = :query
26
+ user_data ||= access_token.get('/api/v1/me.json').parsed
27
+ end
28
+
29
+ end
30
+ end
31
+ end
32
+
33
+ OmniAuth.config.add_camelization 'accredify', 'Accredify'
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/omniauth-accredify/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'omniauth-accredify'
6
+ gem.version = OmniAuth::Accredify::VERSION
7
+ gem.authors = ['Peter Martinez']
8
+ gem.email = ['Peter@Accredify.com']
9
+ gem.summary = 'Accredify OAuth2 Strategy for OmniAuth'
10
+ gem.homepage = 'https://github.com/PeterMartinez/omniauth-accredify.git'
11
+ gem.license = 'MIT'
12
+ gem.description = %q{OmniAuth strategy for Accredify.}
13
+ gem.summary = %q{OmniAuth strategy for Accredify.}
14
+ gem.homepage = "https://api.accredify.com"
15
+
16
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ gem.files = `git ls-files`.split("\n")
18
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ gem.name = "omniauth-accredify"
20
+ gem.require_paths = ["lib"]
21
+ gem.version = OmniAuth::Accredify::VERSION
22
+
23
+ gem.add_dependency 'omniauth', '~> 1.0'
24
+ gem.add_dependency 'omniauth-oauth2', '~> 1.0'
25
+ gem.add_development_dependency 'rspec', '~> 2.7'
26
+ gem.add_development_dependency 'rack-test'
27
+ gem.add_development_dependency 'simplecov'
28
+ gem.add_development_dependency 'webmock'
29
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe OmniAuth::Strategies::Accredify do
4
+ it 'should do some testing' do
5
+ pending
6
+ end
7
+ end
@@ -0,0 +1,16 @@
1
+ $:.unshift File.expand_path('..', __FILE__)
2
+ $:.unshift File.expand_path('../../lib', __FILE__)
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+ require 'rspec'
6
+ require 'rack/test'
7
+ require 'webmock/rspec'
8
+ require 'omniauth'
9
+ require 'omniauth-accredify'
10
+
11
+ RSpec.configure do |config|
12
+ config.include WebMock::API
13
+ config.include Rack::Test::Methods
14
+ config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
15
+ end
16
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-accredify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Martinez
@@ -100,7 +100,19 @@ email:
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
- files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - Gemfile
107
+ - Guardfile
108
+ - README.md
109
+ - Rakefile
110
+ - lib/omniauth-accredify.rb
111
+ - lib/omniauth-accredify/version.rb
112
+ - lib/omniauth/strategies/accredify.rb
113
+ - omniauth-accredify.gemspec
114
+ - spec/omniauth/strategies/accredify_spec.rb
115
+ - spec/spec_helper.rb
104
116
  homepage: https://api.accredify.com
105
117
  licenses:
106
118
  - MIT
@@ -125,4 +137,6 @@ rubygems_version: 2.2.2
125
137
  signing_key:
126
138
  specification_version: 4
127
139
  summary: OmniAuth strategy for Accredify.
128
- test_files: []
140
+ test_files:
141
+ - spec/omniauth/strategies/accredify_spec.rb
142
+ - spec/spec_helper.rb