raykit 0.0.319 → 0.0.323

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.
@@ -27,19 +27,19 @@ module Raykit
27
27
 
28
28
  if verbose
29
29
  warning = "\u26A0"
30
- symbol = Rainbow(warning.encode('utf-8')).yellow
30
+ symbol = Rainbow(warning.encode("utf-8")).yellow
31
31
  puts "#{symbol} version not detected"
32
32
  end
33
- ''
33
+ ""
34
34
  end
35
35
 
36
36
  def self.detect_from_file(filename, regex, verbose)
37
- version = ''
37
+ version = ""
38
38
  if File.exist?(filename)
39
39
  match = IO.read(filename).match(regex)
40
40
  version = match.captures[0] if !match.nil? && match.captures.length.positive?
41
41
  else
42
- return ''
42
+ return ""
43
43
  end
44
44
  if verbose
45
45
  if version.length.positive?
@@ -53,12 +53,12 @@ module Raykit
53
53
 
54
54
  def self.set_version_in_file(filename, version)
55
55
  text = IO.read(filename)
56
- new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?('.gemspec')
57
- new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?('.csproj')
56
+ new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?(".gemspec")
57
+ new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?(".csproj")
58
58
  # new_text=text.gsub(/<Version>([-\w\d.]+)</,"<Version>#{version}<")
59
59
  # new_text=new_text.gsub(/version[\s]+=\s?['|"]([.\d]+)['|"]/,"version='#{version}'")
60
60
  # new_text=new_text.gsub(/Version="([.\d]+)"/,"Version=\"#{version}\"")
61
- File.open(filename, 'w') { |f| f.write(new_text) } if new_text != text
61
+ File.open(filename, "w") { |f| f.write(new_text) } if new_text != text
62
62
  end
63
63
 
64
64
  def self.sync_file_versions(source_filename, destination_filename)
@@ -69,19 +69,19 @@ module Raykit
69
69
  # increment to last digit of a version string
70
70
  def self.bump(version)
71
71
  # major.minor[.build[.revision]] (example: 1.2.12.102)
72
- version_ints = version.split('.').map(&:to_i)
72
+ version_ints = version.split(".").map(&:to_i)
73
73
  version_ints[-1] = version_ints.last + 1
74
- version_ints.map(&:to_s).join('.')
74
+ version_ints.map(&:to_s).join(".")
75
75
  end
76
76
 
77
77
  def self.bump_file(filename)
78
78
  warn "Raykit::Version.bump_file filename '#{filename}' does not exist." unless File.exist?(filename)
79
79
 
80
- old_version = ''
81
- if filename.include?('.gemspec')
80
+ old_version = ""
81
+ if filename.include?(".gemspec")
82
82
  old_version = detect_from_file(filename, /version\s?=\s?['|"]([.\d]+)['|"]/, false)
83
83
  end
84
- old_version = detect_from_file(filename, /<Version>([-\w\d.]+)</, false) if filename.include?('.csproj')
84
+ old_version = detect_from_file(filename, /<Version>([-\w\d.]+)</, false) if filename.include?(".csproj")
85
85
 
86
86
  if old_version.length.positive?
87
87
  new_version = bump(old_version)
data/lib/raykit/vstest.rb CHANGED
@@ -3,19 +3,19 @@
3
3
  module Raykit
4
4
  class VsTest
5
5
  def self.vstest_path
6
- ['2019/Community/Common7/IDE/CommonExtensions/Microsoft',
7
- '2019/Professional/Common7/IDE/Extensions/TestPlatform',
8
- '2019/Community/Common7/IDE/Extensions',
9
- '2019/Community/Common7/IDE/Extensions/TestPlatform',
10
- '2022/Preview/Common7/IDE/Extensions/TestPlatform'].each do |relative_path|
11
- ['C:/Program Files (x86)/Microsoft Visual Studio/',
12
- 'C:/Program Files/Microsoft Visual Studio/'].each do |root_path|
6
+ ["2019/Community/Common7/IDE/CommonExtensions/Microsoft",
7
+ "2019/Professional/Common7/IDE/Extensions/TestPlatform",
8
+ "2019/Community/Common7/IDE/Extensions",
9
+ "2019/Community/Common7/IDE/Extensions/TestPlatform",
10
+ "2022/Preview/Common7/IDE/Extensions/TestPlatform"].each do |relative_path|
11
+ ["C:/Program Files (x86)/Microsoft Visual Studio/",
12
+ "C:/Program Files/Microsoft Visual Studio/"].each do |root_path|
13
13
  path = root_path + relative_path
14
14
  exe_path = "#{path}/vstest.console.exe"
15
15
  return path if Dir.exist?(path) && File.exist?(exe_path)
16
16
  end
17
17
  end
18
- 'vstest_path not found'
18
+ "vstest_path not found"
19
19
  end
20
20
  end
21
21
  end
data/lib/raykit.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rainbow'
4
- require 'rake/clean'
5
- require 'open3'
6
- require 'rake/testtask'
7
- require 'digest'
3
+ require "rainbow"
4
+ require "rake/clean"
5
+ require "open3"
6
+ require "rake/testtask"
7
+ require "digest"
8
8
 
9
9
  lib_dir = File.dirname(__FILE__)
10
10
  Dir.glob("#{lib_dir}/raykit/**/*.rb").sort.each { |file| require file }
@@ -13,5 +13,5 @@ PROJECT = Raykit::Project.new
13
13
  SECRETS = Raykit::Secrets.new
14
14
  # TIMER=Raykit::Timer.new
15
15
 
16
- REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir('log')}/Raykit.Git.Repositories.json")
17
- GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) #if Dir.exist?('.git')
16
+ REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
17
+ GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) if Dir.exist?(".git")
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.319
4
+ version: 0.0.323
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-24 00:00:00.000000000 Z
11
+ date: 2021-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler