raykit 0.0.264 → 0.0.269

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: 64284ab8cee22bdff4bb0c8768c6ab94b1a3afa5eb8afd3b380482fd4809d8d7
4
+ data.tar.gz: 57d78e3236f752ea701ba765e0eb23484da0cca1a7815f9f303d32976938a947
5
5
  SHA512:
6
- metadata.gz: 5897d3f45b076676e5b369e89a35d4386a5afab11c30faaf41341be4f1c1d2387202dc497e974b1b4ada71b57c5516aa4c01ef897d78de4c9ebc2c1c5e258f2d
7
- data.tar.gz: e698fb6273ca0755c747004021ee20460128771e991d8a2b0810dbfa129fd1c4a86119622f863d4eb891b1e0837fba3ee3921d59d06254df6edf9c8e69a55138
6
+ metadata.gz: d082982aec2a5beca2e11da4cdf657ff14054c59ac6ec7f672aca31393fc8681105c3a2d461f10792f1be8b4b0b29c197cf85346d9e9957b1387af478e029802
7
+ data.tar.gz: e2e7b703d849c13cba6b1596f1c736612331f7e4b5bc70b2b353174483e15ff929cc5680ab7e1640268e4f01561d9861f9d2f0ac64604b363530d1ea9aac11eb
@@ -68,7 +68,7 @@ module Raykit
68
68
  if (File.exists?(aname))
69
69
  return aname
70
70
  end
71
- ENV['PATH'].split(';').each{|path|
71
+ ENV['PATH'].split(File::PATH_SEPARATOR).each{|path|
72
72
  apath = (path.gsub("\\","/") + '/' + aname).gsub("//","/")
73
73
  if(File.exists?(apath))
74
74
  return apath
@@ -0,0 +1,45 @@
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 clean
13
+ if Dir.exists?(commit_path())
14
+ FileUtils.rm_rf(commit_path())
15
+ end
16
+ end
17
+
18
+ def get(name)
19
+ puts "commit_path(): " + commit_path()
20
+ if !Dir.exists?(commit_path())
21
+ puts 'cloning commit path...'
22
+ clone = Raykit::Command.new('git clone ' + @url + ' ' + commit_path())
23
+ puts clone.output
24
+ puts clone.error
25
+ Dir.chdir(commit_path()) do
26
+ checkout = Raykit::Command.new('git checkout ' + @commit_id)
27
+ end
28
+ end
29
+
30
+ if File.exists?(filename(name))
31
+ return filename(name)
32
+ end
33
+ ''
34
+ end
35
+
36
+ def commit_path
37
+ Dir.tmpdir() + File::SEPARATOR + 'Raykit.Git.Files' + File::SEPARATOR + @url.gsub('://','.') + File::SEPARATOR + @commit_id
38
+ end
39
+
40
+ def filename(name)
41
+ commit_path() + File::SEPARATOR + name
42
+ end
43
+ end
44
+ end
45
+ end
@@ -17,7 +17,7 @@ module Raykit
17
17
  insert(-1,url)
18
18
  }
19
19
  else
20
- puts "filename #{filename} does not exist"
20
+ #puts "filename #{filename} does not exist"
21
21
  end
22
22
  end
23
23
 
@@ -7,23 +7,29 @@ end
7
7
  desc "integrate changes into the git repository"
8
8
  task :integrate do
9
9
  puts Rainbow(':integrate').blue.bright
10
- if(PROJECT.outstanding_commit?)
11
- if(Rake::Task.task_defined?("test"))
12
- Rake::Task["test"].invoke
13
- end
14
- end
15
10
 
16
-
17
- if(!File.exist?('.gitignore'))
18
- puts "warning: .gitignore does not exist."
19
- else
20
- PROJECT.run('git add --all')
11
+ git_dir=Raykit::Git::Directory.new(Rake.application.original_dir)
12
+ if(!git_dir.detached?)
21
13
  if(PROJECT.outstanding_commit?)
22
- commit_message='integrate'
23
- PROJECT.run("git commit -m\"#{commit_message}\"") if(PROJECT.outstanding_commit?)
24
- PROJECT.run("git pull")
25
- PROJECT.run("git push")
26
- PROJECT.run("git push --tags")
14
+ if(Rake::Task.task_defined?("test"))
15
+ Rake::Task["test"].invoke
16
+ end
17
+ else
18
+ puts "no outstanding commits detected"
19
+ end
20
+
21
+
22
+ if(!File.exist?('.gitignore'))
23
+ puts "warning: .gitignore does not exist."
24
+ else
25
+ PROJECT.run('git add --all')
26
+ if(PROJECT.outstanding_commit?)
27
+ commit_message='integrate'
28
+ PROJECT.run("git commit -m\"#{commit_message}\"") if(PROJECT.outstanding_commit?)
29
+ PROJECT.run("git pull")
30
+ #PROJECT.run("git push")
31
+ #PROJECT.run("git push --tags")
32
+ end
27
33
  end
28
34
  end
29
35
  end
@@ -0,0 +1,46 @@
1
+
2
+ module Raykit
3
+ class Zip
4
+ @filename
5
+ @source_dir
6
+ @include_globs
7
+ @exclude_globs
8
+
9
+ def initialize(filename)
10
+ @filename = filename
11
+ @source_dir = Dir.pwd
12
+ @include_globs=Array::new
13
+ @exclude_globs=Array::new
14
+ self
15
+ end
16
+
17
+ def source_dir(dir)
18
+ @source_dir=dir
19
+ self
20
+ end
21
+
22
+ def include_glob(glob)
23
+ @include_globs << glob
24
+ self
25
+ end
26
+
27
+ def exclude_glob(glob)
28
+ @exclude_globs << glob
29
+ self
30
+ end
31
+
32
+ def zip
33
+ path = File.dirname(@filename)
34
+ if !Dir.exists?(path)
35
+ FileUtils.mkdir_p(path)
36
+ end
37
+
38
+ Dir.chdir(@source_dir) do
39
+ include_files=Array::new
40
+ @include_globs.each{|include_glob|
41
+
42
+ }
43
+ end
44
+ end
45
+ end
46
+ 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.264
4
+ version: 0.0.269
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-01 00:00:00.000000000 Z
11
+ date: 2021-01-14 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
@@ -100,11 +101,12 @@ files:
100
101
  - lib/raykit/tasks.rb
101
102
  - lib/raykit/timer.rb
102
103
  - lib/raykit/version.rb
104
+ - lib/raykit/zip.rb
103
105
  homepage: http://rubygems.org/gems/raykit
104
106
  licenses:
105
107
  - MIT
106
108
  metadata: {}
107
- post_install_message:
109
+ post_install_message:
108
110
  rdoc_options: []
109
111
  require_paths:
110
112
  - lib
@@ -119,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
121
  - !ruby/object:Gem::Version
120
122
  version: '0'
121
123
  requirements: []
122
- rubygems_version: 3.1.2
123
- signing_key:
124
+ rubygems_version: 3.2.3
125
+ signing_key:
124
126
  specification_version: 4
125
127
  summary: ruby gem to support rake ci/cd tasks
126
128
  test_files: []