openauth 0.7.0 → 0.8.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/openauth.rb +11 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a558e75e1573eb96c2e54f8cca84c9d2dd2c66f32a526598603e742f0b6c9fd4
4
- data.tar.gz: 0c11831621aa15a58de26b97455c07f1b94364bf66b002ce56c1abe81ee876fa
3
+ metadata.gz: a6d3414c6fd1e9ea38b6590f8de456883925ad552b3bc28dccbe5d2bec99daf1
4
+ data.tar.gz: 611d0a3536caf5dbd35ca4b275e9325a2679a323331bcba044e65b1d589074d6
5
5
  SHA512:
6
- metadata.gz: 1d399a3684cdd60f2233a826d0bcff3ab2a7f63a39f7aa6efe920c1d9efd3e707f0a8d443b2eea2945fd61d6cb903d3696aa3ee056523440ba9ed44fa8f5035b
7
- data.tar.gz: a2fde1f3842366f291d25f4ca35b6b9e1eab660bcac0c070848514a9aac800096158e2dba9bcc3179badbf597d21275d16b15b72dd755b9dbdb7ecb710c01643
6
+ metadata.gz: ca81373267b211ea3b0015a3e0bd6e743f6d2cd4524cfeb8f4feb7504d9d4b6488c75e06520b2aed67b8cdf3a09345a6b06d757125fbdb335aed03035d39892d
7
+ data.tar.gz: 0e490309f08c1030ccec46b1f788e0c3f9b42c5621636ff5112290abc45bf38316d3feeb4983ae1a393d35c340749969050f79348380a21562cc256821a4bf3c
data/lib/openauth.rb CHANGED
@@ -5,13 +5,23 @@ require "better_auth"
5
5
  module OpenAuth
6
6
  VERSION = BetterAuth::VERSION unless const_defined?(:VERSION, false)
7
7
 
8
+ def self.alias_better_auth_constants!
9
+ BetterAuth.constants(false).each do |name|
10
+ const_set(name, BetterAuth.const_get(name, false)) unless const_defined?(name, false)
11
+ end
12
+ end
13
+
8
14
  def self.auth(...)
9
15
  BetterAuth.auth(...)
10
16
  end
11
17
 
12
18
  def self.const_missing(name)
13
- BetterAuth.const_get(name)
19
+ constant = BetterAuth.const_get(name, false)
20
+ const_set(name, constant) unless const_defined?(name, false)
21
+ constant
14
22
  rescue NameError
15
23
  super
16
24
  end
25
+
26
+ alias_better_auth_constants!
17
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Sala
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.7.0
18
+ version: 0.8.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.7.0
25
+ version: 0.8.0
26
26
  description: OpenAuth is an alias package that installs better_auth. Use Better Auth
27
27
  Ruby documentation for the canonical API.
28
28
  email: