sorcery 0.16.2 → 0.16.3

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: c616c0cfea97510b53d2383bb84dfa5fb7026681b8a0a55d762f60b2ad71505b
4
- data.tar.gz: 07dc2d7787635cc92fea05896318fcf4602e59355ca3c092f448e44763b030d5
3
+ metadata.gz: f2d091c4af06b65d0b8640aa1664cc03370f0859a0d37ccca2865813a41956ec
4
+ data.tar.gz: c60ee8af595868a99ddced5363716f6593f494bb82e97a82d35769b4a1c223e4
5
5
  SHA512:
6
- metadata.gz: 45fe6636bfc0785eeaaf276a0d178eb75259c2daf9f8b4f19b26f246a80cd5297c2a931414b98d03df5bd9b4b71d0dad3bdd1a4ed44a2e1aa099988466bb7b43
7
- data.tar.gz: b9695085f19f77a106c6e5e19eb6ead86e4068efc5ca0adb1909563d42397ee6fbfa6d061bd828eebbf558bd93a579b21a275f7a58a62c942c40f0ad04a2e214
6
+ metadata.gz: 24281e4ee0082665b792c467fbc9f7e70a6d3f26492a66de179248b6d3c97dcabf2aa3058e44239961ffa01645708883d22e097ac28dfc2b64e38ef2743a03c3
7
+ data.tar.gz: 55c173b3a0ea39d8067bb26b737e57548fb67357c0969d1eb08290c8876294157f2ca7c17888874d208d88fe893840b4046bf3463c1ead9fa16c15358a9d5668
@@ -1,4 +1,4 @@
1
- Please complete all sections.
1
+ <!-- Please complete all sections. -->
2
2
 
3
3
  ### Configuration
4
4
 
@@ -9,12 +9,16 @@ Please complete all sections.
9
9
 
10
10
  ### Expected Behavior
11
11
 
12
- Tell us what should happen.
12
+ <!-- Tell us what should happen. -->
13
13
 
14
14
  ### Actual Behavior
15
15
 
16
- Tell us what happens instead.
16
+ <!-- Tell us what happens instead. -->
17
17
 
18
18
  ### Steps to Reproduce
19
19
 
20
- Please list all steps to reproduce the issue.
20
+ <!-- Please list all steps to reproduce the issue. -->
21
+
22
+ 1.
23
+ 2.
24
+ 3.
@@ -3,3 +3,5 @@ Please ensure your pull request includes the following:
3
3
  - [ ] Description of changes
4
4
  - [ ] Update to CHANGELOG.md with short description and link to pull request
5
5
  - [ ] Changes have related RSpec tests that ensure functionality does not break
6
+
7
+ <!-- For the changelog, please add your entry to the HEAD section. Do not create a new release header. -->
@@ -1,7 +1,11 @@
1
1
  name: Test Suite
2
2
 
3
3
  # Run against all commits and pull requests.
4
- on: [ push, pull_request ]
4
+ on:
5
+ schedule:
6
+ - cron: '0 0 * * *'
7
+ push:
8
+ pull_request:
5
9
 
6
10
  jobs:
7
11
  test_matrix:
@@ -16,17 +20,34 @@ jobs:
16
20
  - 2.5
17
21
  - 2.6
18
22
  - 2.7
19
- - 3.0
23
+ - 3.0.0
24
+ # - 3.1
20
25
 
21
26
  rails:
22
27
  - '52'
23
28
  - '60'
29
+ - '61'
30
+ # - '70'
24
31
 
25
32
  exclude:
26
33
  - ruby: 2.4
27
34
  rails: '60'
28
- - ruby: 3.0
35
+ - ruby: 2.4
36
+ rails: '61'
37
+ # - ruby: 2.4
38
+ # rails: '70'
39
+ # - ruby: 2.5
40
+ # rails: '70'
41
+ # - ruby: 2.6
42
+ # rails: '70'
43
+ - ruby: 3.0.0
29
44
  rails: '52'
45
+ # - ruby: 3.1
46
+ # rails: '52'
47
+ # - ruby: 3.1
48
+ # rails: '60'
49
+ # - ruby: 3.1
50
+ # rails: '61'
30
51
 
31
52
  env:
32
53
  BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  ## HEAD
3
3
 
4
+ ## 0.16.3
5
+
6
+ * Fix provider instantiation for plural provider names (eg. okta) [#305](https://github.com/Sorcery/sorcery/pull/305)
7
+
4
8
  ## 0.16.2
5
9
 
6
10
  * Inline core migration index definition [#281](https://github.com/Sorcery/sorcery/pull/281)
data/MAINTAINING.md ADDED
@@ -0,0 +1,64 @@
1
+ # Maintaining Sorcery
2
+
3
+ This will eventually be fleshed out so that anyone should be able to pick up and
4
+ maintain Sorcery by following this guide. It will provide step-by-step guides
5
+ for common tasks such as releasing new versions, as well as explain how to
6
+ triage issues and keep the CHANGELOG up-to-date.
7
+
8
+ ## Table of Contents
9
+
10
+ 1. [Merging Pull Requests](#merging-pull-requests)
11
+ 1. [Versioning](#versioning)
12
+ 1. [Version Naming](#version-naming)
13
+ 1. [Releasing a New Version](#releasing-a-new-version)
14
+
15
+ ## Merging Pull Requests
16
+
17
+ TODO
18
+
19
+ ## Versioning
20
+
21
+ ### Version Naming
22
+
23
+ Sorcery uses semantic versioning which can be found at: https://semver.org/
24
+
25
+ All versions of Sorcery should follow this format: `MAJOR.MINOR.PATCH`
26
+
27
+ Where:
28
+
29
+ * MAJOR - Includes backwards **incompatible** changes.
30
+ * MINOR - Introduces new functionality but is fully backwards compatible.
31
+ * PATCH - Fixes errors in existing functionality (must be backwards compatible).
32
+
33
+ The changelog and git tags should use `vMAJOR.MINOR.PATCH` to indicate that the
34
+ number represents a version of Sorcery. For example, `1.0.0` would become
35
+ `v1.0.0`.
36
+
37
+ ### Releasing a New Version
38
+
39
+ When it's time to release a new version, you'll want to ensure all the changes
40
+ you need are on the master branch and that there is a passing build. Then follow
41
+ this checklist and prepare a release commit:
42
+
43
+ NOTE: `X.Y.Z` and `vX.Y.Z` are given as examples, and should be replaced with
44
+ whatever version you are releasing. See: [Version Naming](#version-naming)
45
+
46
+ 1. Update CHANGELOG.md
47
+ 1. Check for any changes that have been included since the last release that
48
+ are not reflected in the changelog. Add any missing entries to the `HEAD`
49
+ section.
50
+ 1. Check the changes in `HEAD` to determine what version increment is
51
+ appropriate. See [Version Naming](#version-naming) if unsure.
52
+ 1. Replace `## HEAD` with `## vX.Y.Z` and create a new `## HEAD` section
53
+ above the latest version.
54
+ 1. Update Gem Version
55
+ 1. Update `./lib/sorcery/version.rb` to 'X.Y.Z'
56
+ 1. Stage your changes and create a commit
57
+ 1. `git add -A`
58
+ 1. `git commit -m "Release vX.Y.Z"`
59
+ 1. TODO: Gem Release (WIP)
60
+ 1. `cd <dir>`
61
+ 1. `gem build`
62
+ 1. `gem push <filename>`
63
+ 1. TODO: Version tagging
64
+ 1. Release new version via github interface
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '~> 6.1.0'
4
+ gem 'rails-controller-testing'
5
+ gem 'sqlite3', '~> 1.4'
6
+
7
+ gemspec path: '..'
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '~> 7.0.0'
4
+ gem 'rails-controller-testing'
5
+ gem 'sqlite3', '~> 1.4'
6
+
7
+ gemspec path: '..'
@@ -40,7 +40,7 @@ module Sorcery
40
40
  providers.each do |name|
41
41
  class_eval <<-RUBY, __FILE__, __LINE__ + 1
42
42
  def self.#{name}
43
- @#{name} ||= Sorcery::Providers.const_get('#{name}'.to_s.classify).new
43
+ @#{name} ||= Sorcery::Providers.const_get('#{name}'.to_s.camelcase).new
44
44
  end
45
45
  RUBY
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module Sorcery
2
- VERSION = '0.16.2'.freeze
2
+ VERSION = '0.16.3'.freeze
3
3
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'sorcery/providers/base'
5
+
6
+ describe Sorcery::Providers::Examples do
7
+ before(:all) do
8
+ sorcery_reload!([:external])
9
+ sorcery_controller_property_set(:external_providers, [:examples])
10
+ end
11
+
12
+ context 'fetching a plural custom provider' do
13
+ it 'returns the provider' do
14
+ expect(Sorcery::Controller::Config.examples).to be_a(Sorcery::Providers::Examples)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'sorcery/providers/base'
4
+
5
+ module Sorcery
6
+ module Providers
7
+ class Examples < Base
8
+ include Protocols::Oauth2
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorcery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noam Ben Ari
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-11-28 00:00:00.000000000 Z
15
+ date: 2022-02-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bcrypt
@@ -207,11 +207,14 @@ files:
207
207
  - CODE_OF_CONDUCT.md
208
208
  - Gemfile
209
209
  - LICENSE.md
210
+ - MAINTAINING.md
210
211
  - README.md
211
212
  - Rakefile
212
213
  - SECURITY.md
213
214
  - gemfiles/rails_52.gemfile
214
215
  - gemfiles/rails_60.gemfile
216
+ - gemfiles/rails_61.gemfile
217
+ - gemfiles/rails_70.gemfile
215
218
  - lib/generators/sorcery/USAGE
216
219
  - lib/generators/sorcery/helpers.rb
217
220
  - lib/generators/sorcery/install_generator.rb
@@ -304,6 +307,7 @@ files:
304
307
  - spec/orm/active_record.rb
305
308
  - spec/providers/example_provider_spec.rb
306
309
  - spec/providers/example_spec.rb
310
+ - spec/providers/examples_spec.rb
307
311
  - spec/providers/vk_spec.rb
308
312
  - spec/rails_app/app/active_record/authentication.rb
309
313
  - spec/rails_app/app/active_record/user.rb
@@ -365,6 +369,7 @@ files:
365
369
  - spec/support/migration_helper.rb
366
370
  - spec/support/providers/example.rb
367
371
  - spec/support/providers/example_provider.rb
372
+ - spec/support/providers/examples.rb
368
373
  homepage: https://github.com/Sorcery/sorcery
369
374
  licenses:
370
375
  - MIT