raykit 0.0.261 → 0.0.266
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 +18 -0
- data/lib/raykit/git/files.rb +38 -0
- data/lib/raykit/tasks.rb +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe3dabed3aa28e59c5518034fa2fd4fd5a171690204e60e44b15d5d60a6e7fde
|
4
|
+
data.tar.gz: 93a2371ec1d1200445ab5f672136591700a3f2da465fcad85b08aee53a5fe531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af68e0737046c0005e6948379502fd3d28c5fbdc9c191825b4abc1c2f59b367ac29e457a4d1ef6b29dd2d9639b17687ea01768d63cf25beb711a1836693da54
|
7
|
+
data.tar.gz: 66aa1a94d1949484bc1d645bf27c86d9e299fac79403b6a501ac4b57e248f3f96de7c01acc477fa4d00d1dea60a8ca9b231987b62ef050c9688248c135e4fa4b
|
data/lib/raykit/environment.rb
CHANGED
@@ -59,6 +59,24 @@ module Raykit
|
|
59
59
|
return rights.include?('SeCreateGlobalPrivilege')
|
60
60
|
end
|
61
61
|
|
62
|
+
def self.which(name)
|
63
|
+
if (File.exists?(name))
|
64
|
+
return name
|
65
|
+
end
|
66
|
+
["",".exe",".bat",".cmd"].each{|ext|
|
67
|
+
aname = name + ext
|
68
|
+
if (File.exists?(aname))
|
69
|
+
return aname
|
70
|
+
end
|
71
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each{|path|
|
72
|
+
apath = (path.gsub("\\","/") + '/' + aname).gsub("//","/")
|
73
|
+
if(File.exists?(apath))
|
74
|
+
return apath
|
75
|
+
end
|
76
|
+
}
|
77
|
+
}
|
78
|
+
''
|
79
|
+
end
|
62
80
|
|
63
81
|
end
|
64
82
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Raykit
|
2
|
+
module Git
|
3
|
+
# Functionality to manage a local clone of a git repository
|
4
|
+
class Files
|
5
|
+
@url
|
6
|
+
@commit_id
|
7
|
+
def initialize(url,commit_id)
|
8
|
+
@url = url
|
9
|
+
@commit_id = commit_id
|
10
|
+
end
|
11
|
+
|
12
|
+
def get(name)
|
13
|
+
if !Dir.exists?(commit_path())
|
14
|
+
puts 'cloning commit path...'
|
15
|
+
clone = Raykit::Command.new('git clone ' + @url + ' ' + commit_path())
|
16
|
+
puts clone.output
|
17
|
+
puts clone.error
|
18
|
+
Dir.chdir(commit_path()) do
|
19
|
+
checkout = Raykit::Command.new('git checkout ' + @commit_id)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
if File.exists?(filename(name))
|
24
|
+
return filename(name)
|
25
|
+
end
|
26
|
+
''
|
27
|
+
end
|
28
|
+
|
29
|
+
def commit_path
|
30
|
+
Dir.tmpdir() + File::SEPARATOR + 'Raykit.Git.Files' + File::SEPARATOR + @url.gsub('://','.') + File::SEPARATOR + @commit_id
|
31
|
+
end
|
32
|
+
|
33
|
+
def filename(name)
|
34
|
+
commit_path() + File::SEPARATOR + name
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/raykit/tasks.rb
CHANGED
@@ -6,13 +6,16 @@ end
|
|
6
6
|
|
7
7
|
desc "integrate changes into the git repository"
|
8
8
|
task :integrate do
|
9
|
+
puts Rainbow(':integrate').blue.bright
|
9
10
|
if(PROJECT.outstanding_commit?)
|
10
11
|
if(Rake::Task.task_defined?("test"))
|
11
12
|
Rake::Task["test"].invoke
|
12
13
|
end
|
14
|
+
else
|
15
|
+
puts "no outstanding commits detected"
|
13
16
|
end
|
14
17
|
|
15
|
-
|
18
|
+
|
16
19
|
if(!File.exist?('.gitignore'))
|
17
20
|
puts "warning: .gitignore does not exist."
|
18
21
|
else
|
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.266
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/raykit/environment.rb
|
85
85
|
- lib/raykit/git/commit.rb
|
86
86
|
- lib/raykit/git/directory.rb
|
87
|
+
- lib/raykit/git/files.rb
|
87
88
|
- lib/raykit/git/repositories.rb
|
88
89
|
- lib/raykit/git/repository.rb
|
89
90
|
- lib/raykit/log.rb
|