secretfile 1.0.1 → 1.0.2

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: 95caa9eefe3f9bb4f31e9ce708c5f99214a65b2b0c34337626e2ec6e90a92dd4
4
- data.tar.gz: 6162a919731194f74b403535c6948bc67fb244e51e9f37eb56d0827ea08f8476
3
+ metadata.gz: 7c8046a3800e891151a5e7b618fa73bec9a883b76a9873c3b78b0ad24168674a
4
+ data.tar.gz: 2ff840b762bbc941e305716472a4d50f0cf36443a88304bf568c89794be94f0b
5
5
  SHA512:
6
- metadata.gz: 0e295258504e57ff1f7bf3251db27d11d82f9080fa7714d8c732e2d299dc8661b87391bebe83b5cfab9cb6d1e9079d3a1978189956f468ecbd9c33b11458f716
7
- data.tar.gz: 4cd67553464dca3e61ab9a39044c62395520a6de49dd25e00bceac7743c075aee3eb11268226e06d4ec1a7d1c26dcf188592777c55a17e77260396e8b822bc40
6
+ metadata.gz: 3b406a0b137e58907110a3cb3fc8eb90f9f34aa4fb37c43c8cee8931c9defb61292b70f466f8ee41ead9430e2b5da697517aad966f76b61dce4aa3fc469ced3e
7
+ data.tar.gz: ecdf1aeb021e757f666eb311db17a7f8e781962acbba5986c861ec27a98e7428a7daddfd6af11f32feba40c6402039e19b99d6666477911e6b7711f6317cfa0e
@@ -1,3 +1,9 @@
1
+ 1.0.2 / 2019-07-24
2
+
3
+ * Enhancements
4
+
5
+ * A little protection against doing dumb things like nesting Secretfile.group
6
+
1
7
  1.0.1 / 2019-07-24
2
8
 
3
9
  * Enhancements
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- secretfile (1.0.0)
4
+ secretfile (1.0.1)
5
5
  vault
6
6
 
7
7
  GEM
@@ -13,7 +13,10 @@ class Secretfile
13
13
 
14
14
  def group
15
15
  begin
16
- instance.group ||= {}
16
+ instance.mutex.synchronize do
17
+ raise "Can't nest Secretfile.group" if instance.group
18
+ instance.group = {}
19
+ end
17
20
  yield
18
21
  ensure
19
22
  instance.group = nil
@@ -22,10 +25,12 @@ class Secretfile
22
25
  end
23
26
 
24
27
  attr_reader :spec
28
+ attr_reader :mutex
25
29
  attr_accessor :group
26
30
 
27
31
  def initialize
28
32
  super # singleton magic i guess
33
+ @mutex = Mutex.new
29
34
  read_spec
30
35
  end
31
36
 
@@ -1,3 +1,3 @@
1
1
  class Secretfile
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secretfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere