activerecord_aad 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a48d0ca00ef9c661c33af8afd9f5e960ed7d64b16966c544c4f3d2216b7b53d5
4
- data.tar.gz: 9d807d04d19a013900ec0d3f88a5c8f455dbe0fc576c009e22b893508a9e4eb4
3
+ metadata.gz: 6e518372b2ec5ea175036f90aea3db8a6ee83a04e892e9e1c9d369b84d8a5419
4
+ data.tar.gz: 2790cdbe0184da177aaa6d114904554dca90be20c85bdfe244f042b28b964fe5
5
5
  SHA512:
6
- metadata.gz: 3708212cbe063704278a117defd086077464a2cbd326dfcdd1a6f91c8d2901ac6952f881c3d1766410e8cb16b1d1c1e073b970e7587ab12193163fd072415aae
7
- data.tar.gz: 1576b4ab5cda795ccb239c7ef80fc1eae01e40525d52a62adb4583cf35d580aecbd4c26f62a4f3da626967223265c00f83f811d8ce944c781d5feb6a373f9af5
6
+ metadata.gz: aed2b5969e0bbd14be1bf51834734455348e15ce02e0b415085bd4d8d67c6d2b50d109b43e23913f860a301e221fe1683813391bbe7c7d1233ccc6a3d5a77ee8
7
+ data.tar.gz: 43d43ea9c87011cd34882964002165ee13f8166703eda4c279f74a0f11396d53404658cde65db7dd6c4a2c658b980a9601d96c41d5470ac1a7092b9aae34e83c
@@ -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.1'
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'
@@ -8,12 +8,11 @@ module Azure
8
8
 
9
9
  def configuration_hash
10
10
  hash = super.dup
11
- if hash.key?(:azure_managed_identity)
12
- @managed_identity_manager ||= ManagedIdentityManager.new(hash[:azure_managed_identity])
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(conf)
28
- raise "ActiveRecordAAD: invalid config: `#{conf}`" unless conf.is_a?(Hash)
29
- @config = conf.with_indifferent_access
30
- raise 'ActiveRecordAAD: missing client_id' unless config[:client_id].present?
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.1
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-10 00:00:00.000000000 Z
11
+ date: 2023-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord