classifieds 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/lib/classifieds/main.rb +6 -3
- data/lib/classifieds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cabedbd14c81b9a85f94de1dfd63dee58310e433
|
|
4
|
+
data.tar.gz: 440f0c7aa0f547f02ca14b5b78ed95636ef67c89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20f7942d408a41df7407938fa1b881c12f061f4bc886519ea2d58c9aa87a95dc3e5a56c6dff094c54e80f4c3eb108ed8084cc57db37c6985f5235e5bcdc8c4ed
|
|
7
|
+
data.tar.gz: c48e8c98405cf4ebda709f2b95dbcfb6e3bc927885f2d23a98602500d9db66bcd5d70e956fcb27025cda86f192046f1305ca4ab2d3498e43ee3a7f2bc460cc51
|
data/lib/classifieds/main.rb
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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'
|
data/lib/classifieds/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|