omniauth-cgtrader 2.0.0 → 2.0.1

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
  SHA256:
3
- metadata.gz: 6a471de6fd6e55dda0c2ebd647eecccdbcfe66d0ff52e4366e965fcbd357f4eb
4
- data.tar.gz: 9c22a71ab57370527abb4b96ade0868023304a89938ef80b6da611be6bf58798
3
+ metadata.gz: 93139450e38378ddc160a928958213fb43435b4e39aab767e97831a00c3191e9
4
+ data.tar.gz: 72d863bfe4805bf3ed5f883637fc032843a823cef7104e20b634b20e6cba7399
5
5
  SHA512:
6
- metadata.gz: d2c33c8bbe56145773cc57492cc73005a35f09ae73ccfa3e7c0bc4e06b8f36214ee1e5940a926421640c8690afb9d0980ffe91501a12fe8cfad0a51275c870ca
7
- data.tar.gz: c5a82277784913468177283104a8097d10aeb07ec64cfccf04be0dbb561a0c415ca943e165cc0089f12a67fe85cf299c4e63c82ef1ab55b29a636225b991e081
6
+ metadata.gz: 1d41a08ac2b764c1cbee75ca4a64f86f57e742d08e909ab6ed097c0cfd5a6cdc9cba0bc4a952c901cd39a2029e646e151774c85136da74a7a1cc7eb3eb561d2d
7
+ data.tar.gz: daeb2bc330ab1911ba81215f2588a82af13cafdb7b6c9307d7d91c5448c7cda6a954a8c160875ad4303ea2c2addfd1db063b6fa74b45b827babc1d78c21e9c80
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.0.1] - 2023-07-24
2
+
3
+ ### Chore
4
+
5
+ - Updated README.md ([commit](https://github.com/CGTrader/omniauth-cgtrader/commit/b1b7850b66661be3b9e13fa2ec39b629b8f259af)).
6
+
1
7
  ## [2.0.0] - 2023-06-13
2
8
 
3
9
  ### 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.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - devaudrius, mihkelal