raykit 0.0.362 → 0.0.365

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: 4803d18fb5a110d2a7a4109baacbb60f5bd0cecd90d484a2d1c856ae90c4ac14
4
- data.tar.gz: 3a093936b0c035952b2f142f28e43ec182f82b11d9632999ae802fd69f313200
3
+ metadata.gz: df97d39c9dcadde8e59d515e5546628cff97f630197eb5ebe5b9243430a0137f
4
+ data.tar.gz: 58a786a2f933ed38f4bb8eeb57b41acb1b5befe35ff1dcfcf155f31eba5ced9b
5
5
  SHA512:
6
- metadata.gz: 8a4b64179090fbc77bb7d14689159785676930c1794f53398e5b3806d489ed8e41b258a7590270c350100e3c5dbe84697bfb2e7d0da2bb3afda233896a2463ad
7
- data.tar.gz: 47affc594e3896924e07c4edc7d67201d7146adf9171ff1310af191c2c93bc72472f52f8844b20453b6eb579e945e19de056c3152022c18fb25e0a7416c6fc6c
6
+ metadata.gz: c969e388b001fdd45dea1ee682595017be4e0506496843e40b8e455c112970dcbb8b3b26f20053dec5fa9eadcb19cdcaf8002cf1cb5b46f5c7a41a91ae95bfc1
7
+ data.tar.gz: cae73eb18dc69648916cdebd92251e458a6b62c7311e7e905da3d9415926bd291c1fd4aa664275559b70853a58e1df554674b6f34ef3ea6d499b2a556b2537bb
@@ -10,5 +10,15 @@ module Raykit
10
10
  }
11
11
  end
12
12
  end
13
+
14
+ def self.Filcopy_file_to_dir(file, dir)
15
+ dest = "#{dir}/#{File.basename(file)}"
16
+ if (File.exists?(dest))
17
+ return "#{dest} already exists"
18
+ else
19
+ FileUtils.cp(file, dest)
20
+ return "#{dest} now exists"
21
+ end
22
+ end
13
23
  end
14
24
  end
data/lib/raykit/string.rb CHANGED
@@ -15,4 +15,5 @@ class String
15
15
  return scan[0][0].to_s
16
16
  end
17
17
  end
18
+
18
19
  end
data/lib/raykit/wt.rb ADDED
@@ -0,0 +1,28 @@
1
+ module Raykit
2
+ class Wt
3
+ def self.open(names)
4
+ if names.is_a? String
5
+ cmd = Raykit::Command.new("wt --maximized #{get_tab_arg(names)}").run
6
+ end
7
+ if names.is_a?(Array)
8
+ cmd = "wt --maximized "
9
+ index = 0
10
+ names.each { |url|
11
+ if index <= 0
12
+ cmd += get_tab_arg(url)
13
+ else
14
+ cmd += ";new-tab " + get_tab_arg(url)
15
+ end
16
+ index = index + 1
17
+ }
18
+ Raykit::Command.new(cmd).run
19
+ end
20
+ end
21
+
22
+ def self.get_tab_arg(url)
23
+ dir = Raykit::Git::Repository.new(url).get_dev_dir("work")
24
+ name = File.basename(dir)
25
+ "-d #{dir} --title #{name}"
26
+ end
27
+ end
28
+ end
data/lib/raykit.rb CHANGED
@@ -37,4 +37,8 @@ if defined?(RAYKIT_GLOBALS)
37
37
  def show_value(name, value)
38
38
  Raykit::Log.show_value(name, value)
39
39
  end
40
+
41
+ def copy_file_to_dir(file, dir)
42
+ Raykit::Filesystem::copy_file_to_dir(file, dir)
43
+ end
40
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.362
4
+ version: 0.0.365
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -121,6 +121,7 @@ files:
121
121
  - lib/raykit/timer.rb
122
122
  - lib/raykit/version.rb
123
123
  - lib/raykit/vstest.rb
124
+ - lib/raykit/wt.rb
124
125
  - lib/raykit/zip.rb
125
126
  homepage: http://rubygems.org/gems/raykit
126
127
  licenses: