classifieds 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: be21a9b90c90cb9033fb3d083fbdfe046f088214
4
- data.tar.gz: 1105c72dbc850ae727fd72a8726fedd550e78f76
3
+ metadata.gz: cabedbd14c81b9a85f94de1dfd63dee58310e433
4
+ data.tar.gz: 440f0c7aa0f547f02ca14b5b78ed95636ef67c89
5
5
  SHA512:
6
- metadata.gz: 9fd490542826ca9d4ad8e8a72aff680b8b97f41a4c2cd05848fd8d8ce44ce786f2f885fd527289aae1aa312de29ae46da75fad8da9a267e6b9ef38c6a9ade351
7
- data.tar.gz: dbe2f6c2de67696c56252d893c9b1445e1293e05ee767108af49a4a02f1cc3e8ba9321a21a9cf5899d34f49cbc80d92f0a9401772b2db79eec28b91c139bf6bd
6
+ metadata.gz: 20f7942d408a41df7407938fa1b881c12f061f4bc886519ea2d58c9aa87a95dc3e5a56c6dff094c54e80f4c3eb108ed8084cc57db37c6985f5235e5bcdc8c4ed
7
+ data.tar.gz: c48e8c98405cf4ebda709f2b95dbcfb6e3bc927885f2d23a98602500d9db66bcd5d70e956fcb27025cda86f192046f1305ca4ab2d3498e43ee3a7f2bc460cc51
@@ -13,7 +13,7 @@ module Classifieds
13
13
 
14
14
  def initialize(*args)
15
15
  unless File.exists?(SOURCE_FILE)
16
- STDERR.puts "#{SOURCE_FILE} is not found".color(:red)
16
+ STDERR.puts "#{SOURCE_FILE} is not found in this repository".color(:red)
17
17
  exit 1
18
18
  end
19
19
 
@@ -26,7 +26,7 @@ module Classifieds
26
26
  option :force, type: :boolean, aliases: '-f'
27
27
  def keygen
28
28
  if !options[:force] && (File.exists?(PUBLIC_KEY_PATH) && File.exists?(COMMON_KEY_PATH))
29
- STDERR.puts 'Already exists'.color(:red)
29
+ STDERR.puts 'Already generated in this repository'.color(:red)
30
30
  exit 1
31
31
  else
32
32
  OpenSSL::Random.seed(File.read('/dev/random', 16))
@@ -88,6 +88,7 @@ module Classifieds
88
88
  @password = ask_password
89
89
  end
90
90
 
91
+ failed_files = []
91
92
  decrypted_files = classifieds.each_with_object([]) do |file_path, array|
92
93
  next if decrypted?(file_path)
93
94
 
@@ -100,7 +101,7 @@ module Classifieds
100
101
  begin
101
102
  decrypted = decrypt_data(data)
102
103
  rescue OpenSSL::Cipher::CipherError
103
- STDERR.puts 'The entered password is wrong: '.color(:red) + file_path
104
+ failed_files << file_path
104
105
  next
105
106
  end
106
107
 
@@ -113,6 +114,8 @@ module Classifieds
113
114
 
114
115
  puts 'Decrypted:'.color(:green) unless decrypted_files.empty?
115
116
  decrypted_files.each {|decrypted_file| puts "\t" + decrypted_file }
117
+ puts 'Failed to decrypt:'.color(:red) unless failed_files.empty?
118
+ failed_files.each {|failed_file| puts "\t" + failed_file }
116
119
  end
117
120
 
118
121
  desc 'status', 'Show a status of the encryption of this repository'
@@ -1,3 +1,3 @@
1
1
  module Classifieds
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaihar4
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-24 00:00:00.000000000 Z
11
+ date: 2015-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor