storazzo 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/stats-with-md5 +0 -19
- data/bin/storazzo +32 -0
- data/bin/storazzo-util +1 -0
- data/storazzo.gemspec +10 -6
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da35786810823eb035c7077b4e1428ac644a621f31ce6938a1c8e50d911e6734
|
4
|
+
data.tar.gz: 9a87268dc0dce5bb2046ce0032ef2c8b59bfad705267ca03ff3ca97f46993d23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8690599753d47f243464c82b05bb949f7ee99d2ab87ccc3d9dee94957c35d89e78981bbf8c61f7f011ff8e72cd07885aaa8e5e6b76c2c7b29820b26bb286b75e
|
7
|
+
data.tar.gz: 1a9b7db1f5053701758ed3dd51ef7d6a142db4ba4e2c1c1aa9a5836e808ab5076f7aebeb06807e28170f9ca27600068a50f4847cf12c41402cd372f23bd126d8
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/bin/stats-with-md5
CHANGED
@@ -410,46 +410,27 @@ def real_program
|
|
410
410
|
if ARGV.size == 1
|
411
411
|
directory_to_explore_recursively = ARGV[0]
|
412
412
|
if smells_like_gcs?(directory_to_explore_recursively)
|
413
|
-
<<<<<<< HEAD
|
414
|
-
print_stats_and_md5_for_gcs(directory_to_explore_recursively, common_opts)
|
415
|
-
else # normal file..
|
416
|
-
print_stats_and_md5_for_directory(directory_to_explore_recursively, common_opts)
|
417
|
-
end
|
418
|
-
=======
|
419
413
|
print_stats_and_md5_for_gcs(directory_to_explore_recursively, common_opts)
|
420
414
|
else # normal file..
|
421
415
|
print_stats_and_md5_for_directory_from_cli(directory_to_explore_recursively, common_opts)
|
422
416
|
end
|
423
|
-
>>>>>>> 97a64f1 (perfected CLI)
|
424
417
|
elsif ARGV.size > 1
|
425
418
|
deb "2. I expect a lot of single files or directories:"
|
426
419
|
for arg in ARGV
|
427
|
-
<<<<<<< HEAD
|
428
|
-
if File.directory?(arg)
|
429
|
-
print_stats_and_md5_for_directory(arg, common_opts)
|
430
|
-
else
|
431
|
-
print_stats_and_md5(arg, common_opts)
|
432
|
-
end
|
433
|
-
=======
|
434
420
|
if File.directory?(arg)
|
435
421
|
print_stats_and_md5_for_directory_from_cli(arg, common_opts )
|
436
422
|
else
|
437
423
|
print_stats_and_md5(arg, common_opts)
|
438
424
|
end
|
439
|
-
>>>>>>> 97a64f1 (perfected CLI)
|
440
425
|
end
|
441
426
|
else
|
442
427
|
puts "No args given. Exiting"
|
443
428
|
exit 41
|
444
429
|
end
|
445
430
|
tf = Time.now
|
446
|
-
<<<<<<< HEAD
|
447
|
-
puts "# [#{File.basename $0}] Time taken for processing #{stats_and_md5_number_of_files_processed} files: #{tf - t0}"
|
448
|
-
=======
|
449
431
|
#rounding to 3 decimals
|
450
432
|
approx_delta = (tf-t0).round(3)
|
451
433
|
puts "# [#{File.basename $0}] Time taken for processing #{stats_and_md5_number_of_files_processed} files: #{approx_delta} seconds"
|
452
|
-
>>>>>>> 97a64f1 (perfected CLI)
|
453
434
|
end
|
454
435
|
|
455
436
|
def main(filename)
|
data/bin/storazzo
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'storazzo'
|
4
|
+
|
5
|
+
|
6
|
+
if RUBY_VERSION.split('.')[0] == 1
|
7
|
+
puts "Refusing to launch a script form Ruby 1. Sorry Ric, its 2020 damn it!"
|
8
|
+
exit 2020
|
9
|
+
end
|
10
|
+
|
11
|
+
$PROG_VER = '0.1'
|
12
|
+
$DEBUG = ENV['DEBUG'] == 'true' # (true/false)
|
13
|
+
|
14
|
+
PROG_HISTORY = <<-BIG_LONG_MULTILINE
|
15
|
+
2022-0806 v0.1 First stesure
|
16
|
+
BIG_LONG_MULTILINE
|
17
|
+
|
18
|
+
|
19
|
+
$description = <<DESCRIPTION_HEREFILE.gsub(/\s+/, " ").strip
|
20
|
+
This util shall expose all Storazzo aPIs via CLI: show-local-dirs, ...
|
21
|
+
show GCS buckets, ...
|
22
|
+
|
23
|
+
It's also my dream to add some nice icons which are joy to the eye, like
|
24
|
+
some [ ] [x] before the list to show if its agood or bad directory and type also
|
25
|
+
DESCRIPTION_HEREFILE
|
26
|
+
# >> "SELECT * FROM users ORDER BY users.id DESC"
|
27
|
+
|
28
|
+
Storazzo::Main.say_hi("ARGV: #{ARGV}")
|
29
|
+
Storazzo::Main.say_hi("Note: if the version of this storazzo is behind local version youre probably using a old library.
|
30
|
+
I still need to learn how to call the binary with local/current lib/: bundle exec stiKazzi?")
|
31
|
+
Storazzo::Main.say_hi($description)
|
32
|
+
|
data/bin/storazzo-util
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
bin/storazzo
|
data/storazzo.gemspec
CHANGED
@@ -10,12 +10,16 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.files = %w(Gemfile LICENSE README.md Makefile Rakefile storazzo.gemspec
|
11
11
|
VERSION) + Dir["{bin,lib,test,var}/**/*"]
|
12
12
|
s.test_files = Dir["test/**/*"] + Dir["var/test/**/*"]
|
13
|
-
s.executables = [
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
s.executables = Dir["bin/*"].map{|full_path| # bin/blah-blah
|
14
|
+
full_path.gsub("bin/", "")
|
15
|
+
}
|
16
|
+
# [
|
17
|
+
# # todo: everything in bin/
|
18
|
+
# "ricdisk-magic",
|
19
|
+
# "stats-with-md5",
|
20
|
+
# "storazzo",
|
21
|
+
# "hello-storazzo",
|
22
|
+
# ]
|
19
23
|
s.homepage = "https://rubygems.org/gems/storazzo" # maybe https://github.com/palladius/storazzo
|
20
24
|
s.license = "MIT"
|
21
25
|
# s.add_dependency "activesupport", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storazzo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Riccardo Carlesso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -28,9 +28,11 @@ description: A simple gem to manage your external hard drives and extract MD5 an
|
|
28
28
|
common stuff from them.
|
29
29
|
email: name dot surname at popular Google-owned Mail
|
30
30
|
executables:
|
31
|
+
- hello-storazzo
|
31
32
|
- ricdisk-magic
|
33
|
+
- storazzo
|
34
|
+
- storazzo-util
|
32
35
|
- stats-with-md5
|
33
|
-
- hello-storazzo
|
34
36
|
extensions: []
|
35
37
|
extra_rdoc_files: []
|
36
38
|
files:
|
@@ -43,6 +45,8 @@ files:
|
|
43
45
|
- bin/hello-storazzo
|
44
46
|
- bin/ricdisk-magic
|
45
47
|
- bin/stats-with-md5
|
48
|
+
- bin/storazzo
|
49
|
+
- bin/storazzo-util
|
46
50
|
- lib/storazzo.rb
|
47
51
|
- lib/storazzo/colors.rb
|
48
52
|
- lib/storazzo/common.rb
|