bitzesty-safe 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/safe/keys.rb +4 -2
  3. data/safe.gemspec +2 -2
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/lib/safe/keys.rb CHANGED
@@ -42,13 +42,15 @@ module Safe
42
42
  object_id = self.id
43
43
  pass = self.password
44
44
  raise Safe::KeygenError if object_id.nil? || pass.nil?
45
- dir_id = "/#{object_id}/"
46
- dir = root_dir + dir_id
45
+ dir_class = root_dir + "/#{self.class.tableize}/"
46
+ dir = dir_class + "#{object_id}/"
47
47
  if File.exists?(root_dir) && File.directory?(root_dir)
48
+ Dir.mkdir(dir_class) unless File.exists?(dir_class)
48
49
  Dir.mkdir(dir) unless File.exists?(dir)
49
50
  gen_keypair(dir, pass)
50
51
  else
51
52
  Dir.mkdir(root_dir)
53
+ Dir.mkdir(dir_class)
52
54
  Dir.mkdir(dir)
53
55
  gen_keypair(dir, pass)
54
56
  end
data/safe.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{safe}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Ford"]
12
- s.date = %q{2009-09-25}
12
+ s.date = %q{2009-09-26}
13
13
  s.description = %q{Storing encrypted data in a Rails app using Strongbox}
14
14
  s.email = %q{info@bitzesty.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitzesty-safe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ford
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-25 00:00:00 -07:00
12
+ date: 2009-09-26 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15