key-db 0.0.3 → 0.1.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/hashkeydb.rb +4 -2
  2. metadata +2 -2
@@ -1,8 +1,10 @@
1
1
  class HashKeyDB
2
2
  def initialize filename
3
- db_file = File.new(filename + ".db", "w")
4
3
  @filename = "#{filename}.db"
5
- db_file.close
4
+ unless Dir.entries('.').detect {|f| f.match "#{@filename}"}
5
+ @db_file = File.new(@filename, "w")
6
+ @db_file.close
7
+ end
6
8
  end
7
9
  def new_key keyname, value
8
10
  @db_file = File.open(@filename, "a")
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: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: A database acessible via keys, now with a 'access' function
14
+ description: A database acessible via keys, all bugs fixed
15
15
  email: slmnwise@gmail.com
16
16
  executables: []
17
17
  extensions: []