raykit 0.0.264 → 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 +4 -4
- data/lib/raykit/git/files.rb +38 -0
- data/lib/raykit/tasks.rb +2 -0
- 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: f681ff4d5a7b00c50cb8fa3569be04fb2b186867c83c2383edd15cb8dac9c627
|
4
|
+
data.tar.gz: f4f4b486f82fd52bcc36340382dcd86cee1c662e807e31cf59d18d4f78ec08b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d530565c12e446e902f8e12f7da35b00f47ed544828e3bf02dea1a553ef337f163756bcc4173c6e8ebca103ba63657c4f0118304c7191c11d1d9f84613293d4a
|
7
|
+
data.tar.gz: a1a3a0361128fa771f9ffb2dd4e05710d2cb5b6a47bb88632cf863c52079d0a6a8c6e43fbba9e79c57fe61c8fbe0efc28fdbaeb28993292658e6b8d827530633
|
@@ -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
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.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-12-
|
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
|