omniauth-jaccount 0.1.5 → 0.1.6.5

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: b9ec845ac5d4c3003fc9ba2cef08142610d07ad607f9f8c46c1148f52c3273b7
4
- data.tar.gz: eee1a0e9bcceafbfa8a329dd02fbfc03506be84513440188c48cc0e5a7958a40
3
+ metadata.gz: 047c715e740975c5cc7196fc97a65a1a39364a89ab9e6ba47ae8d81e73bca9ad
4
+ data.tar.gz: 4e0c85effdd571dbeb5a80c7ea68d9e2648d1b483e50930fd696ba7dfdc5c3b5
5
5
  SHA512:
6
- metadata.gz: 9b06eb26133d5a6178d74a7638c068f843bace408d37801a88ed5a880c3d2f6be1d22247e4236198ee7eda8d808bcf1fd2a349033d7d2a8e7d58dfa18b48a99e
7
- data.tar.gz: 807279cb64543341406672b1e25ea930781bc97f6e06356e57a993e2aa7906e5092b9a2f1a161181a3e52fbe130aed0835b4068b05aada75f545fea3d8cda4fe
6
+ metadata.gz: 7c3c2fcf5c53c59d0f79488361217d1b498e0a9b0034cb9ee5e84c8c396d34826cb391f61d822f5ca645c3f16c27b63af6a14230a9d497755045164b1320e01a
7
+ data.tar.gz: fae2a9971ee88e27921c8fdf275d03f9010f46208bed22c511b6ba013f24a2b61a162adc042b14a53711df4aadafcd7e94147bd66474dfe51ef4d03c8080c5a7
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Omniauth::Jaccount
2
2
 
3
- More jAccount OAuth2.0 detail see <http://developer.sjtu.edu.cn/wiki/JAccount>
3
+ More jAccount OAuth2.0 detail see <http://developer.sjtu.edu.cn>
4
+
5
+ Omniauth detail see:<https://github.com/omniauth/omniauth>
4
6
 
5
7
  ## Installation
6
8
 
data/Rakefile CHANGED
@@ -1,6 +1,14 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # require "bundler/setup"
3
2
 
4
- RSpec::Core::RakeTask.new(:spec)
3
+ # require "bundler/gem_tasks"
5
4
 
6
- task :default => :spec
5
+ # require "rake/testtask"
6
+
7
+ # Rake::TestTask.new(:test) do |t|
8
+ # t.libs << 'test'
9
+ # t.pattern = 'test/**/*_test.rb'
10
+ # t.verbose = false
11
+ # t.warning = true
12
+ # end
13
+
14
+ # task default: :test
@@ -0,0 +1,4 @@
1
+ unless Rails.root.join("config/tailwind.config.js").exist?
2
+ say "Add default config/tailwindcss.config.js"
3
+ copy_file "#{__dir__}/tailwind.config.js", "config/tailwind.config.js"
4
+ end
@@ -0,0 +1,4 @@
1
+ Rails.application.config.middleware.use OmniAuth::Builder do
2
+ provider :developer if Rails.env.development?
3
+ provider :jaccount, ENV['JACCOUNT_APP_ID'], ENV['JACCOUNT_APP_SECRET'], scope: 'profile'
4
+ end
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Jaccount
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6.5"
4
4
  end
5
5
  end
@@ -21,18 +21,22 @@ module OmniAuth
21
21
 
22
22
  info do
23
23
  {
24
- 'email': raw_info['account'] + '@sjtu.edu.cn',
24
+ 'email': raw_info['email'],
25
25
  'name': raw_info['name'],
26
- 'account': raw_info['account']
26
+ 'account': raw_info['account'],
27
+ 'code': raw_info['code'],
28
+ 'organize': raw_info['organize'],
29
+ 'top_organize': raw_info['top_organize'],
30
+ 'userType': raw_info['userType']
27
31
  }
28
32
  end
29
33
 
30
34
  extra do
31
- {raw_info: raw_info}
35
+ { raw_info: raw_info }
32
36
  end
33
37
 
34
38
  def raw_info
35
- @raw_info ||= access_token.get('/me/profile').parsed['entities'][0]
39
+ @raw_info ||= access_token.get('https://api.sjtu.edu.cn/v1/me/profile').parsed['entities'].first
36
40
  end
37
41
 
38
42
  def callback_url
@@ -1,2 +1,2 @@
1
- require "omniauth/jaccount/version"
2
- require "omniauth/strategies/jaccount"
1
+ require 'omniauth/jaccount/version'
2
+ require 'omniauth/strategies/jaccount'
@@ -0,0 +1,10 @@
1
+ namespace :omniauth_jaccount do
2
+ desc "Install controller, config into the app"
3
+ task :install do
4
+ # copy install/omniauth.rb to config/initi...
5
+ # unless Rails.root.join("config/initializers/omniauth.rb").exist?
6
+ # say "Add default config/initializers/omniauth.rb"
7
+ # copy_file "#{__dir__}/../install/omniauth.rb ", "config/initializers/omniauth.rb"
8
+ # end
9
+ end
10
+ end
metadata CHANGED
@@ -1,63 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-jaccount
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - feynixs
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '0'
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.5'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.0
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '2.0'
33
+ version: '0'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
- version: 1.4.0
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '2.0'
40
+ version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
- name: rspec
42
+ name: railties
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - "~>"
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
- version: '3.5'
54
- type: :development
47
+ version: 6.0.0
48
+ type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - "~>"
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
- version: '3.5'
54
+ version: 6.0.0
61
55
  description:
62
56
  email:
63
57
  - feynixs@gmail.com
@@ -65,20 +59,15 @@ executables: []
65
59
  extensions: []
66
60
  extra_rdoc_files: []
67
61
  files:
68
- - ".gitignore"
69
- - ".rspec"
70
- - ".travis.yml"
71
- - Gemfile
72
- - Gemfile.lock
73
62
  - README.md
74
63
  - Rakefile
75
- - bin/console
76
- - bin/setup
64
+ - lib/install/init.rb
65
+ - lib/install/omniauth.rb
77
66
  - lib/omniauth-jaccount.rb
78
67
  - lib/omniauth/jaccount/version.rb
79
68
  - lib/omniauth/strategies/jaccount.rb
80
- - omniauth-jaccount.gemspec
81
- homepage:
69
+ - lib/tasks/install.rake
70
+ homepage: ''
82
71
  licenses: []
83
72
  metadata: {}
84
73
  post_install_message:
@@ -96,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
85
  - !ruby/object:Gem::Version
97
86
  version: '0'
98
87
  requirements: []
99
- rubygems_version: 3.1.4
88
+ rubygems_version: 3.4.21
100
89
  signing_key:
101
90
  specification_version: 4
102
91
  summary: omniauth for jaccount
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.3.1
7
- before_install: gem install bundler -v 1.16.4
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in omniauth-jaccount.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,72 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- omniauth-jaccount (0.1.5)
5
- omniauth (~> 1.5)
6
- omniauth-oauth2 (>= 1.4.0, < 2.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- diff-lcs (1.4.4)
12
- faraday (1.8.0)
13
- faraday-em_http (~> 1.0)
14
- faraday-em_synchrony (~> 1.0)
15
- faraday-excon (~> 1.1)
16
- faraday-httpclient (~> 1.0.1)
17
- faraday-net_http (~> 1.0)
18
- faraday-net_http_persistent (~> 1.1)
19
- faraday-patron (~> 1.0)
20
- faraday-rack (~> 1.0)
21
- multipart-post (>= 1.2, < 3)
22
- ruby2_keywords (>= 0.0.4)
23
- faraday-em_http (1.0.0)
24
- faraday-em_synchrony (1.0.0)
25
- faraday-excon (1.1.0)
26
- faraday-httpclient (1.0.1)
27
- faraday-net_http (1.0.1)
28
- faraday-net_http_persistent (1.2.0)
29
- faraday-patron (1.0.0)
30
- faraday-rack (1.0.0)
31
- hashie (4.1.0)
32
- jwt (2.3.0)
33
- multi_json (1.15.0)
34
- multi_xml (0.6.0)
35
- multipart-post (2.1.1)
36
- oauth2 (1.4.7)
37
- faraday (>= 0.8, < 2.0)
38
- jwt (>= 1.0, < 3.0)
39
- multi_json (~> 1.3)
40
- multi_xml (~> 0.5)
41
- rack (>= 1.2, < 3)
42
- omniauth (1.9.1)
43
- hashie (>= 3.4.6)
44
- rack (>= 1.6.2, < 3)
45
- omniauth-oauth2 (1.7.1)
46
- oauth2 (~> 1.4)
47
- omniauth (>= 1.9, < 3)
48
- rack (2.2.3)
49
- rspec (3.10.0)
50
- rspec-core (~> 3.10.0)
51
- rspec-expectations (~> 3.10.0)
52
- rspec-mocks (~> 3.10.0)
53
- rspec-core (3.10.1)
54
- rspec-support (~> 3.10.0)
55
- rspec-expectations (3.10.1)
56
- diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.10.0)
58
- rspec-mocks (3.10.2)
59
- diff-lcs (>= 1.2.0, < 2.0)
60
- rspec-support (~> 3.10.0)
61
- rspec-support (3.10.2)
62
- ruby2_keywords (0.0.5)
63
-
64
- PLATFORMS
65
- ruby
66
-
67
- DEPENDENCIES
68
- omniauth-jaccount!
69
- rspec (~> 3.5)
70
-
71
- BUNDLED WITH
72
- 2.2.29
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "omniauth/jaccount"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,27 +0,0 @@
1
-
2
- # lib = File.expand_path("../lib", __FILE__)
3
- # $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require File.expand_path("../lib/omniauth/jaccount/version", __FILE__)
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "omniauth-jaccount"
8
- spec.version = Omniauth::Jaccount::VERSION
9
- spec.authors = ["feynixs"]
10
- spec.email = ["feynixs@gmail.com"]
11
-
12
- spec.summary = %q{omniauth for jaccount}
13
-
14
-
15
- # Specify which files should be added to the gem when it is released.
16
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- end
20
- spec.bindir = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
23
-
24
- spec.add_dependency 'omniauth', '~> 1.5'
25
- spec.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
26
- spec.add_development_dependency 'rspec', '~> 3.5'
27
- end