raykit 0.0.257 → 0.0.262

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c34a8c974bb383d84ab5620017e4a6007444153949f86738af8e45f92ce32c5
4
- data.tar.gz: 56a9bdd229f72c5bc5b09b2611143791bc360dd21d41933c52a25982d871203d
3
+ metadata.gz: b4790af0bc3f6b7f5fe2f771c5063beb8c5bbab27152f5105d155f7f7fe2ad58
4
+ data.tar.gz: 398551a581b890190b3514e12baa78d63ac552dc461939a8c3e958460e9e85a3
5
5
  SHA512:
6
- metadata.gz: 9cbf91865e27036404d8a44f3f77c953867dbbbcfa7b19590551a0c64e3cd605a89f457d7d43fa6940f5b845071b909f06af7704eb1d3bbc635b0e996efffe48
7
- data.tar.gz: 10d57d25a9444fe4ee177f214a0a460c46206c49735bda3f398f860ce2f4d01f6bc7c62e05bbc402a963e90a198547e459031c887a656eaf7a6026033a8be9aa
6
+ metadata.gz: ad1ef8b0e9fbc3c860d11af7889522c69c8d0bf00ea2955b00202a7dc7a26f21cd919667b487d86e6e8d56155c51570b667fcf36979d0df954a43417e072fbb2
7
+ data.tar.gz: 3bd4659af60b6b90045e09af3a64c787bfc1f0a4abb0dc4cc85739076c52dfa1550764c23e3d29bef7f6df144cca7d2e2db70147066fc677a48049cb44a80bb3
@@ -59,6 +59,25 @@ 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
+ puts ENV['PATH']
67
+ ["",".exe",".bat",".cmd"].each{|ext|
68
+ aname = name + ext
69
+ if (File.exists?(aname))
70
+ return aname
71
+ end
72
+ ENV['PATH'].split(';').each{|path|
73
+ apath = (path.gsub("\\","/") + '/' + aname).gsub("//","/")
74
+ if(File.exists?(apath))
75
+ return apath
76
+ end
77
+ }
78
+ }
79
+ ''
80
+ end
62
81
 
63
82
  end
64
83
  end
@@ -20,6 +20,17 @@ module Raykit
20
20
  end
21
21
  end
22
22
 
23
+ def detached?
24
+ Dir.chdir(directory) do
25
+ status=`git status`.strip
26
+ if status.include?('detached')
27
+ true
28
+ else
29
+ false
30
+ end
31
+ end
32
+ end
33
+
23
34
  def pull
24
35
  Dir.chdir(directory) do
25
36
  diff=`git diff`.strip
@@ -77,6 +88,24 @@ module Raykit
77
88
  ''
78
89
  end
79
90
 
91
+ def get_tag_commit_id(name)
92
+ cmd = Raykit::Command.new("git rev-parse \"#{name}\"")
93
+ if !cmd.output.include?('fatal') && !cmd.error.include?('fatal')
94
+ cmd.output.strip()
95
+ else
96
+ ''
97
+ end
98
+ end
99
+
100
+ def get_sha(filename)
101
+ if File.exists?(filename)
102
+ Digest::SHA256.file(filename).hexdigest.to_s
103
+ else
104
+ "#{filename} not found"
105
+ end
106
+ #''
107
+ end
108
+
80
109
  def user_name
81
110
  `git config --get user.name`.strip
82
111
  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.257
4
+ version: 0.0.262
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-07-07 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler