omniauth-cgtrader 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +0 -1
- data/README.md +26 -8
- data/lib/cgtrader/version.rb +1 -1
- data/omniauth-cgtrader.gemspec +12 -12
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6b71fdc9259266d587a812e55a96e15ea1f32220522d482de2610c32f79d4f
|
4
|
+
data.tar.gz: e67355bb64fa2ce24a46ef78104d4c723624d986d114184f2600fc3b49b91253
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 548ce0fa1a8eea2a91b6facafec01b6e4f008b1930d77efde1599793d30bcf0829e8665e4170d287d6ea67566f1271068fd0641cd3bb47fcd959cc215442fa57
|
7
|
+
data.tar.gz: 25608cb6911e93b0e2ae21264dd55bf13210f9d05516e867f6223e178cf7814947f0b8b1dcfcb778beffa878216f7990053cfe778aacfcf87055f01a3ec1aaac
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [2.0.2] - 2023-07-25
|
2
|
+
|
3
|
+
### Chore
|
4
|
+
|
5
|
+
- Updated gemspec ([commit](https://github.com/CGTrader/omniauth-cgtrader/commit/13aae9cb45f0a821c248cf435c96c9941ebea607)).
|
6
|
+
|
7
|
+
## [2.0.1] - 2023-07-24
|
8
|
+
|
9
|
+
### Chore
|
10
|
+
|
11
|
+
- Updated README.md ([commit](https://github.com/CGTrader/omniauth-cgtrader/commit/b1b7850b66661be3b9e13fa2ec39b629b8f259af)).
|
12
|
+
|
1
13
|
## [2.0.0] - 2023-06-13
|
2
14
|
|
3
15
|
### Changed
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,21 +4,19 @@ Cgtrader OAuth2 Strategy for OmniAuth.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add
|
7
|
+
Add to your `Gemfile`:
|
8
8
|
|
9
9
|
```ruby
|
10
10
|
gem 'omniauth-cgtrader'
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
Then `bundle install`.
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
Or install it yourself as:
|
15
|
+
## Usage
|
18
16
|
|
19
|
-
|
17
|
+
`OmniAuth::Strategies::Cgtrader` is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
|
20
18
|
|
21
|
-
|
19
|
+
Here's a quick example, adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
|
22
20
|
|
23
21
|
```ruby
|
24
22
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
@@ -26,6 +24,26 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
26
24
|
end
|
27
25
|
```
|
28
26
|
|
29
|
-
## Auth
|
27
|
+
## Auth Hash
|
28
|
+
|
29
|
+
Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
{
|
33
|
+
provider: 'cgtrader',
|
34
|
+
uid: '1234567',
|
35
|
+
info: {
|
36
|
+
id: '123',
|
37
|
+
email: 'joe@bloggs.com',
|
38
|
+
username: 'joe_bloggs',
|
39
|
+
is_admin: false,
|
40
|
+
avatar_url: 'https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png'
|
41
|
+
},
|
42
|
+
}
|
43
|
+
```
|
30
44
|
|
31
45
|
## Devise
|
46
|
+
|
47
|
+
See these on how to use this gem with Devise, replacing Google / Facebook with Cgtrader:
|
48
|
+
* https://github.com/zquestz/omniauth-google-oauth2/blob/master/README.md#devise
|
49
|
+
* https://github.com/heartcombo/devise/wiki/OmniAuth:-Overview
|
data/lib/cgtrader/version.rb
CHANGED
data/omniauth-cgtrader.gemspec
CHANGED
@@ -5,20 +5,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'cgtrader/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
8
|
+
spec.name = 'omniauth-cgtrader'
|
9
|
+
spec.version = Omniauth::Cgtrader::VERSION
|
10
|
+
spec.authors = ['devaudrius, mihkelal']
|
11
|
+
spec.email = ['audrius@cgtrader.com, mihkelal@cgtrader.com']
|
12
12
|
|
13
|
-
spec.summary
|
14
|
-
spec.homepage
|
15
|
-
spec.license
|
13
|
+
spec.summary = 'CGTrader OAuth2 Strategy for OmniAuth'
|
14
|
+
spec.homepage = 'https://github.com/CGTrader/omniauth-cgtrader'
|
15
|
+
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
spec.
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
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
22
|
|
23
23
|
spec.add_dependency 'omniauth-oauth2', '~> 1.8'
|
24
24
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-cgtrader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- devaudrius, mihkelal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -55,7 +55,7 @@ files:
|
|
55
55
|
- lib/omniauth-cgtrader.rb
|
56
56
|
- lib/omniauth/strategies/cgtrader.rb
|
57
57
|
- omniauth-cgtrader.gemspec
|
58
|
-
homepage: https://github.com/CGTrader/cgtrader
|
58
|
+
homepage: https://github.com/CGTrader/omniauth-cgtrader
|
59
59
|
licenses:
|
60
60
|
- MIT
|
61
61
|
metadata: {}
|
@@ -67,14 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
70
|
+
version: '2.0'
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.4.
|
77
|
+
rubygems_version: 3.4.17
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: CGTrader OAuth2 Strategy for OmniAuth
|