makit 0.0.19 → 0.0.21

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
  SHA256:
3
- metadata.gz: 88910903d0ee3682765921d29707827172202167578e33a9a157f04dbd72ed99
4
- data.tar.gz: bcd4999ce60281fc5564d434ab80e049a802623eca18c30edf660a43e74cf3b5
3
+ metadata.gz: 5a0c2a2e3b37f4f156c9a9f73c42659a6ff5a07cc9589ee2653f6bb3ce632599
4
+ data.tar.gz: c5c3e7980e0a50544295b262ac60d7032e781e86395c27de65e0bd61eea217a6
5
5
  SHA512:
6
- metadata.gz: 8b567423abe3a7e111903b3a757422e6653933dd3e9703bbda4fc42071cae30ef5f2a550bb4915daf9380d60f580c44bcee54f9d6f1b362d067a1af5efd6caf4
7
- data.tar.gz: bef0ded70a5a597a216f4e90dfb05b0f12ec0e772e77f1aabe4939d86e83e91e50950ed0744cedd384de98ded97d46c58efe0e281c63ce0e3af2ff1610b3a4aa
6
+ metadata.gz: 51df9a2a2a61614f1aa0ecd84d9c038398f448f4676bd00a3895c58498863b4d03452d81160d78c46ed54a01762a78aa878055a1d840bae717c49b9559128e72
7
+ data.tar.gz: 5095904bc74245d33e697630b87bf91d8f0117505ae25bf1c57624dbfe28a412eee4df708da9c821a7f6a21e6715b248341d20a3bfce69af5e387c721f64ce3b
@@ -43,8 +43,10 @@ module Makit
43
43
  # also replacing any path delimiters with an underscore
44
44
  int_hash = command_request.to_hash
45
45
  hash_string = "#{int_hash}"[0, 8]
46
- cache_filename = Makit::Directories::PROJECT_ARTIFACTS +
47
- "/commands/#{hash_string}.pb"
46
+ cache_filename = get_cache_filename(command_request)
47
+
48
+ #Makit::Directories::PROJECT_ARTIFACTS +
49
+ # "/commands/#{hash_string}.pb"
48
50
  #puts "cache_filename: #{cache_filename}"
49
51
 
50
52
  #cache_filename = Makit::Directories::PROJECT_ARTIFACTS + "/commands/#{command_request.name}.#{command_request.arguments.join("_")}.#{timestamp.seconds}.pb"
@@ -86,8 +86,21 @@ module Makit
86
86
  "#{hours}h #{minutes}m #{seconds}s"
87
87
  end
88
88
 
89
- def self.get_humanized_duration(duration)
90
- get_protobuf_duration(duration)
89
+ def self.get_humanized_duration(seconds)
90
+ minutes = (seconds / 60).to_i
91
+ seconds = (seconds % 60).to_i
92
+ hours = (minutes / 60).to_i
93
+ minutes = minutes % 60
94
+ days = (hours / 24).to_i
95
+ hours = hours % 24
96
+
97
+ parts = []
98
+ parts << "#{days} days" if days > 0
99
+ parts << "#{hours} hours" if hours > 0
100
+ parts << "#{minutes} minutes" if minutes > 0
101
+ parts << "#{seconds} seconds" if seconds > 0
102
+
103
+ parts.join(", ")
91
104
  end
92
105
  end
93
106
  end
data/lib/makit/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makit
4
- VERSION = "0.0.19"
4
+ VERSION = "0.0.21"
5
5
 
6
6
  class Version
7
7
  # given an array of version strings, return the highest version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow