raykit 0.0.91 → 0.0.92
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/raykit/project.rb +24 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91752f86652a03a32205d25631ecf1e76698dd8a1f283a88c9ac9fc6e2259e8d
|
4
|
+
data.tar.gz: f20ea3c420f557caa73a1708a6df0f8b1b2c4f1305189dc21877003f71d9424f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 823f9962c127ef0a84e9c1b2b76077210200cac25338208b35df1240021ecf765398b2641f02968836b21bf1fedecc8d8641c2759cf8c7e93c03c7126e6ba520
|
7
|
+
data.tar.gz: 954d1c2c33a03093463952ecca18a53303dca8f6b1ea3737fbd0493b609ee8ba2218bac8f08c46bb2f09179cd90e77f9c19d882782611d0f989dd5d429a8b00d
|
data/lib/raykit/project.rb
CHANGED
@@ -78,6 +78,28 @@ module Raykit
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
def size
|
82
|
+
Dir.chdir(@directory) do
|
83
|
+
text =`git count-objects -v -H`
|
84
|
+
if matches = text.match(/size: ([. \w]+)$/)
|
85
|
+
matches[1]
|
86
|
+
else
|
87
|
+
text
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def size_pack
|
93
|
+
Dir.chdir(@directory) do
|
94
|
+
text =`git count-objects -v -H`
|
95
|
+
if matches = text.match(/size-pack: ([. \w]+)$/)
|
96
|
+
matches[1]
|
97
|
+
else
|
98
|
+
text
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
81
103
|
def elapsed
|
82
104
|
elapsed=@timer.elapsed
|
83
105
|
if(elapsed < 1.0)
|
@@ -97,6 +119,8 @@ module Raykit
|
|
97
119
|
puts "PROJECT.latest_commit".ljust(ljust) + Rainbow(PROJECT.latest_commit).yellow.bright
|
98
120
|
puts "PROJECT.last_modified_filename".ljust(ljust) + Rainbow(PROJECT.last_modified_filename).yellow.bright
|
99
121
|
#puts "PROJECT.elapsed".ljust(ljust) + Rainbow(PROJECT.elapsed).yellow.bright
|
122
|
+
puts "PROJECT.size".ljust(ljust) + Rainbow(PROJECT.size).yellow.bright
|
123
|
+
puts "PROJECT.size_pack".ljust(ljust) + Rainbow(PROJECT.size_pack).yellow.bright
|
100
124
|
puts ''
|
101
125
|
self
|
102
126
|
end
|