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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a471de6fd6e55dda0c2ebd647eecccdbcfe66d0ff52e4366e965fcbd357f4eb
4
- data.tar.gz: 9c22a71ab57370527abb4b96ade0868023304a89938ef80b6da611be6bf58798
3
+ metadata.gz: 3f6b71fdc9259266d587a812e55a96e15ea1f32220522d482de2610c32f79d4f
4
+ data.tar.gz: e67355bb64fa2ce24a46ef78104d4c723624d986d114184f2600fc3b49b91253
5
5
  SHA512:
6
- metadata.gz: d2c33c8bbe56145773cc57492cc73005a35f09ae73ccfa3e7c0bc4e06b8f36214ee1e5940a926421640c8690afb9d0980ffe91501a12fe8cfad0a51275c870ca
7
- data.tar.gz: c5a82277784913468177283104a8097d10aeb07ec64cfccf04be0dbb561a0c415ca943e165cc0089f12a67fe85cf299c4e63c82ef1ab55b29a636225b991e081
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
@@ -4,4 +4,3 @@ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in omniauth-cgtrader.gemspec
6
6
  gemspec
7
- gem "rake", "~> 13.0"
data/README.md CHANGED
@@ -4,21 +4,19 @@ Cgtrader OAuth2 Strategy for OmniAuth.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ Add to your `Gemfile`:
8
8
 
9
9
  ```ruby
10
10
  gem 'omniauth-cgtrader'
11
11
  ```
12
12
 
13
- And then execute:
13
+ Then `bundle install`.
14
14
 
15
- $ bundle
16
-
17
- Or install it yourself as:
15
+ ## Usage
18
16
 
19
- $ gem install omniauth-cgtrader
17
+ `OmniAuth::Strategies::Cgtrader` is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
20
18
 
21
- ## Usage
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 hash
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Cgtrader
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.2'
6
6
  end
7
7
  end
@@ -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 = 'omniauth-cgtrader'
9
- spec.version = Omniauth::Cgtrader::VERSION
10
- spec.authors = ['devaudrius, mihkelal']
11
- spec.email = ['audrius@cgtrader.com, mihkelal@cgtrader.com']
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 = 'CGTrader OAuth2 Strategy for OmniAuth'
14
- spec.homepage = 'https://github.com/CGTrader/cgtrader-omniauth'
15
- spec.license = 'MIT'
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 = `git ls-files -z`.split("\x0").reject do |f|
18
- f.match(%r{^(test|spec|features)/})
19
- end
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ['lib']
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.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-24 00:00:00.000000000 Z
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-omniauth
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.9
77
+ rubygems_version: 3.4.17
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: CGTrader OAuth2 Strategy for OmniAuth