raykit 0.0.499 → 0.0.500

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: 6f8c82957456dd5516ac89810b2447bd2c7ec16d98dfee3f29f78dae91bb01fd
4
- data.tar.gz: 05fa934496a2857c9b19ba31a626b2ad8e3289895fdc7d8938f88a6d2191f584
3
+ metadata.gz: 2b2a3e1c22735ebdacb0d6e65529afda2553beb7e3035c015b894523ec839fc3
4
+ data.tar.gz: a70d5d46c87f1eb517020af2e59f0e3efd3fde472d9aed2a6d9d63be769680a9
5
5
  SHA512:
6
- metadata.gz: 4d8bea6bca8fde247a11ff209436cf65df99c40a2fe1b1a4845c15dcacb0331bef4c9ddde7f091746d2987901bac6a2dfba2d571e352bee3bb22df1f143e7f6e
7
- data.tar.gz: a82eb20db5aabd9a7afcd1b509ae742d9568212f8bfafad0f302393af6dcd82cd21656c26aa632977a78c9c534cb6412a7eee91ccd9603c195d87d98ceaa4b45
6
+ metadata.gz: d5062b8fff78d1a0c5321afa51f6171cff9aa77e344dbbf6be70119d2ba502934156c671600dc4ca526ba2962d19f14d75331fb13c8ddb7d283877cb58ebcbe8
7
+ data.tar.gz: 7713d9d0f5a112b570ed6eee588e8d491ed9a075ea7747ea5a8695d24c115233fccbfdd88341748134b898848c8490d76892c5e2f4892327959cb21dbbf58e56
@@ -13,7 +13,9 @@ module Raykit
13
13
  load_configuration
14
14
  else
15
15
  set_default_configuration
16
- save_configuration # Save the default configuration if no configuration file exists.
16
+ if (!Dir.exist?(CONFIG_DIR))
17
+ save_configuration # Save the default configuration if no configuration file exists.
18
+ end
17
19
  end
18
20
  end
19
21
 
@@ -63,12 +63,6 @@ module Raykit
63
63
  git_dirs.insert(0, dir) if dir.length.positive?
64
64
  end
65
65
  end
66
- Dir.chdir(Environment.home_dir) do
67
- Dir.glob("**/.git") do |git_dir|
68
- dir = File.expand_path("..", git_dir)
69
- git_dirs.insert(0, dir) if dir.length.positive?
70
- end
71
- end
72
66
 
73
67
  git_dirs.each do |git_dir|
74
68
  dir = Raykit::Git::Directory.new(git_dir)
@@ -273,6 +273,23 @@ module Raykit
273
273
  def to_s
274
274
  "Name: #{short_name}\nUrl: #{@url}\nRelative Path: #{relative_path}"
275
275
  end # def to_s
276
+
277
+ def to_table
278
+ #max_name_width = 10
279
+ #max_value_width = 10
280
+ #header = " =".ljust(max_name_width + max_value_width + 5, "=")
281
+ header = "==Repository=="
282
+ table = header
283
+ table += "\n" + to_table_row("Name", short_name)
284
+ table += "\n" + to_table_row("Url", @url)
285
+ table
286
+ end # def to_table
287
+
288
+ def to_table_row(name, value)
289
+ max_name_width = 10
290
+ max_value_width = 30
291
+ Rainbow(name.rjust(max_name_width, " ")).cyan + " | " + Rainbow(value).white.bold
292
+ end
276
293
  end # class Repository
277
294
  end # module Git
278
295
  end # module Raykit
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.499
4
+ version: 0.0.500
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow