raykit 0.0.543 → 0.0.544

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -21
  3. data/README.md +25 -25
  4. data/bin/raykit +6 -6
  5. data/lib/raykit/auto_setup.rb +69 -69
  6. data/lib/raykit/command.rb +374 -374
  7. data/lib/raykit/conan/buildinfo.rb +69 -69
  8. data/lib/raykit/conanpackage.rb +49 -49
  9. data/lib/raykit/configuration.rb +53 -53
  10. data/lib/raykit/console.rb +310 -310
  11. data/lib/raykit/default_content.rb +8 -8
  12. data/lib/raykit/default_content.txt +219 -219
  13. data/lib/raykit/dir.rb +127 -127
  14. data/lib/raykit/dotnet.rb +174 -174
  15. data/lib/raykit/environment.rb +115 -115
  16. data/lib/raykit/filesystem.rb +34 -34
  17. data/lib/raykit/git/commit.rb +16 -16
  18. data/lib/raykit/git/directory.rb +279 -279
  19. data/lib/raykit/git/files.rb +46 -46
  20. data/lib/raykit/git/repositories.rb +89 -89
  21. data/lib/raykit/git/repository.rb +362 -362
  22. data/lib/raykit/installer.rb +17 -17
  23. data/lib/raykit/log.rb +80 -80
  24. data/lib/raykit/logevent.rb +29 -29
  25. data/lib/raykit/logger.rb +100 -100
  26. data/lib/raykit/logging.rb +57 -57
  27. data/lib/raykit/markdown.rb +21 -21
  28. data/lib/raykit/msbuild.rb +54 -54
  29. data/lib/raykit/nugetpackage.rb +54 -54
  30. data/lib/raykit/nunit.rb +13 -13
  31. data/lib/raykit/project.rb +343 -343
  32. data/lib/raykit/rake.rb +39 -39
  33. data/lib/raykit/runner.rb +42 -42
  34. data/lib/raykit/secrets.rb +38 -38
  35. data/lib/raykit/sourceImport.rb +76 -76
  36. data/lib/raykit/sourceImports.rb +43 -43
  37. data/lib/raykit/string.rb +18 -18
  38. data/lib/raykit/symbols.rb +115 -115
  39. data/lib/raykit/tasks.rb +91 -91
  40. data/lib/raykit/text.rb +32 -32
  41. data/lib/raykit/timer.rb +31 -31
  42. data/lib/raykit/version.rb +97 -95
  43. data/lib/raykit/vstest.rb +24 -24
  44. data/lib/raykit/wix.rb +61 -61
  45. data/lib/raykit/wt.rb +28 -28
  46. data/lib/raykit/zip.rb +73 -73
  47. data/lib/raykit.rb +143 -140
  48. metadata +3 -3
@@ -1,54 +1,54 @@
1
- # frozen_string_literal: true
2
-
3
- module Raykit
4
- class MsBuild
5
- def self.fix_msbuild_path
6
- # if msbuild in not in the current path,
7
- # attempt to modify the path such that is it
8
- has_msbuild = false
9
- begin
10
- cmd = Raykit::Command.new("msbuild --version").run
11
- has_msbuild = true if (cmd.exitstatus != 0)
12
- rescue
13
- has_msbuild = false
14
- end
15
- if (!has_msbuild)
16
- if (Dir.exist?(msbuild_path))
17
- #puts " added #{msbuild_path} to PATH for msbuild"
18
- ENV["PATH"] = ENV["PATH"] + ";#{msbuild_path}"
19
- end
20
- end
21
- end
22
-
23
- # C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin
24
- def self.msbuild_path
25
- ["2022/Community/Msbuild/Current/Bin",
26
- "2022/Professional/Msbuild/Current/Bin",
27
- "2022/Enterprise/Msbuild/Current/Bin",
28
- "2019/Enterprise/MSBuild/Current/Bin",
29
- "2019/Professional/MSBuild/Current/Bin",
30
- "2019/Community/MSBuild/Current/Bin",
31
- "2017/BuildTools/MSBuild/15.0/Bin"].each do |relative_path|
32
- ["C:/Program Files/Microsoft Visual Studio/",
33
- "C:/Program Files (x86)/Microsoft Visual Studio/"].each do |prog_path|
34
- path = "#{prog_path}#{relative_path}"
35
- return path if Dir.exist?(path)
36
- end
37
- end
38
- ""
39
- end
40
-
41
- def self.msbuild_2019_path
42
- ["2019/Enterprise/MSBuild/Current/Bin",
43
- "2019/Professional/MSBuild/Current/Bin",
44
- "2019/Community/MSBuild/Current/Bin"].each do |relative_path|
45
- ["C:/Program Files/Microsoft Visual Studio/",
46
- "C:/Program Files (x86)/Microsoft Visual Studio/"].each do |prog_path|
47
- path = "#{prog_path}#{relative_path}"
48
- return path if Dir.exist?(path)
49
- end
50
- end
51
- ""
52
- end
53
- end
54
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Raykit
4
+ class MsBuild
5
+ def self.fix_msbuild_path
6
+ # if msbuild in not in the current path,
7
+ # attempt to modify the path such that is it
8
+ has_msbuild = false
9
+ begin
10
+ cmd = Raykit::Command.new("msbuild --version").run
11
+ has_msbuild = true if (cmd.exitstatus != 0)
12
+ rescue
13
+ has_msbuild = false
14
+ end
15
+ if (!has_msbuild)
16
+ if (Dir.exist?(msbuild_path))
17
+ #puts " added #{msbuild_path} to PATH for msbuild"
18
+ ENV["PATH"] = ENV["PATH"] + ";#{msbuild_path}"
19
+ end
20
+ end
21
+ end
22
+
23
+ # C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin
24
+ def self.msbuild_path
25
+ ["2022/Community/Msbuild/Current/Bin",
26
+ "2022/Professional/Msbuild/Current/Bin",
27
+ "2022/Enterprise/Msbuild/Current/Bin",
28
+ "2019/Enterprise/MSBuild/Current/Bin",
29
+ "2019/Professional/MSBuild/Current/Bin",
30
+ "2019/Community/MSBuild/Current/Bin",
31
+ "2017/BuildTools/MSBuild/15.0/Bin"].each do |relative_path|
32
+ ["C:/Program Files/Microsoft Visual Studio/",
33
+ "C:/Program Files (x86)/Microsoft Visual Studio/"].each do |prog_path|
34
+ path = "#{prog_path}#{relative_path}"
35
+ return path if Dir.exist?(path)
36
+ end
37
+ end
38
+ ""
39
+ end
40
+
41
+ def self.msbuild_2019_path
42
+ ["2019/Enterprise/MSBuild/Current/Bin",
43
+ "2019/Professional/MSBuild/Current/Bin",
44
+ "2019/Community/MSBuild/Current/Bin"].each do |relative_path|
45
+ ["C:/Program Files/Microsoft Visual Studio/",
46
+ "C:/Program Files (x86)/Microsoft Visual Studio/"].each do |prog_path|
47
+ path = "#{prog_path}#{relative_path}"
48
+ return path if Dir.exist?(path)
49
+ end
50
+ end
51
+ ""
52
+ end
53
+ end
54
+ end
@@ -1,54 +1,54 @@
1
- # frozen_string_literal: true
2
-
3
- module Raykit
4
- class NuGetPackage
5
- attr_accessor :name, :version
6
-
7
- def initialize(name, version)
8
- @name = name
9
- @version = version
10
- end
11
-
12
- def self.get(text, name)
13
- Raykit::NugetPackage.new(name, get_version(text, name))
14
- end
15
-
16
- def self.get_version(text, name)
17
- [/<PackageReference[\s]+Include=\"#{name}\"[\s]+Version=\"([\d\.]+)/,
18
- /<Reference[\s]+Include=\"#{name},[\s]+Version=([\d\.]+)/,
19
- /<HintPath>[\.\\\/\w\d]+#{name}.([\d\.]+)/].each { |regex|
20
- matches = text.scan(regex)
21
- if matches.length > 0 && matches[0].length > 0
22
- return matches[0][0]
23
- end
24
- }
25
- ""
26
- end
27
-
28
- def self.set_version(text, name, version)
29
- puts "NuGetPackage::set_version"
30
- new_text = text
31
- [/(<PackageReference[\s]+Include=\"#{name}\"[\s]+Version=\"[\d\.]+)/,
32
- /(<Reference[\s]+Include=\"#{name},[\s]+Version=[\d\.]+)/,
33
- /(<HintPath>[\.\\\/\w\d]+#{name}.[\d\.]+)/].each { |regex|
34
- matches = text.scan(regex)
35
- if matches.length > 0 && matches[0].length > 0
36
- orig = matches[0][0]
37
- oversion = get_version(orig, name)
38
- mod = orig.sub(oversion, version)
39
- puts "match[0][0] " + matches[0][0]
40
- puts "old version " + oversion
41
- puts "new version " + version
42
- new_text = new_text.gsub(orig, mod)
43
- end
44
- }
45
- new_text
46
- end
47
-
48
- def self.set_version_in_file(filename, name, version)
49
- text = set_version(IO.read(filename), name, version)
50
- orig = IO.read(filename)
51
- File.open(filename, "w") { |f| f.puts text } if (text != orig)
52
- end
53
- end
54
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Raykit
4
+ class NuGetPackage
5
+ attr_accessor :name, :version
6
+
7
+ def initialize(name, version)
8
+ @name = name
9
+ @version = version
10
+ end
11
+
12
+ def self.get(text, name)
13
+ Raykit::NugetPackage.new(name, get_version(text, name))
14
+ end
15
+
16
+ def self.get_version(text, name)
17
+ [/<PackageReference[\s]+Include=\"#{name}\"[\s]+Version=\"([\d\.]+)/,
18
+ /<Reference[\s]+Include=\"#{name},[\s]+Version=([\d\.]+)/,
19
+ /<HintPath>[\.\\\/\w\d]+#{name}.([\d\.]+)/].each { |regex|
20
+ matches = text.scan(regex)
21
+ if matches.length > 0 && matches[0].length > 0
22
+ return matches[0][0]
23
+ end
24
+ }
25
+ ""
26
+ end
27
+
28
+ def self.set_version(text, name, version)
29
+ puts "NuGetPackage::set_version"
30
+ new_text = text
31
+ [/(<PackageReference[\s]+Include=\"#{name}\"[\s]+Version=\"[\d\.]+)/,
32
+ /(<Reference[\s]+Include=\"#{name},[\s]+Version=[\d\.]+)/,
33
+ /(<HintPath>[\.\\\/\w\d]+#{name}.[\d\.]+)/].each { |regex|
34
+ matches = text.scan(regex)
35
+ if matches.length > 0 && matches[0].length > 0
36
+ orig = matches[0][0]
37
+ oversion = get_version(orig, name)
38
+ mod = orig.sub(oversion, version)
39
+ puts "match[0][0] " + matches[0][0]
40
+ puts "old version " + oversion
41
+ puts "new version " + version
42
+ new_text = new_text.gsub(orig, mod)
43
+ end
44
+ }
45
+ new_text
46
+ end
47
+
48
+ def self.set_version_in_file(filename, name, version)
49
+ text = set_version(IO.read(filename), name, version)
50
+ orig = IO.read(filename)
51
+ File.open(filename, "w") { |f| f.puts text } if (text != orig)
52
+ end
53
+ end
54
+ end
data/lib/raykit/nunit.rb CHANGED
@@ -1,13 +1,13 @@
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
11
- end
12
- end
13
- end
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
11
+ end
12
+ end
13
+ end