keepass_kpscript 1.0.0 → 1.0.1

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: 4d8c2308abfd17cef4c6c0c52c2ecefd0a499bf8cc7d451c9e53b50b98d53702
4
- data.tar.gz: ae4cc14f37d7de8ed8a2003017c33503e8e686ec1a10ed2ef91ff5174dc77cb5
3
+ metadata.gz: f97c25985d64806567559377354f7bba9114e450253653fe8afcd73a6519b1c9
4
+ data.tar.gz: '0778819142fef3931cf994bea3aa9c2ae7bf9d3320aee2935dfc9e6736476908'
5
5
  SHA512:
6
- metadata.gz: 8bcdd547d96ea071093859910a4042ed0c129856b8999ed59d24f53893afe8f4821f1fa7506186a12ea6f89300dabb2ee724ea6e29401be8708a4ba49dd4d8cb
7
- data.tar.gz: 3821acb14d910905dba791592d70e951db2a5f9a7bb67de4c471d0d84d9a4bcb96890a2b2057c73c233a1cdc772ad39152ff6d864372dd3f0997bb7614b055be
6
+ metadata.gz: 07a5a1e79788ce88eb33375b789d4689c72a74882806d4400f57e22033bf2951334c60df205e3baa9163eec9d5e82e1069889f29b27c250c44fc21c0ef406f82
7
+ data.tar.gz: c1eb2a87fbecf106d88e9155333d04d516ff3a27aac3f3a6b848b4863034c593244c811b4bf207ee2634a1358a350a82ba736da1218d644de60051ed118fcead
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v1.0.1](https://github.com/Muriel-Salvan/keepass_kpscript/compare/v1.0.0...v1.0.1) (2021-06-30 15:29:15)
2
+
3
+ ### Patches
4
+
5
+ * [Fail if no authentication method is provided](https://github.com/Muriel-Salvan/keepass_kpscript/commit/7178863234782aa3fd46d9a2ea9263d9344b465f)
6
+
1
7
  # [v0.0.1](https://github.com/Muriel-Salvan/keepass_kpscript/compare/...v0.0.1) (2021-06-30 10:50:35)
2
8
 
3
9
  ### Patches
@@ -10,6 +10,7 @@ module KeepassKpscript
10
10
  class Database
11
11
 
12
12
  # Constructor
13
+ # At least 1 of password, password_enc or key_file is mandatory.
13
14
  #
14
15
  # Parameters::
15
16
  # * *kpscript* (Kpscript): The KPScript instance handling this database
@@ -23,6 +24,7 @@ module KeepassKpscript
23
24
  @password = password
24
25
  @password_enc = password_enc
25
26
  @key_file = key_file
27
+ raise 'Please specify at least one of password, password_enc or key_file arguments' if @password.nil? && @password_enc.nil? && @key_file.nil?
26
28
  end
27
29
 
28
30
  # Securely select field values from entries.
@@ -19,7 +19,8 @@ module KeepassKpscript
19
19
  @debug = debug
20
20
  end
21
21
 
22
- # Open a database using this KPScript instance
22
+ # Open a database using this KPScript instance.
23
+ # At least 1 of password, password_enc or key_file is mandatory.
23
24
  #
24
25
  # Parameters::
25
26
  # * *database_file* (String): Path to the database file
@@ -1,5 +1,5 @@
1
1
  module KeepassKpscript
2
2
 
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
 
5
5
  end
@@ -19,6 +19,11 @@ describe KeepassKpscript::Database do
19
19
  expect(database.password_for('MyEntryTitle')).to eq 'MyEntryPassword'
20
20
  end
21
21
 
22
+ it 'fails if no authentication mechanism is provided' do
23
+ expect_calls_to_kpscript []
24
+ expect { kpscript.open('/path/to/my_db.kdbx') }.to raise_error 'Please specify at least one of password, password_enc or key_file arguments'
25
+ end
26
+
22
27
  it 'fails with an error silencing secrets when KPScript returns a non-zero exit status' do
23
28
  expect_calls_to_kpscript [
24
29
  [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keepass_kpscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan