omniauth-identity 2.0.0 → 3.0.4
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 +4 -4
- data/CHANGELOG.md +61 -1
- data/CODE_OF_CONDUCT.md +133 -0
- data/LICENSE +2 -1
- data/README.md +256 -0
- data/lib/omniauth-identity.rb +2 -0
- data/lib/omniauth-identity/version.rb +3 -1
- data/lib/omniauth/identity.rb +4 -1
- data/lib/omniauth/identity/model.rb +13 -11
- data/lib/omniauth/identity/models/active_record.rb +4 -1
- data/lib/omniauth/identity/models/couch_potato.rb +3 -4
- data/lib/omniauth/identity/models/mongoid.rb +3 -7
- data/lib/omniauth/identity/models/no_brainer.rb +30 -0
- data/lib/omniauth/identity/models/sequel.rb +37 -0
- data/lib/omniauth/identity/secure_password.rb +4 -4
- data/lib/omniauth/strategies/identity.rb +92 -39
- data/spec/omniauth/identity/model_spec.rb +36 -33
- data/spec/omniauth/identity/models/active_record_spec.rb +23 -9
- data/spec/omniauth/identity/models/couch_potato_spec.rb +13 -8
- data/spec/omniauth/identity/models/mongoid_spec.rb +16 -11
- data/spec/omniauth/identity/models/no_brainer_spec.rb +17 -0
- data/spec/omniauth/identity/models/sequel_spec.rb +23 -0
- data/spec/omniauth/identity/secure_password_spec.rb +10 -8
- data/spec/omniauth/strategies/identity_spec.rb +174 -61
- data/spec/spec_helper.rb +17 -8
- metadata +60 -97
- data/.gitignore +0 -6
- data/.rspec +0 -3
- data/Gemfile +0 -13
- data/Guardfile +0 -10
- data/README.markdown +0 -204
- data/Rakefile +0 -9
- data/lib/omniauth/identity/models/data_mapper.rb +0 -32
- data/omniauth-identity.gemspec +0 -32
- data/spec/omniauth/identity/models/data_mapper_spec.rb +0 -24
data/Rakefile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'dm-core'
|
2
|
-
require 'dm-validations'
|
3
|
-
|
4
|
-
module OmniAuth
|
5
|
-
module Identity
|
6
|
-
module Models
|
7
|
-
module DataMapper
|
8
|
-
def self.included(base)
|
9
|
-
base.class_eval do
|
10
|
-
include OmniAuth::Identity::Model
|
11
|
-
include OmniAuth::Identity::SecurePassword
|
12
|
-
|
13
|
-
# http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-persisted-3F
|
14
|
-
# http://rubydoc.info/github/mongoid/mongoid/master/Mongoid/State#persisted%3F-instance_method
|
15
|
-
alias persisted? valid?
|
16
|
-
|
17
|
-
has_secure_password
|
18
|
-
|
19
|
-
def self.auth_key=(key)
|
20
|
-
super
|
21
|
-
validates_uniqueness_of :key
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.locate(search_hash)
|
25
|
-
all(search_hash).first
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end # DataMapper
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/omniauth-identity.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require File.dirname(__FILE__) + '/lib/omniauth-identity/version'
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
gem.add_runtime_dependency 'omniauth'
|
6
|
-
gem.add_runtime_dependency 'bcrypt'
|
7
|
-
|
8
|
-
gem.add_development_dependency 'maruku'
|
9
|
-
gem.add_development_dependency 'simplecov'
|
10
|
-
gem.add_development_dependency 'rack-test'
|
11
|
-
gem.add_development_dependency 'rake'
|
12
|
-
gem.add_development_dependency 'rspec', '~> 3'
|
13
|
-
gem.add_development_dependency 'activerecord'
|
14
|
-
gem.add_development_dependency 'mongoid'
|
15
|
-
gem.add_development_dependency 'datamapper'
|
16
|
-
gem.add_development_dependency 'bson_ext'
|
17
|
-
gem.add_development_dependency 'byebug'
|
18
|
-
gem.add_development_dependency 'couch_potato'
|
19
|
-
|
20
|
-
gem.name = 'omniauth-identity'
|
21
|
-
gem.version = OmniAuth::Identity::VERSION
|
22
|
-
gem.description = %q{Internal authentication handlers for OmniAuth.}
|
23
|
-
gem.summary = gem.description
|
24
|
-
gem.homepage = 'http://github.com/omniauth/omniauth-identity'
|
25
|
-
gem.authors = ['Andrew Roberts', 'Michael Bleigh']
|
26
|
-
gem.license = 'MIT'
|
27
|
-
gem.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
|
28
|
-
gem.files = `git ls-files`.split("\n")
|
29
|
-
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
30
|
-
gem.require_paths = ['lib']
|
31
|
-
gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if gem.respond_to? :required_rubygems_version=
|
32
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
describe(OmniAuth::Identity::Models::DataMapper, :db => true) do
|
2
|
-
class DataMapperTestIdentity
|
3
|
-
include DataMapper::Resource
|
4
|
-
include OmniAuth::Identity::Models::DataMapper
|
5
|
-
|
6
|
-
property :id, Serial
|
7
|
-
auth_key :ham_sandwich
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
|
-
before :all do
|
12
|
-
DataMapper.finalize
|
13
|
-
@resource = DataMapperTestIdentity.new
|
14
|
-
end
|
15
|
-
|
16
|
-
describe 'model', type: :model do
|
17
|
-
subject { DataMapperTestIdentity }
|
18
|
-
|
19
|
-
it 'should delegate locate to the all query method' do
|
20
|
-
allow(subject).to receive(:all).with('ham_sandwich' => 'open faced', 'category' => 'sandwiches').and_return(['wakka'])
|
21
|
-
expect(subject.locate('ham_sandwich' => 'open faced', 'category' => 'sandwiches')).to eq('wakka')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|