checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: da2206cb54181494145ba4f100050260a5905146be30d35941f44276e4876ff4
4
- data.tar.gz: 1a6172feb18257fde3a828e8cc73368fab080ed50ca218903a03faa9cdcfc823
3
+ metadata.gz: dc8db328edd2fcbbbd0e6995c459f40bc873df854ddb1344eb9fd94ddfc09b1d
4
+ data.tar.gz: 7c2a4434195ebf368ed2b476bd892ab7c35d793c0668c8e4cbbaa3f9702d9151
5
5
SHA512:
6
- metadata.gz: fa9723446ca8c1a2c8fb4d96a03b6b9ec584c238ca6f0ca634553c457be6caf551fda6626207e884908f09eedf0087d3a7b66fcbd95f32d375a560e92ba46adf
7
- data.tar.gz: 9554fd6c88d6fe8e9b41e68894e76282720c0c7ae6d68e67d2e8612d5f6d4c061540c42367c98c1c0821f54badd2fc00d4090717633e3b0f382fc3290b47087d
6
+ metadata.gz: 0b6392d9ba4f220853d3d45a8c330dd1fd7d280b8280f7474b39abeec44c217972ae3f3ae5e15761f63b4cac4dd0571587c86c4b994525b7c500a0909e56631b
7
+ data.tar.gz: 1e128a4734f194270466be4017ad3d6143bcd21ed7875e6721c55e8d32bb6b58db9770413ec68fda843ec57ab5d83e29908bbc5530d5c080827846722762acd1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
PATH
2
2
remote: .
3
3
specs:
4
- skull_island (1.2.3)
4
+ skull_island (1.2.4)
5
5
deepsort (~> 0.4)
6
6
erubi (~> 1.8)
7
7
json (~> 2.1)
data/lib/skull_island/resources/consumer.rb CHANGED
@@ -59,17 +59,20 @@ module SkullIsland
59
59
60
60
next unless project
61
61
62
- BasicauthCredential.all.reject { |res| known_basic_auths.include?(res.id) }.map do |res|
62
+ basic_creds = BasicauthCredential.all.select { |c| c.consumer == resource }
63
+ basic_creds.reject { |res| known_basic_auths.include?(res.id) }.map do |res|
63
64
puts "[WARN] ! Removing #{res.class.name} (#{res.id})"
64
65
res.destroy
65
66
end
66
67
67
- JWTCredential.all.reject { |res| known_jwt_auths.include?(res.id) }.map do |res|
68
+ jwt_creds = JWTCredential.all.select { |c| c.consumer == resource }
69
+ jwt_creds.reject { |res| known_jwt_auths.include?(res.id) }.map do |res|
68
70
puts "[WARN] ! Removing #{res.class.name} (#{res.id})"
69
71
res.destroy
70
72
end
71
73
72
- KeyauthCredential.all.reject { |res| known_key_auths.include?(res.id) }.map do |res|
74
+ key_creds = KeyauthCredential.all.select { |c| c.consumer == resource }
75
+ key_creds.reject { |res| known_key_auths.include?(res.id) }.map do |res|
73
76
puts "[WARN] ! Removing #{res.class.name} (#{res.id})"
74
77
res.destroy
75
78
end
data/lib/skull_island/resources/keyauth_credential.rb CHANGED
@@ -59,6 +59,10 @@ module SkullIsland
59
59
false
60
60
end
61
61
62
+ def project
63
+ consumer ? consumer.project : nil
64
+ end
65
+
62
66
private
63
67
64
68
def postprocess_consumer(value)
data/lib/skull_island/version.rb CHANGED
@@ -4,6 +4,6 @@ module SkullIsland
4
4
VERSION = [
5
5
1, # Major
6
6
2, # Minor
7
- 3 # Patch
7
+ 4 # Patch
8
8
].join('.')
9
9
end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: skull_island
3
3
version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
platform: ruby
6
6
authors:
7
7
- Jonathan Gnagy