raykit 0.0.360 → 0.0.363

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: 21ce3d58f725c687f775027d81fd54c78e05c738858688d277422335dca76d1c
4
- data.tar.gz: d788cd2bba0ac31173d29fbc3ccf45508441f10edea2c6366707af7268319282
3
+ metadata.gz: b9431aaf83f89b8e1e019c4a6ebf2081c9787c083135e058c49ce7dc3d7846aa
4
+ data.tar.gz: 65cc1fe2b289a56a0d950643b6991f614029729599d745214d9d8e07e4c2aa01
5
5
  SHA512:
6
- metadata.gz: 70899d6ba0f82c7d8b3260949b406a5c2b549481567e4dfc1d82b2ca6a1d0ec34bdd10353996f819600c63f83eec4d88c2a0d56ffaae6ea6bd130423fecdaee7
7
- data.tar.gz: 5ae991a783de9f92c997d97099566f990627bca5b05109956be2bd2f9ddc6bfb08679216701b1583734dfe134cf37a6bc176dd6cc7f45ab2d192d6253eaee5b2
6
+ metadata.gz: 070315a60eb32a9d5c63944f2d21384a0c85fd011961a0aec2abf693fddd9f038f144e2ff6af0cede5ca825cdbe8058af508c0443043152be3dc4c7980330320
7
+ data.tar.gz: 0fae1b613e39beb2411b9dd7c99050650c914a97bc3b17faf8e2b3d0d5b53517803c30cce38cb8dd679583a10b8e1cea407c5d59db31756b5e69b93763cedfdb
@@ -0,0 +1,14 @@
1
+ module Raykit
2
+ class FileSystem
3
+ def self.copy_files(source_dir, target_dir, glob_pattern)
4
+ FileUtils.mkdir_p(target_dir) if !Dir.exist?(target_dir)
5
+ Dir.chdir(source_dir) do
6
+ Dir.glob("*.{exe,dll}").each { |f|
7
+ dest = "#{target_dir}/#{f}"
8
+ puts " copying #{f} to #{dest}"
9
+ FileUtils.cp(f, dest)
10
+ }
11
+ end
12
+ end
13
+ end
14
+ end
@@ -121,7 +121,7 @@ module Raykit
121
121
  end
122
122
  end
123
123
 
124
- def self.work(url,cmd)
124
+ def self.work(url, cmd)
125
125
  repo = Raykit::Git::Repository.new(url)
126
126
  work_dir = repo.get_dev_dir("work")
127
127
  repo.clone(work_dir) if !Dir.exist?(work_dir)
data/lib/raykit/nunit.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  module Raykit
2
- class NUnit
3
- def self.nunit3console_path(version)
4
- # C:\Users\lparslow\.nuget\packages\nunit.consolerunner\3.15.0\tools
5
- path="#{Environment.home_dir}/.nuget/packages/nunit.consolerunner/#{version}/tools"
6
- if Dir.exist?(path)
7
- path
8
- else
9
- ""
10
- end
2
+ class NUnit
3
+ def self.nunit3console_path(version)
4
+ # C:\Users\lparslow\.nuget\packages\nunit.consolerunner\3.15.0\tools
5
+ path = "#{Environment.home_dir}/.nuget/packages/nunit.consolerunner/#{version}/tools"
6
+ if Dir.exist?(path)
7
+ path
8
+ else
9
+ ""
11
10
  end
12
11
  end
13
- end
12
+ end
13
+ 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/zip.rb CHANGED
@@ -50,14 +50,14 @@ module Raykit
50
50
  files_to_archive.each do |file|
51
51
  zipfile.get_output_stream(file) { |f|
52
52
  fr = ::File.open("#{@source_dir}/#{file}", "rb")
53
- #f.puts(fr.read)
53
+ f.puts(fr.read)
54
54
  fr.close()
55
55
  f.close()
56
56
  count = count + 1
57
57
  }
58
58
  end
59
59
  zipfile.close
60
- puts " added " << count << " files to " << @filename
60
+ puts " added " << count.to_s << " files to " << @filename
61
61
  }
62
62
  end
63
63
  end
data/lib/raykit.rb CHANGED
@@ -24,7 +24,7 @@ module Raykit
24
24
  end
25
25
  end
26
26
 
27
- RAYKIT_GLOBALS=true
27
+ RAYKIT_GLOBALS = true
28
28
  if defined?(RAYKIT_GLOBALS)
29
29
  def run(command, quit_on_failure = true)
30
30
  Raykit::TopLevel.run(command, quit_on_failure)
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.360
4
+ version: 0.0.363
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-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,6 +97,7 @@ files:
97
97
  - lib/raykit/dir.rb
98
98
  - lib/raykit/dotnet.rb
99
99
  - lib/raykit/environment.rb
100
+ - lib/raykit/filesystem.rb
100
101
  - lib/raykit/git/commit.rb
101
102
  - lib/raykit/git/directory.rb
102
103
  - lib/raykit/git/files.rb
@@ -120,6 +121,7 @@ files:
120
121
  - lib/raykit/timer.rb
121
122
  - lib/raykit/version.rb
122
123
  - lib/raykit/vstest.rb
124
+ - lib/raykit/wt.rb
123
125
  - lib/raykit/zip.rb
124
126
  homepage: http://rubygems.org/gems/raykit
125
127
  licenses:
@@ -140,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  - !ruby/object:Gem::Version
141
143
  version: '0'
142
144
  requirements: []
143
- rubygems_version: 3.3.7
145
+ rubygems_version: 3.2.22
144
146
  signing_key:
145
147
  specification_version: 4
146
148
  summary: ruby gem to support rake ci/cd tasks