activerecord_aad 0.2.0 → 0.2.1
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 +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72b9b8232931fdf6b39a2c77182eb989b2ef1b31f48228be1b7bbc8b2ed89e23
|
|
4
|
+
data.tar.gz: 7b78bdc58f5c029f8f6f109aca762124370f3ab2a88685c0621891192ba06352
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2af61c5eb0f09f763b511e4f0da836db09f484ccaecb44568e12cea01e3c2d0a0b947c2e72aac03a86dc81ef723e20cb37b6db0612af6da9fed8147ece80a7c3
|
|
7
|
+
data.tar.gz: bf57dc76487e2a2310a0294c3f7605be0746ac55deda50286f297b3597cd415ddc32860bcdac88edf584ce91c4aa03dc8331b13c73fc3e039357e3e8fba9aaff
|
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.2.
|
|
7
|
+
s.version = '0.2.1'
|
|
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
|
@@ -7,7 +7,7 @@ module Azure
|
|
|
7
7
|
module HashConfig
|
|
8
8
|
|
|
9
9
|
def configuration_hash
|
|
10
|
-
hash = super.dup
|
|
10
|
+
hash = super.dup.with_indifferent_access
|
|
11
11
|
if hash[:azure_managed_identity].present?
|
|
12
12
|
@managed_identity_manager ||= ManagedIdentityManager.new(hash)
|
|
13
13
|
@managed_identity_manager.apply
|
|
@@ -25,15 +25,15 @@ module Azure
|
|
|
25
25
|
|
|
26
26
|
def initialize(conf)
|
|
27
27
|
raise "ActiveRecordAAD: invalid config: `#{conf}`" unless conf.is_a?(Hash)
|
|
28
|
-
@config = conf
|
|
28
|
+
@config = conf
|
|
29
29
|
@client_id = config[:azure_managed_identity]
|
|
30
30
|
@url = URL
|
|
31
31
|
@url += "&client_id=#{@client_id}" if @client_id.present?
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def apply
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
def apply
|
|
35
|
+
config[:password] = access_token
|
|
36
|
+
config[:enable_cleartext_plugin] = true if config[:adapter] == 'mysql2'
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def access_token
|