key-db 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/keydb.rb +2 -2
  2. metadata +3 -4
data/lib/keydb.rb CHANGED
@@ -15,7 +15,7 @@ class KeyDB
15
15
  return
16
16
  end
17
17
  File.open(@filename, "r").each_line do |line|
18
- if Marshal.load(line)[keyname]
18
+ if Marshal.load(line).split("/")[0] == keyname
19
19
  raise "Keynames must be unique"
20
20
  return
21
21
  end
@@ -48,7 +48,7 @@ class KeyDB
48
48
  get_key keyname
49
49
  end
50
50
 
51
- def access type
51
+ def access_all type
52
52
  File.open(@filename).each_line do |line|
53
53
  line = Marshal.load(line)
54
54
  @keys_and_vals = line.split('/')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: key-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,9 +11,8 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-05-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! 'A database acessible via keys, bugs fixed. Added delete_db method.
15
- Introduced more backwards compatibility with recall_key deprecation. File to require:
16
- ''keydb'''
14
+ description: ! 'A database acessible via keys. Fixed key-uniqueness bug. Renamed access
15
+ method to access_all. File to require: ''keydb'''
17
16
  email: slmnwise@gmail.com
18
17
  executables: []
19
18
  extensions: []