activerecord_aad 0.0.1 → 0.1.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 +4 -4
- data/activerecord_aad.gemspec +1 -1
- data/lib/activerecord_aad.rb +6 -10
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e518372b2ec5ea175036f90aea3db8a6ee83a04e892e9e1c9d369b84d8a5419
|
|
4
|
+
data.tar.gz: 2790cdbe0184da177aaa6d114904554dca90be20c85bdfe244f042b28b964fe5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aed2b5969e0bbd14be1bf51834734455348e15ce02e0b415085bd4d8d67c6d2b50d109b43e23913f860a301e221fe1683813391bbe7c7d1233ccc6a3d5a77ee8
|
|
7
|
+
data.tar.gz: 43d43ea9c87011cd34882964002165ee13f8166703eda4c279f74a0f11396d53404658cde65db7dd6c4a2c658b980a9601d96c41d5470ac1a7092b9aae34e83c
|
data/activerecord_aad.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'activerecord_aad'
|
|
7
|
-
s.version = '0.0
|
|
7
|
+
s.version = '0.1.0'
|
|
8
8
|
s.authors = ['Taylor Yelverton']
|
|
9
9
|
s.email = 'rubygems@yelvert.io'
|
|
10
10
|
s.homepage = 'https://github.com/ComplyMD/activerecord_aad'
|
data/lib/activerecord_aad.rb
CHANGED
|
@@ -8,12 +8,11 @@ module Azure
|
|
|
8
8
|
|
|
9
9
|
def configuration_hash
|
|
10
10
|
hash = super.dup
|
|
11
|
-
if hash.
|
|
12
|
-
@managed_identity_manager ||= ManagedIdentityManager.new(hash[:
|
|
11
|
+
if hash[:azure_managed_identity_client_id].present?
|
|
12
|
+
@managed_identity_manager ||= ManagedIdentityManager.new(hash[:azure_managed_identity_client_id])
|
|
13
13
|
@managed_identity_manager.apply(hash)
|
|
14
14
|
end
|
|
15
15
|
hash.symbolize_keys!.freeze
|
|
16
|
-
puts hash
|
|
17
16
|
hash
|
|
18
17
|
end
|
|
19
18
|
|
|
@@ -24,13 +23,10 @@ module Azure
|
|
|
24
23
|
|
|
25
24
|
attr_reader :config, :url
|
|
26
25
|
|
|
27
|
-
def initialize(
|
|
28
|
-
raise
|
|
29
|
-
@
|
|
30
|
-
|
|
31
|
-
@client_id = config[:client_id]
|
|
32
|
-
@url = URL
|
|
33
|
-
@url += "&client_id=#{@client_id}" if @client_id.present?
|
|
26
|
+
def initialize(cid)
|
|
27
|
+
raise 'ActiveRecordAAD: missing client_id' unless cid.present?
|
|
28
|
+
@client_id = cid
|
|
29
|
+
@url = "#{URL}&client_id=#{client_id}"
|
|
34
30
|
end
|
|
35
31
|
|
|
36
32
|
def apply(hash)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord_aad
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Taylor Yelverton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-07-
|
|
11
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|