dotenv_secrets 0.1.0 → 0.2.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: 6aecfd7bcb8b1f6183a5ef916f6b94f678c541b2852bdd8d82f07bd48a1fbe38
4
- data.tar.gz: 02f4ec1a81a706a71b651f76829f60d788315607a41045c46d3f8dcd8afd3867
3
+ metadata.gz: e5164409f1839033727476a99a32de7557033130a3f94c14ce8239ef15c7d395
4
+ data.tar.gz: c97c42026f250aa511ed67c5ef9ce01205b4e7b116dd3de66791c4743a420e52
5
5
  SHA512:
6
- metadata.gz: f5bda1b22e821a16a22694315045b27a1ccf9cfc715cd7a99880a69361eff62657b6e6be86c6b453c982d610c087d3bd94cdaeba49ed94e24ab5b33635135165
7
- data.tar.gz: 1cfe55e19dc907a1a7b0537af81fc925fb9958929ea3388ea0043ed8de92a79727128b23d1846ade7ac4a6105dc3112d80c8208d8e1c548cff463504387b5f58
6
+ metadata.gz: 3adf2a7a77c11ada1b590a710a074022cc8a2263adaeda49b6f34ab9ade54516173f7daf34b416401353c6f8972e8f91535fafa91641416bb09d40d51f42f302
7
+ data.tar.gz: 49dc93e0920b1f929abc043e84e42583e41a04108dea8d1910d7c40b7eb7da5a1197106db1ddf9c34459784359c73559587c7e2c0c7b36f0ae6b05b214ebbbd2
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ /spec/examples.txt
@@ -1,3 +1,7 @@
1
+ ## RELEASE 0.2.0
2
+
3
+ * BREAKING: When looking for a key not in the file, `DotenvSecrets#[]` now returns an EOFError instead of a KeyError.
4
+
1
5
  ## RELEASE 0.1.0
2
6
 
3
7
  * FEATURE: it exists
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dotenv_secrets (0.1.0)
4
+ dotenv_secrets (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,11 +32,13 @@ $ gem install dotenv_secrets
32
32
  It's really simple:
33
33
 
34
34
  ```ruby
35
- secrets = DotenvSecrets.new(path: "/tmp/secrets.env") # many cloud providers /tmp dir is a ramdisk, so your secrets never get to written to disk if they're provisioned in /tmp
35
+ secrets = DotenvSecrets.new(path: "/tmp/secrets.env") # many cloud providers /tmp dir is a ramdisk,
36
+ # so your secrets never get to written to
37
+ # disk if they're provisioned in /tmp/
36
38
 
37
39
  secrets["SOME_SERVICE_API_KEY"] # => whatever value was stored directly after SOME_SERVICE_API_KEY=
38
40
 
39
- secrets["NOT_IN_THE_FILE"] # => KeyError gets raised. KeyError seemed like the most applicable base builtin error class.
41
+ secrets["NOT_IN_THE_FILE"] # => raises an EOFError
40
42
  ```
41
43
 
42
44
  That's it!
@@ -16,7 +16,7 @@ class DotenvSecrets
16
16
  if key_line
17
17
  key_line[(key.size + 1)..-1].chomp
18
18
  else
19
- raise KeyError, "key #{key} not found in #{path}"
19
+ raise EOFError, "#{key}= not found in #{path}"
20
20
  end
21
21
  end
22
22
 
@@ -1,3 +1,3 @@
1
1
  class DotenvSecrets
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv_secrets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hoffman