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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a50c28c4c536bc8d09a116a20675e7a4d571c04f734e3e9ba63e5c3702fccdd
4
- data.tar.gz: a0572e9bffbd6433d1173be92ca05bbe60bf787b78f2c12130cceadb296b2834
3
+ metadata.gz: f681ff4d5a7b00c50cb8fa3569be04fb2b186867c83c2383edd15cb8dac9c627
4
+ data.tar.gz: f4f4b486f82fd52bcc36340382dcd86cee1c662e807e31cf59d18d4f78ec08b4
5
5
  SHA512:
6
- metadata.gz: 5897d3f45b076676e5b369e89a35d4386a5afab11c30faaf41341be4f1c1d2387202dc497e974b1b4ada71b57c5516aa4c01ef897d78de4c9ebc2c1c5e258f2d
7
- data.tar.gz: e698fb6273ca0755c747004021ee20460128771e991d8a2b0810dbfa129fd1c4a86119622f863d4eb891b1e0837fba3ee3921d59d06254df6edf9c8e69a55138
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
@@ -11,6 +11,8 @@ task :integrate do
11
11
  if(Rake::Task.task_defined?("test"))
12
12
  Rake::Task["test"].invoke
13
13
  end
14
+ else
15
+ puts "no outstanding commits detected"
14
16
  end
15
17
 
16
18
 
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.264
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-01 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