pwkeep 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  PassWord Keep (pwkeep)
2
2
  ======================
3
+ [![Gem Version](https://badge.fury.io/rb/pwkeep.png)](http://badge.fury.io/rb/pwkeep)
3
4
 
4
5
  Simple password storage system.
5
6
 
data/lib/pwkeep/main.rb CHANGED
@@ -108,7 +108,7 @@ EOS
108
108
  result = PWKeep.run_editor(data, {})
109
109
 
110
110
  unless result[0]
111
- raise "Not modified"
111
+ raise PWKeep::Exception, "Not modified"
112
112
  end
113
113
 
114
114
  pw = ask("Enter your password:") { |q| q.echo = false }
@@ -124,7 +124,7 @@ EOS
124
124
  data = @storage.load_system opts[:system]
125
125
  result = PWKeep.run_editor(data[:data], {})
126
126
  unless result[0]
127
- raise "Not modified"
127
+ raise PWKeep::Exception, "Not modified"
128
128
  end
129
129
  @storage.save_system opts[:system], result[1]
130
130
  say("<%= color('Changes stored', GREEN)%>")
@@ -164,9 +164,9 @@ EOS
164
164
  end
165
165
  return
166
166
  end
167
- rescue PWKeep::Exception => e
167
+ rescue PWKeep::Exception => e1
168
168
  PWKeep::logger.error e.message.colorize(:red)
169
- rescue OpenSSL::PKey::RSAError => e
169
+ rescue OpenSSL::PKey::RSAError => e2
170
170
  PWKeep::logger.error "Cannot load private key".colorize(:red)
171
171
  end
172
172
  end
@@ -148,7 +148,7 @@ class Storage
148
148
  system_h = system_to_hash(system)
149
149
 
150
150
  data = { :system => system, :data => data, :stored_at => Time.now }
151
- encrypt_system(path.join(system_h), data)
151
+ encrypt_system(path.join(system_h), data.to_json)
152
152
  end
153
153
 
154
154
  def valid?
data/pwkeep.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'pwkeep'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = [ 'Aki Tuomi']
6
6
  s.email = %w( aki.tuomi@g-works.fi )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwkeep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: