storazzo 0.4.5 โ 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/Makefile +7 -1
- data/README.md +5 -0
- data/VERSION +1 -1
- data/bin/hello-storazzo +6 -0
- data/lib/storazzo/common.rb +37 -3
- data/lib/storazzo/main.rb +7 -2
- data/lib/storazzo/media/abstract_ric_disk.rb +26 -5
- data/lib/storazzo/media/gcs_bucket.rb +35 -0
- data/lib/storazzo/media/local_folder.rb +2 -2
- data/lib/storazzo/media/mount_point.rb +7 -1
- data/lib/storazzo/ric_disk.rb +58 -103
- data/lib/storazzo/ric_disk_config.rb +30 -1
- data/lib/storazzo/version.rb +1 -1
- data/storazzo.gemspec +2 -0
- data/test/media/test_abstract_ric_disk.rb +21 -1
- data/test/media/test_local_folder.rb +19 -27
- data/test/test_ric_disk.rb +1 -3
- data/test/test_ric_disk_config.rb +2 -0
- data/var/test/disks/ricdisk_stats_v11.rds +22 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 927e612eb67cd979a514fd123ad7c693ce89743f6c59b25c51ed71dfdf0a66f4
|
4
|
+
data.tar.gz: 0f10a5abd99ef8592a34fbc572f94b59828b453b80089838e4ba50bcfb5f5837
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413fc87ce3e29403cce9736dc22152d95ee07dbfe734795403c60a27df5dc5441f497c18a2c51ff49a8b5441cde3433002e741ede8df0cbf5820a44fe0947d33
|
7
|
+
data.tar.gz: 662d4f33d5638c85954808e9eb574596cc28cbbf6722d3d54bf4b44a08357f88a1780c407b450002c2d0d2d38a8f44bf805c490ec507a6262fd826b5c7b91864
|
data/Gemfile
CHANGED
@@ -5,4 +5,5 @@ source "https://rubygems.org"
|
|
5
5
|
gem 'rake'
|
6
6
|
#gem 'pry'
|
7
7
|
gem 'pry', :group => :development
|
8
|
-
#gem 'require_all' # yup I'm lazy: https://stackoverflow.com/questions/735073/best-way-to-require-all-files-from-a-directory-in-ruby
|
8
|
+
#gem 'require_all' # yup I'm lazy: https://stackoverflow.com/questions/735073/best-way-to-require-all-files-from-a-directory-in-ruby
|
9
|
+
#gem 'after_do' # To allow AFTER calling instance to do LOAD() automagically. Naah I can do without :)
|
data/Makefile
CHANGED
@@ -64,4 +64,10 @@ test-media-subfolder:
|
|
64
64
|
test-verbose:
|
65
65
|
rake test:verbose --verbose
|
66
66
|
test-single-file-continuously:
|
67
|
-
\watch -n 5 --color rake test TEST="test/media/test_local_folder.rb"
|
67
|
+
\watch -n 5 --color rake test TEST="test/media/test_local_folder.rb"
|
68
|
+
|
69
|
+
test-binary-with-local-gem:
|
70
|
+
ruby -Ilib bin/hello-storazzo
|
71
|
+
test-binary-with-system-gem:
|
72
|
+
bin/hello-storazzo
|
73
|
+
|
data/README.md
CHANGED
@@ -25,6 +25,11 @@ Single test in single file:
|
|
25
25
|
* `ruby -I test test/test_local_folder.rb -n test_first_directory_parsing_actually_works` (note this includes `storazzo` latest gem
|
26
26
|
and doesnt benefit from LATEST code so its NOT good for testing: use RAKE for that).
|
27
27
|
|
28
|
+
**Testing binary files** is hard: by default they 'require storazzo' and use the GEM INSTALLed version which is a few versions away, usually.
|
29
|
+
So while developing you might want to include the lib/ folder, like this:
|
30
|
+
|
31
|
+
* Use local gem (super latest) for checking latest code: `ruby -Ilib bin/hello-storazzo`
|
32
|
+
* This will use the gem installed a few days ago, likely so wont do you any good to test latest code: `bin/hello-storazzo`
|
28
33
|
|
29
34
|
Now to toggle verbosity I believe I need to go into Rakefile (bummer)
|
30
35
|
# Thanks
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.9
|
data/bin/hello-storazzo
ADDED
data/lib/storazzo/common.rb
CHANGED
@@ -5,6 +5,28 @@
|
|
5
5
|
# or
|
6
6
|
# extend Storazzo::Common (def to def self.XX)
|
7
7
|
#
|
8
|
+
=begin
|
9
|
+
Emoji to copy:
|
10
|
+
๐ ๐ ๐ โ ๐ ๐ค ๐ ๐ค ๐ค ๐ค ๐ค ๐ ๐ ๐ ๐ค โ ๐ค ๐ ๐ ๐คฒ ๐ ๐ ๐ค ๐ค ๐
|
11
|
+
๐ ๐ ๐ ๐
|
12
|
+
โบ โป ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐ ๐ ๐คฃ ๐คฉ ๐คช ๐ฅณ ๐ ๐ ๐ ๐ค ๐คก ๐ค ๐ค ๐ค kiss
|
13
|
+
๐ ๐ ๐ ๐ flirting
|
14
|
+
๐ ๐ค ๐ ๐ฅฐ ๐คค ๐ ๐ ๐ ๐ neutral
|
15
|
+
๐ถ ๐ ๐ ๐ ๐ค ๐คจ ๐ง hush
|
16
|
+
๐คญ ๐คซ ๐ฏ ๐ค ๐ ๐ ๐ ๐ณ ๐ ๐คฅ ๐ฅด shocked
|
17
|
+
๐ฎ ๐ฒ ๐คฏ tired
|
18
|
+
๐ฉ ๐ซ ๐ฅฑ ๐ช ๐ด ๐ต sad
|
19
|
+
โน ๐ฆ ๐ ๐ฅ ๐ cry
|
20
|
+
๐ข ๐ญ sick
|
21
|
+
๐คข ๐คฎ ๐ท ๐ค ๐ค ๐ฅต ๐ฅถ fear
|
22
|
+
๐ฅบ ๐ฌ ๐ ๐ฐ ๐จ ๐ฑ angry
|
23
|
+
๐ ๐ ๐ก ๐ค ๐ฃ ๐ง ๐คฌ ๐ธ ๐น ๐บ ๐ป ๐ผ ๐ฝ ๐พ ๐ฟ ๐ ๐ ๐ ๐
|
24
|
+
[see Animal Emoji ๐ฐ] gesture
|
25
|
+
๐คฆ ๐คท ๐
๐ ๐ ๐ ๐ ๐ ๐ ๐ activity
|
26
|
+
๐ฏ ๐ ๐บ ๐คณ ๐ ๐ ๐ ๐ง ๐ง ๐ง ๐ง ๐ฐ ๐คฐ ๐คฑ faces
|
27
|
+
๐ถ ๐ง ๐ฆ ๐ง ๐ฉ ๐จ ๐ง ๐ง ๐ง ๐ด ๐ต ๐ค ๐ฅ ๐ช ๐ซ ๐ฌ ๐ญ ๐ฑ ๐ณ ๐ฒ ๐ง ๐ธ ๐คด ๐
๐คถ disabled
|
28
|
+
๐ง ๐ฆป ๐ฆฎ ๐ฆฏ ๐ฆบ ๐ฆผ ๐ฆฝ ๐ฆพ ๐ฆฟ ๐คต ๐ฎ ๐ท ๐ ๐ ๐ด ๐ต ๐ฆธ ๐ฆน ๐ง ๐ง ๐ง ๐ง ๐ง ๐ง ๐ง ๐ผ ๐ฟ ๐ป ๐น ๐บ ๐ฝ ๐พ ๐ธ ๐ โ ๐ฑ ๐ง ๐ฆด ๐ ๐ ๐ ๐ ๐ ๐ข ๐
๐ฆท ๐ฆต ๐ฆถ ๐ญ ๐ฌ ๐ญ ๐ฌ ๐จ ๐ฉ ๐ช ๐ซ ๐ฐ ๐ฑ ๐ฎ ๐ฏ ๐ฃ ๐ค ๐ฅ ๐ฆ ๐ง ๐ฆ ๐ง ๐ข ๐ซ ๐ค ๐จ ๐ฅ ๐ช ๐ฒ ๐ฅ ๐ก ๐ฉ ๐ฏ ๐ ๐ฐ ๐ฒ
|
29
|
+
=end
|
8
30
|
require_relative 'colors'
|
9
31
|
require 'pry'
|
10
32
|
|
@@ -14,7 +36,7 @@ module Storazzo::Common
|
|
14
36
|
|
15
37
|
|
16
38
|
def deb(s)
|
17
|
-
puts "[DEB
|
39
|
+
puts "[DEB๐] #{yellow(s)}" if _debug_true # $DEBUG
|
18
40
|
end
|
19
41
|
# this has a yield
|
20
42
|
def if_deb?()
|
@@ -28,19 +50,31 @@ module Storazzo::Common
|
|
28
50
|
puts "[Wโ ๏ธRN] #{azure(s)}"
|
29
51
|
end
|
30
52
|
def err(str)
|
31
|
-
puts "[ERR
|
53
|
+
puts "[ERR๐] #{red(s)}" # โ
|
32
54
|
end
|
33
55
|
def bug(s)
|
34
56
|
puts "[๐] #{gray s}"
|
35
57
|
end
|
36
58
|
def pverbose(is_verbose, str)
|
37
|
-
puts "[V๐RB๐S๐] #{gray str}"
|
59
|
+
#puts "[V๐RB๐S๐] #{gray str}"
|
60
|
+
puts "[๐ฆ๐๐๐๐๐ท๐ธ๐ฆ๐ฆ๐ฆ] #{gray str}" # insects: http://xahlee.info/comp/unicode_insects.html
|
38
61
|
end
|
39
62
|
def ppp(complex_object_to_colorize)
|
40
63
|
# TODO i need to learn to return without printing..
|
41
64
|
Pry::ColorPrinter.pp(complex_object_to_colorize)
|
42
65
|
end
|
43
66
|
|
67
|
+
def fatal(s)
|
68
|
+
raise "[F๐TAL] #{red s}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def mac?
|
72
|
+
`uname`.chomp == 'Darwin'
|
73
|
+
end
|
74
|
+
def linux?
|
75
|
+
`uname`.chomp == 'Linux'
|
76
|
+
end
|
77
|
+
|
44
78
|
private
|
45
79
|
def _debug_true
|
46
80
|
$DEBUG or ENV["DEBUG"] == 'true'
|
data/lib/storazzo/main.rb
CHANGED
@@ -20,11 +20,16 @@ module Storazzo
|
|
20
20
|
|
21
21
|
# version 1.2
|
22
22
|
def self.say_hi(message=nil)
|
23
|
-
str =
|
24
|
-
str += " Message: '#{yellow message.to_s}'" if message
|
23
|
+
str = get_hi(message)
|
25
24
|
puts str
|
26
25
|
str
|
27
26
|
end
|
27
|
+
# salutation
|
28
|
+
def self.get_hi(message=nil)
|
29
|
+
str = "Hello from Storazzo v#{white Storazzo::version rescue "Error: #{$!}"}!"
|
30
|
+
str += " Message: '#{yellow message.to_s}'" if message
|
31
|
+
str
|
32
|
+
end
|
28
33
|
|
29
34
|
def self.all_mounts(opts={})
|
30
35
|
opts_verbose = opts.fetch :verbose, true
|
@@ -9,18 +9,27 @@ module Storazzo::Media
|
|
9
9
|
# way to do this is this:
|
10
10
|
|
11
11
|
# attr_accessor :name, :description, :ricdisk_file, :local_mountpoint, :wr, :path, :ricdisk_file_empty, :size, :active_dirs
|
12
|
-
|
13
|
-
|
12
|
+
attr_accessor :description
|
14
13
|
########################
|
15
14
|
# Abstract methods START
|
16
15
|
########################
|
17
16
|
def initialize(local_mount)
|
18
|
-
|
19
|
-
|
17
|
+
deb "[AbstractRicDisk.init()] Some child of AbstractRicDisk (#{self}) called me! Yummie." # disable when you dont need me anymore..
|
18
|
+
@description ||= "Not provided"
|
19
|
+
#validate
|
20
20
|
end
|
21
21
|
def self.list_all
|
22
22
|
raise "[AbstractRicDiskc::self.list_all] You should override this, says StackOverflow and Riccardo"
|
23
23
|
end
|
24
|
+
def self.list_all_with_type
|
25
|
+
raise "[AbstractRicDiskc::self.list_all_with_type] You should override this, says StackOverflow and Riccardo"
|
26
|
+
end
|
27
|
+
def self.super_duper_list_all_with_type
|
28
|
+
deb "Would be cool to be able to enumerate them all.."
|
29
|
+
GcsBucket.list_all_with_type +
|
30
|
+
MountPoint.list_all_with_type +
|
31
|
+
LocalFolder.list_all_with_type
|
32
|
+
end
|
24
33
|
def parse(opts={})
|
25
34
|
raise "[AbstractRicDiskc::parse] You should override this, says StackOverflow and Riccardo"
|
26
35
|
end
|
@@ -66,6 +75,13 @@ module Storazzo::Media
|
|
66
75
|
"MD5::v1::#{hash}"
|
67
76
|
end
|
68
77
|
|
78
|
+
def to_s(verbose=false)
|
79
|
+
return to_verbose_s() if verbose
|
80
|
+
readable_class = self.class.to_s.split('::').last # Storazzo::Media::LocalFolder => LocalFolder
|
81
|
+
my_keys = self.instance_variables # wow!
|
82
|
+
"S:M:#{readable_class}(path=#{path}, r/w=#{wr}, keys=#{my_keys})"
|
83
|
+
end
|
84
|
+
|
69
85
|
def to_verbose_s
|
70
86
|
h = {}
|
71
87
|
h[:class] = self.class
|
@@ -82,6 +98,7 @@ module Storazzo::Media
|
|
82
98
|
def self.abstract_class_mandatory_methods
|
83
99
|
%W{
|
84
100
|
self.list_all
|
101
|
+
self.list_all_with_type
|
85
102
|
local_mountpoint
|
86
103
|
parse
|
87
104
|
writeable?
|
@@ -91,7 +108,9 @@ module Storazzo::Media
|
|
91
108
|
# Putting here since its same code for MountPoint or generic folder.
|
92
109
|
def parse_block_storage_folder(opts={})
|
93
110
|
#Storazzo::RicDiskUgly.calculate_stats_files(get_local_mountpoint)
|
94
|
-
Storazzo::RicDisk.
|
111
|
+
rd = Storazzo::RicDisk.new(self)
|
112
|
+
#Storazzo::RicDisk
|
113
|
+
rd.compute_stats_files(opts)
|
95
114
|
#return "42"
|
96
115
|
end
|
97
116
|
|
@@ -122,6 +141,8 @@ module Storazzo::Media
|
|
122
141
|
raise "I need a path/directory string: #{path}" unless path.is_a?(String)
|
123
142
|
|
124
143
|
deb "TODO: if coincides with MountPoint, instance THAT"
|
144
|
+
# if path in Storazzo::Media::MountPoint.list_all_mount_points
|
145
|
+
# then return ...
|
125
146
|
if path =~ /^gs:\/\//
|
126
147
|
deb "Smells like GCS"
|
127
148
|
return GcsBucket.new(path)
|
@@ -2,6 +2,20 @@ module Storazzo::Media
|
|
2
2
|
|
3
3
|
class Storazzo::RicDisk::GcsBucket
|
4
4
|
|
5
|
+
extend Storazzo::Common
|
6
|
+
|
7
|
+
attr_accessor :project_id
|
8
|
+
|
9
|
+
def initialize(local_mount, project_id=nil)
|
10
|
+
deb "[Storazzo::Media::GcsBucket] initialize"
|
11
|
+
|
12
|
+
@local_mountpoint = File.expand_path(local_mount)
|
13
|
+
@description = "MountPoint in '#{local_mount}' pointing at TODO with mount options = TODO"
|
14
|
+
@project_id = project_id
|
15
|
+
raise "Sorry local mount doesnt exist!" unless File.exist?(@local_mountpoint)
|
16
|
+
@wr = writeable? # File.writable?(stats_filename_default_fullpath) # .writeable? stats_file_smart_fullpath
|
17
|
+
super(local_mount) rescue "SUPER_ERROR(#{local_mount}): #{$!}"
|
18
|
+
end
|
5
19
|
|
6
20
|
def self.list_all(config=nil)
|
7
21
|
# get lisrts from Config singletone
|
@@ -13,8 +27,29 @@ module Storazzo::Media
|
|
13
27
|
#puts "TODO see config: #{config}"
|
14
28
|
#[42, 43]
|
15
29
|
#deb config.get_local_folders
|
30
|
+
# TODO
|
31
|
+
pverbose true, "TODO(ricc): also add gsutil ls. For that please use the new 'list_all_with_type' (Id refactor it but Im afraid of leaving bad code dangling so before a proper refactor lets implement both side by side"
|
16
32
|
config.get_bucket_paths
|
17
33
|
end
|
34
|
+
def self.list_all_with_type(config=nil)
|
35
|
+
config ||= Storazzo::RicDiskConfig.instance
|
36
|
+
config.load # in case I need to load it for the first time
|
37
|
+
deb "TODO(ricc): also add gsutil ls"
|
38
|
+
# getFromConfig
|
39
|
+
deb "I'm now returning a 'complex' array to tell the caller what kind of element they're getting, eg: GCS from Config Yaml, vs GCS from gsutil ls "
|
40
|
+
list_from_config_with_type = config.get_bucket_paths.map{|path| [:config_gcs_bucket, path] }
|
41
|
+
if (config.project_id)
|
42
|
+
# so I concatenate Apples with Bananas with names
|
43
|
+
return list_from_config_with_type + list_available_buckets(config.project_id).map{|path| [:gsutil_ls_gcs_bucket, path] }
|
44
|
+
end
|
45
|
+
return list_from_config_with_type
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.list_available_buckets(project_id, opts={})
|
49
|
+
list_of_buckets = `gsutil ls --project '#{project_id}'`.chomp.split("\n")
|
50
|
+
deb "list_of_buckets: #{list_of_buckets}"
|
51
|
+
list_of_buckets
|
52
|
+
end
|
18
53
|
|
19
54
|
|
20
55
|
end
|
@@ -12,9 +12,9 @@ module Storazzo::Media
|
|
12
12
|
deb "[Storazzo::Media::LocalFolder] initialize"
|
13
13
|
|
14
14
|
@local_mountpoint = File.expand_path(local_mount)
|
15
|
+
@description = "Local Folder originally in '#{local_mount}'"
|
15
16
|
raise "Sorry local mount doesnt exist!" unless File.exist?(@local_mountpoint)
|
16
|
-
@wr = File.writable?(stats_filename_default_fullpath) # .writeable? stats_file_smart_fullpath
|
17
|
-
|
17
|
+
@wr = writeable? # File.writable?(stats_filename_default_fullpath) # .writeable? stats_file_smart_fullpath
|
18
18
|
#super.initialize(local_mount) rescue "SUPER_ERROR: #{$!}"
|
19
19
|
super(local_mount) rescue "SUPER_ERROR(#{local_mount}): #{$!}"
|
20
20
|
end
|
@@ -1,7 +1,13 @@
|
|
1
1
|
# TODO
|
2
2
|
module Storazzo::Media
|
3
3
|
class Storazzo::Media::MountPoint < Storazzo::Media::AbstractRicDisk
|
4
|
-
puts "[REMOVEME] Storazzo::Media::MountPoint being read. REMOVEME when you see this :)"
|
4
|
+
#puts "[REMOVEME] Storazzo::Media::MountPoint being read. REMOVEME when you see this :)"
|
5
|
+
|
6
|
+
|
7
|
+
def self.list_local_mount_points()
|
8
|
+
deb "Maybe its abuot time you refactor that method here :)"
|
9
|
+
RicDisk.interesting_mount_points()
|
10
|
+
end
|
5
11
|
end
|
6
12
|
end
|
7
13
|
|
data/lib/storazzo/ric_disk.rb
CHANGED
@@ -8,6 +8,7 @@ module Storazzo
|
|
8
8
|
|
9
9
|
include Hashify
|
10
10
|
include Storazzo::Common
|
11
|
+
extend Storazzo::Common
|
11
12
|
extend Storazzo::Colors
|
12
13
|
require 'socket'
|
13
14
|
|
@@ -64,7 +65,7 @@ module Storazzo
|
|
64
65
|
#@wr = File.writable?("#{path}/#{ricdisk_file}" ) # .writeable?
|
65
66
|
#@wr = writeable?
|
66
67
|
@tags = ['ricdisk', 'storazzo']
|
67
|
-
@size = _compute_size_could_take_long(path)
|
68
|
+
@size = RicDisk._compute_size_could_take_long(path)
|
68
69
|
@unique_hash = "MD5::" + Digest::MD5.hexdigest(File.expand_path(path)) # hash = Digest::MD5.hexdigest(File.expand_path(get_local_mountpoint))
|
69
70
|
@computation_hostname = Socket.gethostname
|
70
71
|
@created_at = Time.now
|
@@ -111,7 +112,7 @@ module Storazzo
|
|
111
112
|
# end
|
112
113
|
def self._compute_size_could_take_long(my_path)
|
113
114
|
deb "Could take long. TODO(ricc): add some sort of cutoff/timeout to 5 seconds."
|
114
|
-
puts azure('could take long')
|
115
|
+
puts azure('could take long. Please take precautions like forking with timeout of 5sec')
|
115
116
|
`du -s '#{my_path}' 2>/dev/null`.chomp.split(/\s/)[0] # self.size
|
116
117
|
end
|
117
118
|
|
@@ -330,63 +331,76 @@ module Storazzo
|
|
330
331
|
end
|
331
332
|
|
332
333
|
def compute_stats_files(opts={})
|
333
|
-
puts azure("[compute_stats_files] TODO implement natively. Now I'm being lazy")
|
334
334
|
#Storazzo::RicDisk.calculate_stats_files(path, opts)
|
335
|
-
opts_upload_to_gcs = opts.fetch :upload_to_gcs,
|
335
|
+
opts_upload_to_gcs = opts.fetch :upload_to_gcs, false
|
336
|
+
opts_force_rewrite = opts.fetch :force, false
|
337
|
+
opts_stats_file = opts.fetch :stats_file, "ricdisk_stats_v11.rds" # default. TODO point to proper..
|
336
338
|
dir = path
|
339
|
+
puts azure("[compute_stats_files] TODO implement natively. Now I'm being lazy. stats_file=#{opts_stats_file} dir=#{dir}")
|
337
340
|
|
338
|
-
full_file_path = "#{dir}/#{
|
339
|
-
|
341
|
+
full_file_path = "#{dir}/#{opts_stats_file}"
|
342
|
+
deb "This refactor is for another day. Actually no, TODAY "
|
343
|
+
pverbose true, "TODO(ricc): you should compute more SMARTLY the full_file_path (#{full_file_path}): if its R/O it should be elsewhere.."
|
344
|
+
puts azure("- full_file_path: #{full_file_path}")
|
345
|
+
puts azure("- writeable?: #{writeable?}")
|
340
346
|
|
341
347
|
puts("compute_stats_files(#{white dir}): #{white full_file_path}")
|
342
|
-
|
348
|
+
deb "TEST1 DIR EXISTS: #{dir} -> #{File.directory? dir}"
|
349
|
+
raise "Directory doesnt exist: #{dir}" unless File.directory?(dir)
|
343
350
|
Dir.chdir(dir)
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
351
|
+
puts azure `ls` # im curious
|
352
|
+
if File.exists?(full_file_path)
|
353
|
+
if opts_force_rewrite
|
354
|
+
#raise "TODO implement file exists and FORCE enabled"
|
355
|
+
RicDisk.compute_stats_for_dir_into_file(dir, full_file_path, "ReWrite enabled")
|
356
|
+
else # File.exists?(full_file_path) and (opts_force)
|
357
|
+
puts "File '#{opts_stats_file}' exists already." # - now should see if its too old, like more than 1 week old"
|
358
|
+
# TODO check for file time...
|
359
|
+
print "Lines found: #{yellow `wc -l "#{full_file_path}" `.chomp }. File obsolescence (days): #{yellow obsolescence_days(full_file_path)}."
|
360
|
+
if obsolescence_days(full_file_path) > 7
|
361
|
+
#puts yellow("*** ACHTUNG *** FIle is pretty old. You might consider rotating: #{yellow "mv #{full_file_path} #{full_file_path}_old"}. Or invoke with --force")
|
362
|
+
puts yellow("*** ACHTUNG *** FIle is pretty old. I'll force a rewrite")
|
363
|
+
RicDisk.compute_stats_for_dir_into_file(dir, full_file_path, "File older than 7 days. Indeed: #{obsolescence_days(full_file_path)}")
|
364
|
+
end
|
365
|
+
upload_to_gcs(full_file_path) if opts_upload_to_gcs
|
350
366
|
end
|
351
|
-
upload_to_gcs(full_file_path) if opts_upload_to_gcs
|
352
367
|
else
|
353
|
-
|
354
|
-
|
355
|
-
puts("[#{`pwd`.chomp}] Executing: #{azure command}")
|
356
|
-
ret = backquote_execute(command)
|
357
|
-
puts "Done. #{ret.split("\n").count} files processed."
|
368
|
+
deb("File doesnt exist..")
|
369
|
+
RicDisk.compute_stats_for_dir_into_file(dir, full_file_path, "ConfigFile doesn't exist")
|
358
370
|
end
|
359
371
|
end
|
360
|
-
|
361
|
-
|
362
372
|
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
return "This refactor is for another day"
|
369
|
-
|
370
|
-
puts("calculate_stats_files(#{white dir}): #{white full_file_path}")
|
371
|
-
puts "TEST1 DIR EXISTS: #{dir} -> #{File.directory? dir}"
|
372
|
-
Dir.chdir(dir)
|
373
|
-
if File.exists?(full_file_path) and ($opts[:force] == false)
|
374
|
-
puts "File '#{$stats_file}' exists already." # - now should see if its too old, like more than 1 week old"
|
375
|
-
# TODO check for file time...
|
376
|
-
print "Lines found: #{yellow `wc -l "#{full_file_path}" `.chomp }. File obsolescence (days): #{yellow obsolescence_days(full_file_path)}."
|
377
|
-
if obsolescence_days(full_file_path) > 7
|
378
|
-
puts("*** ACHTUNG *** FIle is pretty old. You might consider rotating: #{yellow "mv #{full_file_path} #{full_file_path}_old"}. Or invoke with --force")
|
379
|
-
end
|
380
|
-
upload_to_gcs(full_file_path) if opts_upload_to_gcs
|
381
|
-
else
|
382
|
-
puts "Crunching data stats from '#{dir}' into '#{$stats_file}' ... please bear with me.. [maybe file didnt exist, maybe $opts[:force] is true]"
|
373
|
+
def self.compute_stats_for_dir_into_file(dir, full_file_path, reason, opts={})
|
374
|
+
max_lines = opts.fetch :max_lines, 42 # todo move to nil or -1
|
375
|
+
#full_file_path = "#{dir}/#{stats_file}"
|
376
|
+
puts "Crunching data stats from '#{dir}' into '#{full_file_path}' ... please bear with me.. [reason: '#{reason}']"
|
377
|
+
if max_lines < 0 # infinite
|
383
378
|
command = "find . -print0 | xargs -0 stats-with-md5 --no-color | tee '#{full_file_path}'"
|
384
|
-
|
385
|
-
|
386
|
-
|
379
|
+
else
|
380
|
+
# WOW! https://stackoverflow.com/questions/68599963/reliably-stop-bash-find-after-n-matches
|
381
|
+
# find . -type f -iname "*.txt" -print0 |
|
382
|
+
# head -z -n 10 |
|
383
|
+
# xargs -r0 myscript.sh
|
384
|
+
if mac?
|
385
|
+
puts red("Sorry head -z doesnt work on Mac :/ so this head -N will be VERY approximate. Probably you should divide by ten or so :)")
|
386
|
+
spannometric_lines = (max_lines/10)
|
387
|
+
command = "find . -print0 | head -n '#{spannometric_lines}' | xargs -r0 stats-with-md5 --no-color | tee '#{full_file_path}'"
|
388
|
+
else
|
389
|
+
command = "find . -print0 | head -z -n '#{max_lines}' | xargs -r0 stats-with-md5 --no-color | tee '#{full_file_path}'"
|
390
|
+
end
|
387
391
|
end
|
392
|
+
puts("[#{`pwd`.chomp}] Executing: #{azure command}")
|
393
|
+
ret = backquote_execute(command)
|
394
|
+
puts "Done. #{ret.split("\n").count} files processed."
|
388
395
|
end
|
389
396
|
|
397
|
+
|
398
|
+
|
399
|
+
def self.calculate_stats_files_DUPLICATE_STATIC(dir, opts={})
|
400
|
+
raise "Please use object instead. If you cant, please move the object code to STATIC and dedupe code!"
|
401
|
+
end
|
402
|
+
|
403
|
+
|
390
404
|
# if also_mountpoints
|
391
405
|
# =begin
|
392
406
|
# Example output from mount:
|
@@ -427,65 +441,6 @@ end #/Module
|
|
427
441
|
|
428
442
|
|
429
443
|
|
430
|
-
# def initialize(path, ricdisk_file)
|
431
|
-
# puts "[DEB] RicDisk initialize.. path=#{path}"
|
432
|
-
# @local_mountpoint = path
|
433
|
-
# @description = "This is an automated RicDisk description from v.#{VERSION}. Riccardo feel free to edit away with characteristicshs of this device.. Created on #{Time.now}'"
|
434
|
-
# @ricdisk_version = VERSION
|
435
|
-
# @ricdisk_file = ricdisk_file
|
436
|
-
# #@questo_non_esiste = :sobenme
|
437
|
-
# @label = path.split("/").last
|
438
|
-
# @name = path.split("/").last
|
439
|
-
# @wr = File.writable?("#{path}/#{ricdisk_file}" ) # .writeable?
|
440
|
-
# @tags = 'ricdisk'
|
441
|
-
# puts :beleza
|
442
|
-
# @config = RicDiskConfig.instance.get_config
|
443
|
-
# #puts @config if @config
|
444
|
-
# find_info_from_mount(path)
|
445
|
-
# find_info_from_df()
|
446
|
-
# end
|
447
|
-
|
448
|
-
# def ricdisk_absolute_path
|
449
|
-
# @local_mountpoint + "/" + @ricdisk_file
|
450
|
-
# end
|
451
|
-
|
452
|
-
# def add_tag(tag)
|
453
|
-
# @tags += ", #{tag}"
|
454
|
-
# end
|
455
|
-
|
456
|
-
# # might have other things in the future...
|
457
|
-
# def find_info_from_mount(path)
|
458
|
-
# mount_table_lines = interesting_mount_points()
|
459
|
-
# mount_line = nil
|
460
|
-
# mount_table_lines.each do |line|
|
461
|
-
# next if line =~ /^map /
|
462
|
-
# dev, on, mount_path, mode = line.split(/ /)
|
463
|
-
# if mount_path==path
|
464
|
-
# mount_line = line
|
465
|
-
# else
|
466
|
-
# @info_from_mount = false
|
467
|
-
# end
|
468
|
-
# end
|
469
|
-
# @info_from_mount = ! (mount_line.nil?)
|
470
|
-
# if @info_from_mount
|
471
|
-
# #@mount_line = mount_line
|
472
|
-
# @description += "\nMount line:\n" + mount_line
|
473
|
-
# @remote_mountpoint = mount_line.split(/ /)[0]
|
474
|
-
# @fstype = mount_line.split(/ /)[3].gsub(/[\(,]/, '')
|
475
|
-
# add_tag(:synology) if @remote_mountpoint.match('1.0.1.10')
|
476
|
-
# end
|
477
|
-
# end
|
478
|
-
|
479
|
-
# def find_info_from_df()
|
480
|
-
# path = @local_mountpoint
|
481
|
-
# df_info = `df -h "#{path}"`
|
482
|
-
# @df_info = df_info
|
483
|
-
# lines = df_info.split(/\n+/)
|
484
|
-
# raise "I need exactly TWO lines! Or no info is served here..." unless lines.size == 2
|
485
|
-
# mount, @size_readable, used_size, avail_size, @disk_utilization, other = lines[1].split(/\s+/) # second line..
|
486
|
-
# end
|
487
|
-
|
488
|
-
|
489
444
|
|
490
445
|
|
491
446
|
|
@@ -14,6 +14,10 @@ end
|
|
14
14
|
|
15
15
|
Storazzo::RicDiskConfig.instance()
|
16
16
|
|
17
|
+
or better
|
18
|
+
|
19
|
+
Storazzo::RicDiskConfig.safe_instance()
|
20
|
+
|
17
21
|
Note that being a Singleton, in Unit Tests it's hard to use the /etc/storazzo_config.sample.yaml instead
|
18
22
|
of the real one - yiikes. How do I fix it? Do I unsingleton it? :) Or do I create TWO singletons? :)
|
19
23
|
=end
|
@@ -28,7 +32,7 @@ module Storazzo
|
|
28
32
|
include Storazzo::Colors
|
29
33
|
|
30
34
|
DefaultConfigLocation = File.expand_path "~/.storazzo.yaml"
|
31
|
-
|
35
|
+
|
32
36
|
DefaultConfigLocations = [
|
33
37
|
File.expand_path("~/.storazzo.yaml") , # HOME
|
34
38
|
File.expand_path("./.storazzo.yaml") , # LOCAL DIR
|
@@ -106,6 +110,9 @@ public
|
|
106
110
|
#self.
|
107
111
|
@config['Config']['DefaultFolder'] #rescue "Unknown config_default_folder: #{$!}"
|
108
112
|
end
|
113
|
+
def config_project_id
|
114
|
+
@config['Config']['Backends']['GoogleCloudStorage']['ProjectId']
|
115
|
+
end
|
109
116
|
def already_loaded?
|
110
117
|
#return
|
111
118
|
load_called == true
|
@@ -127,6 +134,7 @@ public
|
|
127
134
|
h[:id] = self.object_id
|
128
135
|
h[:get_bucket_paths] = self.get_bucket_paths()
|
129
136
|
h[:get_local_folders] = self.get_local_folders()
|
137
|
+
h[:config_project_id] = self.config_project_id()
|
130
138
|
return h
|
131
139
|
end
|
132
140
|
|
@@ -140,6 +148,9 @@ public
|
|
140
148
|
end
|
141
149
|
|
142
150
|
|
151
|
+
#Storazzo::RicDiskConfig
|
152
|
+
|
153
|
+
|
143
154
|
# returns all folders from file which are Directories
|
144
155
|
# This method is FLAKY! Sometimes gives error.
|
145
156
|
# LocalFolderTest#test_show_all_shouldnt_fail_and_should_return_a_non_empty_array:
|
@@ -203,11 +214,29 @@ public
|
|
203
214
|
end
|
204
215
|
|
205
216
|
|
217
|
+
def self.safe_instance()
|
218
|
+
puts "This is a safe instance :)"
|
219
|
+
my_config = self.instance()
|
220
|
+
my_config.load
|
221
|
+
my_config
|
222
|
+
end
|
223
|
+
|
206
224
|
def self.get_config
|
207
225
|
self.instance.load unless self.instance.load_called
|
208
226
|
self.instance.get_config
|
209
227
|
end
|
228
|
+
|
229
|
+
# # gem 'after_do'
|
230
|
+
# require 'after_do'
|
231
|
+
# Storazzo::RicDiskConfig.extend AfterDo
|
232
|
+
# Storazzo::RicDiskConfig.after :instance do # |activity| #:pause, :finish, :resurrect, :do_today, :do_another_day
|
233
|
+
# puts yellow("after INSTANCE() has been called I call LOAD!!!")
|
234
|
+
# self.load
|
235
|
+
# #persistor.save activity
|
236
|
+
# end
|
237
|
+
|
210
238
|
end # class Storazzo::RicDiskConfig
|
211
239
|
|
240
|
+
|
212
241
|
end # module Storazzo
|
213
242
|
|
data/lib/storazzo/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# copied from https://github.com/rails/strong_parameters/edit/master/lib/strong_parameters/version.rb
|
2
2
|
# I;'m copying the DHH philosophy here.
|
3
3
|
module Storazzo
|
4
|
-
DHH_VERSION = "0.2.
|
4
|
+
#DHH_VERSION = "0.2.3._TODOFileRead.1" # TODO file.read ../../VERSION . chomp
|
5
5
|
RICC_VERSION = File.read("../VERSION").chomp
|
6
6
|
|
7
7
|
public
|
data/storazzo.gemspec
CHANGED
@@ -10,8 +10,10 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.files = %w(Gemfile LICENSE README.md Makefile Rakefile storazzo.gemspec VERSION) + Dir["{bin,lib,test,var}/**/*"]
|
11
11
|
s.test_files = Dir["test/**/*"] + Dir["var/test/**/*"]
|
12
12
|
s.executables = [
|
13
|
+
# todo: everything in bin/
|
13
14
|
"ricdisk-magic",
|
14
15
|
"stats-with-md5",
|
16
|
+
"hello-storazzo",
|
15
17
|
]
|
16
18
|
s.homepage = "https://rubygems.org/gems/storazzo" # maybe https://github.com/palladius/storazzo
|
17
19
|
s.license = "MIT"
|
@@ -1,3 +1,23 @@
|
|
1
1
|
# TODO
|
2
2
|
require "minitest/autorun"
|
3
|
-
require "storazzo"
|
3
|
+
require "storazzo"
|
4
|
+
|
5
|
+
|
6
|
+
#require 'pry' # must install the gem... but you ALWAYS want pry installed anyways
|
7
|
+
|
8
|
+
|
9
|
+
class AbstractRicDiskTest < Minitest::Test
|
10
|
+
|
11
|
+
include Storazzo::Common
|
12
|
+
|
13
|
+
def test_super_duper_list_all_with_type_returns_something
|
14
|
+
deb "This would be already... something :) it means they're all implemented"
|
15
|
+
ret =
|
16
|
+
assert(
|
17
|
+
ret.class,
|
18
|
+
Array,
|
19
|
+
"test_super_duper_list_all_with_type_returns_something should return an array.."
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -20,7 +20,7 @@ class LocalFolderTest < Minitest::Test
|
|
20
20
|
include Storazzo::Colors
|
21
21
|
puts yellow("LocalFolderTest: tear up")
|
22
22
|
#$config_useless = Storazzo::RicDiskConfig.instance()
|
23
|
-
$config = Storazzo::RicDiskSampleConfig.
|
23
|
+
$config = Storazzo::RicDiskSampleConfig.safe_instance()
|
24
24
|
$config_load = $config.load()
|
25
25
|
puts $config.to_verbose_s
|
26
26
|
|
@@ -44,16 +44,15 @@ class LocalFolderTest < Minitest::Test
|
|
44
44
|
|
45
45
|
# To only test this:
|
46
46
|
# $ ruby -I test test/test_local_folder.rb -n test_first_directory_parsing_actually_works
|
47
|
-
def
|
47
|
+
def test_1_first_directory_parsing_actually_works()
|
48
48
|
# include module
|
49
49
|
|
50
50
|
#p $vediamo_se_funge
|
51
51
|
puts("(#{__FILE__}) WEIRD THING: This test is flaky. SKipping for now until I complete the LocalFolder.parse() code")
|
52
52
|
folders = Storazzo::Media::LocalFolder.list_all
|
53
53
|
puts "Folders: #{folders}"
|
54
|
-
config = Storazzo::RicDiskSampleConfig.
|
54
|
+
config = Storazzo::RicDiskSampleConfig.safe_instance()
|
55
55
|
puts "config1: #{config}"
|
56
|
-
config.load
|
57
56
|
puts "config2: #{config.load}"
|
58
57
|
test_dir = folders.first
|
59
58
|
puts "test_first_directory_parsing_actually_works() TestDir: #{test_dir}"
|
@@ -76,14 +75,13 @@ class LocalFolderTest < Minitest::Test
|
|
76
75
|
puts $config
|
77
76
|
end
|
78
77
|
|
79
|
-
def
|
80
|
-
#
|
81
|
-
puts("(#{__FILE__}) WEIRD THING: This test is flaky. SKipping for now until I complete the LocalFolder.parse() code")
|
78
|
+
def test_2_iterate_through_file_list_for_disks
|
79
|
+
#puts("(#{__FILE__}) WEIRD THING: This test is flaky. SKipping for now until I complete the LocalFolder.parse() code")
|
82
80
|
folders = Storazzo::Media::LocalFolder.list_all
|
83
81
|
puts "Folders: #{folders}"
|
84
|
-
config = Storazzo::RicDiskSampleConfig.
|
85
|
-
puts "config1: #{config}"
|
82
|
+
config = Storazzo::RicDiskSampleConfig.safe_instance()
|
86
83
|
config.load
|
84
|
+
puts "config1: #{config}"
|
87
85
|
puts "config2: #{config.load}"
|
88
86
|
test_dir = folders.first
|
89
87
|
puts "test_first_directory_parsing_actually_works() TestDir: #{test_dir}"
|
@@ -103,11 +101,11 @@ class LocalFolderTest < Minitest::Test
|
|
103
101
|
)
|
104
102
|
end
|
105
103
|
|
106
|
-
def
|
107
|
-
test_dir = "/etc/"
|
104
|
+
def test_readonly_directory_creates_configfile_outside_of_dir
|
105
|
+
test_dir = "/etc/ssh/"
|
108
106
|
disk = Storazzo::Media::LocalFolder.new(test_dir)
|
109
107
|
stats_file = disk.stats_filename_default_fullpath
|
110
|
-
config = Storazzo::RicDiskSampleConfig.
|
108
|
+
config = Storazzo::RicDiskSampleConfig.safe_instance()
|
111
109
|
config.load
|
112
110
|
config.iterate_through_file_list_for_disks([test_dir])
|
113
111
|
assert(
|
@@ -118,18 +116,11 @@ class LocalFolderTest < Minitest::Test
|
|
118
116
|
end
|
119
117
|
|
120
118
|
def test_readonly_directory_is_indeed_readonly
|
121
|
-
test_dir = "/etc/"
|
119
|
+
test_dir = "/etc/ssh"
|
122
120
|
readonly_rdisk = Storazzo::Media::LocalFolder.new(test_dir)
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
# config.iterate_through_file_list_for_disks([test_dir])
|
127
|
-
# assert(
|
128
|
-
# not(File.exists?(stats_file)),
|
129
|
-
# "parse on LocalFolder should NOT create file '#{stats_file}' but another in another TODO place"
|
130
|
-
# )
|
131
|
-
#readonly_rdisk = Storazzo::RicDisk.new(test_dir)
|
132
|
-
ppp(readonly_rdisk.to_verbose_s)
|
121
|
+
if_deb? do
|
122
|
+
ppp(readonly_rdisk.to_verbose_s)
|
123
|
+
end
|
133
124
|
assert_equal(
|
134
125
|
readonly_rdisk.wr,
|
135
126
|
false,
|
@@ -139,16 +130,17 @@ class LocalFolderTest < Minitest::Test
|
|
139
130
|
end
|
140
131
|
|
141
132
|
|
142
|
-
def
|
133
|
+
def test_writeable_tmp_directory_is_indeed_writeable
|
143
134
|
test_dir = '/tmp/'
|
135
|
+
#test_dir = '~'
|
144
136
|
writeable_rdisk = Storazzo::Media::LocalFolder.new(test_dir)
|
145
137
|
#writeable_rdisk = Storazzo::RicDisk.new(test_dir)
|
138
|
+
if_deb?{ ppp(writeable_rdisk.to_verbose_s) }
|
146
139
|
assert_equal(
|
147
|
-
writeable_rdisk.wr,
|
148
140
|
true,
|
149
|
-
|
141
|
+
writeable_rdisk.wr,
|
142
|
+
"Folder #{test_dir} is INDEED writeble to the author's knowledge, although triggers lot of noise => wr=#{ writeable_rdisk.wr }"
|
150
143
|
)
|
151
|
-
|
152
144
|
end
|
153
145
|
|
154
146
|
|
data/test/test_ric_disk.rb
CHANGED
@@ -4,7 +4,7 @@ require "storazzo"
|
|
4
4
|
class RicDiskTest < Minitest::Test
|
5
5
|
|
6
6
|
def test_factory_works_for_gcs
|
7
|
-
rd1 = RicDisk.new('/tmp')
|
7
|
+
rd1 = Storazzo::RicDisk.new('/tmp')
|
8
8
|
hash = rd1.to_verbose_s()
|
9
9
|
pp hash
|
10
10
|
assert_equal(
|
@@ -14,6 +14,4 @@ class RicDiskTest < Minitest::Test
|
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
17
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# [print_stats_and_md5_for_directory] DIR to explore (make sure you glob also): .
|
2
|
+
# DEB Options: {:max_files=>nil, :color=>false, :verbose=>false, :autowrite=>false}
|
3
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-30T11:54:42+02:00 0 [text/plain] ./ricdisk_stats_v11.rds
|
4
|
+
[file_v1.2] ______________NONE______________ 040755 d 2022-07-28T12:11:48+02:00 200 [inode/directory] ./disk01-empty
|
5
|
+
[file_v1.2] ______________NONE______________ 040755 d 2022-07-29T19:00:54+02:00 300 [inode/directory] ./disk02-full
|
6
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-24T06:38:25+02:00 0 [inode/x-empty] ./disk02-full/fake file.touch
|
7
|
+
[file_v1.2] f344106fac7926960912486256a56af9 100644 f 2022-07-24T06:38:25+02:00 454 [text/plain] ./disk02-full/ls.txt
|
8
|
+
[file_v1.2] 437b184a6b045975f0fb6c8c978f28ad 100644 f 2022-07-29T19:01:26+02:00 507 [text/plain] ./disk02-full/Rakefile
|
9
|
+
# [print_stats_and_md5_for_directory] DIR to explore (make sure you glob also): ./disk01-empty
|
10
|
+
# DEB Options: {:max_files=>nil, :color=>false, :verbose=>false, :autowrite=>false}
|
11
|
+
[file_v1.2] f8382af52d00023dc4ee9e9029b367b9 100644 f 2022-07-28T14:30:46+02:00 1022 [text/plain] ./disk01-empty/.ricdisk
|
12
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-24T06:38:25+02:00 0 [inode/x-empty] ./disk01-empty/.keep
|
13
|
+
# [print_stats_and_md5_for_directory] DIR to explore (make sure you glob also): ./disk02-full
|
14
|
+
# DEB Options: {:max_files=>nil, :color=>false, :verbose=>false, :autowrite=>false}
|
15
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-24T06:38:25+02:00 0 [inode/x-empty] ./disk02-full/fake file.touch
|
16
|
+
[file_v1.2] f344106fac7926960912486256a56af9 100644 f 2022-07-24T06:38:25+02:00 454 [text/plain] ./disk02-full/ls.txt
|
17
|
+
[file_v1.2] 437b184a6b045975f0fb6c8c978f28ad 100644 f 2022-07-29T19:01:26+02:00 507 [text/plain] ./disk02-full/Rakefile
|
18
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-24T06:38:25+02:00 0 [inode/x-empty] ./disk02-full/.ricdisk
|
19
|
+
[file_v1.2] d41d8cd98f00b204e9800998ecf8427e 100644 f 2022-07-24T06:38:25+02:00 0 [inode/x-empty] ./disk02-full/fake file.touch
|
20
|
+
[file_v1.2] f344106fac7926960912486256a56af9 100644 f 2022-07-24T06:38:25+02:00 454 [text/plain] ./disk02-full/ls.txt
|
21
|
+
[file_v1.2] 437b184a6b045975f0fb6c8c978f28ad 100644 f 2022-07-29T19:01:26+02:00 507 [text/plain] ./disk02-full/Rakefile
|
22
|
+
# [stats-with-md5] Time taken for processing 15 files: 0.35655
|
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.4.
|
4
|
+
version: 0.4.9
|
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-07-
|
11
|
+
date: 2022-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -30,6 +30,7 @@ email: name dot surname at popular Google-owned Mail
|
|
30
30
|
executables:
|
31
31
|
- ricdisk-magic
|
32
32
|
- stats-with-md5
|
33
|
+
- hello-storazzo
|
33
34
|
extensions: []
|
34
35
|
extra_rdoc_files: []
|
35
36
|
files:
|
@@ -39,6 +40,7 @@ files:
|
|
39
40
|
- README.md
|
40
41
|
- Rakefile
|
41
42
|
- VERSION
|
43
|
+
- bin/hello-storazzo
|
42
44
|
- bin/ricdisk-magic
|
43
45
|
- bin/stats-with-md5
|
44
46
|
- lib/storazzo.rb
|
@@ -74,6 +76,7 @@ files:
|
|
74
76
|
- var/test/disks/disk02-full/Rakefile
|
75
77
|
- var/test/disks/disk02-full/fake file.touch
|
76
78
|
- var/test/disks/disk02-full/ls.txt
|
79
|
+
- var/test/disks/ricdisk_stats_v11.rds
|
77
80
|
homepage: https://rubygems.org/gems/storazzo
|
78
81
|
licenses:
|
79
82
|
- MIT
|
@@ -107,6 +110,7 @@ test_files:
|
|
107
110
|
- test/media/test_abstract_ric_disk.rb
|
108
111
|
- test/media/test_local_folder.rb
|
109
112
|
- var/test/README.md
|
113
|
+
- var/test/disks/ricdisk_stats_v11.rds
|
110
114
|
- var/test/disks/disk02-full/fake file.touch
|
111
115
|
- var/test/disks/disk02-full/ls.txt
|
112
116
|
- var/test/disks/disk02-full/Rakefile
|