omniauth-figma 0.0.1 → 1.0.0

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: 2b6d30e44d219cfd458ad70be16eb3973da5e79d5ef6e79d6ee6ca1a36a4d725
4
- data.tar.gz: e4b5064cdb93f6f24259c196567f723c93c2a0285068cc962c6dbb1db914e933
3
+ metadata.gz: 93c128d56e0121966e56654abc9385ff4bb406ff8d363e8db89fc06373fb8aff
4
+ data.tar.gz: 1785f2a451c9bcb6d3c43a1af7aba86099c22893f2397b485c387a3a78cfbbf8
5
5
  SHA512:
6
- metadata.gz: cd05172745a87ef9a71f4c38cbc91815d70301d82aba6867997bae49b2dcb50c94d3cf5998fb7fb1eeb40a9eb940ba656182b6c3300fafa646de2ce79ae7ef3d
7
- data.tar.gz: 5e7ce5b8840656f420cf3df04a67346248f7d1338e4c6de4171db29a855a800038ff6387350b1520c3467bdf4264082a92f4d48fd6b3d36fb6524a09c9747d58
6
+ metadata.gz: 17a73dd683fae8c4eb86cab1a4f126ced89415815fdcf646d5317a632a595ea4f2a6a5431e23b12bb03e6fc19f81f9f14a5c36c30d2ca6a190336ec662b0fb96
7
+ data.tar.gz: 8a95dda1212922251edd51568d11d99103e3c7cdd1c6a749242bde4caed9cbb7e4ab0c01b7fd836b48a4d9905725c969c15f7818da60dded5c95759092e6db10
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.3
7
+ before_install: gem install bundler -v 1.17.2
data/Gemfile CHANGED
@@ -2,13 +2,11 @@ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
- group :test do
6
- gem "json", :platforms => %i[jruby ruby_18 ruby_19]
7
- gem "mime-types", "~> 1.25", :platforms => %i[jruby ruby_18]
8
- gem "rack-test"
9
- gem "rest-client", "~> 1.8.0", :platforms => %i[jruby ruby_18]
10
- gem "rspec", "~> 3.2"
11
- gem "rubocop", ">= 0.51", :platforms => %i[ruby_19 ruby_20 ruby_21 ruby_22 ruby_23 ruby_24]
5
+ group :test do
6
+ gem 'rspec'
7
+ gem 'rack-test'
8
+ gem 'simplecov'
9
+ gem 'webmock'
12
10
  end
13
11
 
14
12
  # Specify your gem's dependencies in omniauth-figma.gemspec
@@ -0,0 +1,80 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-figma (0.0.1)
5
+ omniauth (~> 1.9)
6
+ omniauth-oauth2 (~> 1.6)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.6.0)
12
+ public_suffix (>= 2.0.2, < 4.0)
13
+ crack (0.4.3)
14
+ safe_yaml (~> 1.0.0)
15
+ diff-lcs (1.3)
16
+ docile (1.3.2)
17
+ faraday (0.15.4)
18
+ multipart-post (>= 1.2, < 3)
19
+ hashdiff (1.0.0)
20
+ hashie (3.6.0)
21
+ json (2.2.0)
22
+ jwt (2.2.1)
23
+ multi_json (1.13.1)
24
+ multi_xml (0.6.0)
25
+ multipart-post (2.1.1)
26
+ oauth2 (1.4.1)
27
+ faraday (>= 0.8, < 0.16.0)
28
+ jwt (>= 1.0, < 3.0)
29
+ multi_json (~> 1.3)
30
+ multi_xml (~> 0.5)
31
+ rack (>= 1.2, < 3)
32
+ omniauth (1.9.0)
33
+ hashie (>= 3.4.6, < 3.7.0)
34
+ rack (>= 1.6.2, < 3)
35
+ omniauth-oauth2 (1.6.0)
36
+ oauth2 (~> 1.1)
37
+ omniauth (~> 1.9)
38
+ public_suffix (3.1.1)
39
+ rack (2.0.7)
40
+ rack-test (1.1.0)
41
+ rack (>= 1.0, < 3)
42
+ rake (10.5.0)
43
+ rspec (3.8.0)
44
+ rspec-core (~> 3.8.0)
45
+ rspec-expectations (~> 3.8.0)
46
+ rspec-mocks (~> 3.8.0)
47
+ rspec-core (3.8.2)
48
+ rspec-support (~> 3.8.0)
49
+ rspec-expectations (3.8.4)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.8.0)
52
+ rspec-mocks (3.8.1)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.8.0)
55
+ rspec-support (3.8.2)
56
+ safe_yaml (1.0.5)
57
+ simplecov (0.17.0)
58
+ docile (~> 1.1)
59
+ json (>= 1.8, < 3)
60
+ simplecov-html (~> 0.10.0)
61
+ simplecov-html (0.10.2)
62
+ webmock (3.6.0)
63
+ addressable (>= 2.3.6)
64
+ crack (>= 0.3.2)
65
+ hashdiff (>= 0.4.0, < 2.0.0)
66
+
67
+ PLATFORMS
68
+ ruby
69
+
70
+ DEPENDENCIES
71
+ bundler (~> 1.17)
72
+ omniauth-figma!
73
+ rack-test
74
+ rake (~> 10.0)
75
+ rspec
76
+ simplecov
77
+ webmock
78
+
79
+ BUNDLED WITH
80
+ 1.17.2
data/README.md CHANGED
@@ -1,7 +1,12 @@
1
- # OmniAuth Figma OAuth2 Strategy
1
+ <div align="center">
2
+ <img src="https://dashboard.snapcraft.io/site_media/appmedia/2019/03/icon_E5fiGLe.png" width="80">
2
3
 
3
- A Figma OAuth2 strategy for OmniAuth.
4
+ # OmniAuth Figma
5
+ 🚀 A Figma OAuth2 strategy for OmniAuth.
4
6
 
7
+ ![Gem](https://img.shields.io/gem/v/omniauth-figma?style=flat-square)
8
+ ![GitHub](https://img.shields.io/github/license/jamieecarr/omniauth-figma?style=flat-square)
9
+ </div>
5
10
 
6
11
  ## Installation
7
12
 
@@ -33,6 +38,28 @@ end
33
38
  You can now access the OmniAuth Figma OAuth2 URL: `/auth/figma`.
34
39
 
35
40
 
41
+ ## Auth Hash
42
+ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
43
+
44
+ ```ruby
45
+ {
46
+ provider: 'figma',
47
+ uid: '590538702844424791',
48
+ info: {
49
+ email: 'joe@bloggs.com',
50
+ name: 'Joe',
51
+ image: 'https://s3-alpha.figma.com/static/user_j.png',
52
+ },
53
+ credentials: {
54
+ access_token: '<TOKEN>', # OAuth 2.0 access_token, which you may wish to store
55
+ expires_in: '<EXPIRATION (in seconds)>' # When the access token expires (it always will)
56
+ refresh_token: 'refresh_token' #This can be reused as many times as necessary to retrieve a new access_token.
57
+ }
58
+ }
59
+ ```
60
+
61
+
62
+
36
63
  ## Contributing
37
64
 
38
65
  1. Fork it
@@ -1,3 +1,3 @@
1
1
  module OmniAuthFigma
2
- VERSION = '0.0.1'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -1,5 +1,4 @@
1
- require "oauth2"
2
- require "omniauth"
1
+ require 'omniauth-oauth2'
3
2
 
4
3
  module OmniAuth
5
4
  module Strategies
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
37
  spec.require_paths = ["lib"]
38
38
 
39
- spec.add_dependency "oauth2", "~> 1.4"
39
+ spec.add_dependency 'omniauth-oauth2', '~> 1.6'
40
40
  spec.add_dependency "omniauth", "~> 1.9"
41
41
 
42
42
  spec.add_development_dependency "bundler", "~> 1.17"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-figma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Carr
@@ -11,19 +11,19 @@ cert_chain: []
11
11
  date: 2019-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: oauth2
14
+ name: omniauth-oauth2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.4'
19
+ version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.4'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -102,7 +102,10 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
105
107
  - Gemfile
108
+ - Gemfile.lock
106
109
  - LICENSE.txt
107
110
  - README.md
108
111
  - Rakefile