raykit 0.0.260 → 0.0.265

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: 7ec48114ce7dccd6a8260561329894bd2996b2e5e1e09d226ccb6a94c457a350
4
- data.tar.gz: 075fe185a495f6c30d91c621b30e52926dcfe5823ba7c62d155721674588a758
3
+ metadata.gz: f681ff4d5a7b00c50cb8fa3569be04fb2b186867c83c2383edd15cb8dac9c627
4
+ data.tar.gz: f4f4b486f82fd52bcc36340382dcd86cee1c662e807e31cf59d18d4f78ec08b4
5
5
  SHA512:
6
- metadata.gz: 237ef126b4c2b24a6f7868ff57f86be59865e2a1094e840f5f22b151c8b16f0865fcb045a90104674b54ed726c0a3aed6dbfc266d0dc815e8aeccdcf3ede25f7
7
- data.tar.gz: 9fc60b72c3f997187cdf90f7622735f79ea3fa2f2bc83d973835e049c21fdb0e430804bd0a48d2de799225c27bb5975b7a8076182381be72174e6b9d00546828
6
+ metadata.gz: d530565c12e446e902f8e12f7da35b00f47ed544828e3bf02dea1a553ef337f163756bcc4173c6e8ebca103ba63657c4f0118304c7191c11d1d9f84613293d4a
7
+ data.tar.gz: a1a3a0361128fa771f9ffb2dd4e05710d2cb5b6a47bb88632cf863c52079d0a6a8c6e43fbba9e79c57fe61c8fbe0efc28fdbaeb28993292658e6b8d827530633
@@ -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(';').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
@@ -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
- puts Rainbow(':integrate').blue.bright
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.260
4
+ version: 0.0.265
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-27 00:00:00.000000000 Z
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