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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/raykit/project.rb +24 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59c46496188e6ad70142d640ad438d33b8d2237cb089321cc6f6652b4906cf25
4
- data.tar.gz: 7a1880532bcc017ae2916abeef52fe437a4e4bf6ae3aff500f1f160224b858fb
3
+ metadata.gz: 91752f86652a03a32205d25631ecf1e76698dd8a1f283a88c9ac9fc6e2259e8d
4
+ data.tar.gz: f20ea3c420f557caa73a1708a6df0f8b1b2c4f1305189dc21877003f71d9424f
5
5
  SHA512:
6
- metadata.gz: d5122ee7b32aa5d2cddec0b4023f97b358ae2ac991c69867905d65d8ab3e1a90c834ecab22ca70c3d21b1c306d1b7dbd326cf12f329b933f814b4e99ef5aa8dd
7
- data.tar.gz: c7ef8bac00a52ba3951fff5d548a07ff48dc9e372f76c37606362eb3ee71f3ee2e442210dea7757dc3297fd5e94145ef58e33b4e3ea9240b0fade665318f37d2
6
+ metadata.gz: 823f9962c127ef0a84e9c1b2b76077210200cac25338208b35df1240021ecf765398b2641f02968836b21bf1fedecc8d8641c2759cf8c7e93c03c7126e6ba520
7
+ data.tar.gz: 954d1c2c33a03093463952ecca18a53303dca8f6b1ea3737fbd0493b609ee8ba2218bac8f08c46bb2f09179cd90e77f9c19d882782611d0f989dd5d429a8b00d
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.91
4
+ version: 0.0.92
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow