raykit 0.0.283 → 0.0.287
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.
- checksums.yaml +4 -4
- data/lib/raykit/environment.rb +2 -2
- data/lib/raykit/secrets.rb +22 -0
- data/lib/raykit/tasks.rb +18 -4
- data/lib/raykit/vstest.rb +8 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40bac36f5f9c35c2f31b144155a0f98eddb193178fb46ea2b3076a97663615d7
|
4
|
+
data.tar.gz: 052fc176d1d7a1d6c7231e4bf2b8442b6b08e07c9df06997c3e661d7c4950a0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bef23584ac4d9f56a51aafb7a1dd54dda36874e5c23e823532d969da3fbd999222602ad4eb7d19bfa41f532b052bf5f17bd0b0e056d508372274bae282cc425a
|
7
|
+
data.tar.gz: 795aa871242776dec0eff3ac7a5cb0326f1a870f5ec18ed86be0519ba06bb88e63a83f6238a5db31c5e44cc881cbcee420f00343f42e09496e901db2e4c8aabb
|
data/lib/raykit/environment.rb
CHANGED
@@ -29,11 +29,11 @@ module Raykit
|
|
29
29
|
def self.get_dev_dir(name)
|
30
30
|
dir = Pathname.new("#{Environment::root_dir}/#{name}")
|
31
31
|
dir.mkpath
|
32
|
-
dir.to_s
|
32
|
+
dir.to_s().gsub('//','/')
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.get_work_dir(url)
|
36
|
-
Raykit::Environment::get_dev_dir('work') + url.gsub('://','/').gsub('.git','')
|
36
|
+
Raykit::Environment::get_dev_dir('work') +'/' + url.gsub('://','/').gsub('.git','')
|
37
37
|
end
|
38
38
|
# Get the size of a directory and its contents
|
39
39
|
def self.get_dir_size(dir)
|
data/lib/raykit/secrets.rb
CHANGED
@@ -3,6 +3,21 @@ require 'time'
|
|
3
3
|
module Raykit
|
4
4
|
# Provides functionality to record the time execution times
|
5
5
|
class Secrets < Hash
|
6
|
+
def initialize()
|
7
|
+
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
8
|
+
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
9
|
+
if File.exists?(secrets_file)
|
10
|
+
text = IO.read(secrets_file)
|
11
|
+
if (text.length > 7 )
|
12
|
+
data = JSON.parse(text)
|
13
|
+
data.each{|key,value|
|
14
|
+
self[key] = value
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
6
21
|
def hide(text)
|
7
22
|
hidden=text
|
8
23
|
self.each{|k,v|
|
@@ -12,5 +27,12 @@ module Raykit
|
|
12
27
|
}
|
13
28
|
hidden
|
14
29
|
end
|
30
|
+
|
31
|
+
def save()
|
32
|
+
if ENV.has_key?('RAYKIT_SECRETS_PATH')
|
33
|
+
secrets_file = ENV['RAYKIT_SECRETS_PATH']
|
34
|
+
File.open(secrets_file,"w") { |f| f.puts self.to_json }
|
35
|
+
end
|
36
|
+
end
|
15
37
|
end
|
16
38
|
end
|
data/lib/raykit/tasks.rb
CHANGED
@@ -9,7 +9,9 @@ task :integrate do
|
|
9
9
|
puts Rainbow(':integrate').blue.bright
|
10
10
|
|
11
11
|
git_dir=Raykit::Git::Directory.new(Rake.application.original_dir)
|
12
|
-
if(
|
12
|
+
if(git_dir.detached?)
|
13
|
+
puts "detached head state, skipping integrate operations"
|
14
|
+
else
|
13
15
|
if(PROJECT.outstanding_commit?)
|
14
16
|
if(Rake::Task.task_defined?("test"))
|
15
17
|
Rake::Task["test"].invoke
|
@@ -23,17 +25,29 @@ task :integrate do
|
|
23
25
|
puts "warning: .gitignore does not exist."
|
24
26
|
else
|
25
27
|
PROJECT.run('git add --all')
|
26
|
-
if(
|
28
|
+
if(!`git status`.include?('nothing to commit'))
|
29
|
+
#if(PROJECT.outstanding_commit?)
|
27
30
|
commit_message='integrate'
|
28
31
|
PROJECT.run("git commit -m\"#{commit_message}\"") if(PROJECT.outstanding_commit?)
|
29
32
|
PROJECT.run("git pull")
|
30
|
-
PROJECT.run("git push")
|
31
|
-
PROJECT.run("git push --tags")
|
33
|
+
#PROJECT.run("git push")
|
34
|
+
#PROJECT.run("git push --tags")
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
40
|
+
desc "push changes including tags"
|
41
|
+
task :push do
|
42
|
+
git_dir=Raykit::Git::Directory.new(Rake.application.original_dir)
|
43
|
+
if(git_dir.detached?)
|
44
|
+
puts "detached head state, skipping push operations"
|
45
|
+
else
|
46
|
+
PROJECT.run("git push")
|
47
|
+
PROJECT.run("git push --tags")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
37
51
|
desc "clean files not tracked by git"
|
38
52
|
task :clean do
|
39
53
|
puts Rainbow(':clean').blue.bright
|
data/lib/raykit/vstest.rb
CHANGED
@@ -3,10 +3,16 @@ module Raykit
|
|
3
3
|
def self.vstest_path
|
4
4
|
['2019/Community/Common7/IDE/CommonExtensions/Microsoft',
|
5
5
|
'2019/Community/Common7/IDE/Extensions',
|
6
|
+
'2019\Community\Common7\IDE\Extensions\TestPlatform',
|
6
7
|
'2022/Preview/Common7/IDE/Extensions/TestPlatform'].each{|relative_path|
|
7
|
-
|
8
|
-
|
8
|
+
['C:/Program Files (x86)/Microsoft Visual Studio/',
|
9
|
+
'C:/Program Files/Microsoft Visual Studio/'].each{|root_path|
|
10
|
+
path = root_path + relative_path
|
11
|
+
exe_path = path + '/vstest.console.exe'
|
12
|
+
return path if(Dir.exists?(path)) && File.exist?(exe_path)
|
13
|
+
}
|
9
14
|
}
|
15
|
+
return "vstest_path not found"
|
10
16
|
end
|
11
17
|
end
|
12
18
|
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.
|
4
|
+
version: 0.0.287
|
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-
|
11
|
+
date: 2021-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
rubygems_version: 3.2.
|
126
|
+
rubygems_version: 3.2.22
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: ruby gem to support rake ci/cd tasks
|