raykit 0.0.334 → 0.0.335

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: e8abc91a18aa1495aeeb416bc66840cf4d0c8178cbf8f93564b06d6a2ad713d7
4
- data.tar.gz: 2c98eae48b8bf3f520c5650d4e9cbb9f18f91e224641c08d6b07dc6fa20a4a20
3
+ metadata.gz: 11b0596e3a1c57df7b2a105e91a1dbe9256fe8d52e7928d6731c0d1da2b68884
4
+ data.tar.gz: e29f763644bc6de3c338f082e754162a39ccadeb9b666505a60167f48db9b1c7
5
5
  SHA512:
6
- metadata.gz: b505a0cb0d1dd1b93ba93c916103de508023b9c14fdc65236dd1c31d50f7bcc29b3e38a2d8677778f646455ea6d42065d30f200627d41237ca701eb56694bb27
7
- data.tar.gz: ef7d6e0e72a09a506c68f035de1c260f6da2766348eb677918a3bebd9548c7957f2c277ad4d027146f2ffc2a212a7f0752468d1e948992bccdc5299ccc679897
6
+ metadata.gz: a5808cbe142f28e17b3cee48f2b4a89763707653cf6bd5168ea5ed200bbc2a88ab2bd2d521a54a6d9486d06ed73362059f8a6ef4f7111934e673aa392d4b62c9
7
+ data.tar.gz: 920f9cef0828831a206c1f9463be557825c36dc3fc8fd655fe0390fdb8e559ba378e389b497ed705bc4b8dcdc18e5f6764247794fb5504bd7e6bbc0da0ec5a89
data/README.md CHANGED
@@ -2,4 +2,5 @@
2
2
 
3
3
  ruby gem supporting rake ci/cd tasks
4
4
 
5
- ## raykit console application
5
+ ## raykit console application
6
+
@@ -1,70 +1,69 @@
1
1
  module Raykit
2
- module Conan
3
- # Functionality to manage a git commit
4
- class BuildInfo < Hash
5
- def initialize(filename)
6
- current_section=''
7
- current_list = Array.new()
8
- File.readlines(filename).each do |line|
9
- #puts line
10
- if(line.index('[') == 0)
11
- if(current_section.length > 0)
12
- self.store(current_section,current_list)
13
- current_list=Array.new()
14
- end
15
- current_section=line.strip()
16
- else
17
- item = line.strip()
18
- if(item.length > 0)
19
- current_list << item
20
- end
21
- end
22
- #
2
+ module Conan
3
+ # Functionality to manage a git commit
4
+ class BuildInfo < Hash
5
+ def initialize(filename)
6
+ current_section = ""
7
+ current_list = Array.new()
8
+ File.readlines(filename).each do |line|
9
+ #puts line
10
+ if (line.index("[") == 0)
11
+ if (current_section.length > 0)
12
+ self.store(current_section, current_list)
13
+ current_list = Array.new()
23
14
  end
24
- end
25
-
26
- def section(name)
27
- items = Array.new()
28
- if(self.has_key?(name))
29
- return self[name]
15
+ current_section = line.strip()
16
+ else
17
+ item = line.strip()
18
+ if (item.length > 0)
19
+ current_list << item
30
20
  end
31
- items
21
+ end
22
+ #
32
23
  end
24
+ end
33
25
 
34
- def pdbs
35
- items = Array.new()
36
- self.section('[builddirs]').each{|dir|
37
- Dir.glob("#{dir}/**/*.pdb").sort.each{|pdb|
38
- items << pdb
39
- }
40
- }
41
- items
26
+ def section(name)
27
+ items = Array.new()
28
+ if (self.has_key?(name))
29
+ return self[name]
42
30
  end
31
+ items
32
+ end
43
33
 
44
- def copy_pdbs(dir)
45
- FileUtils.mkdir_p(dir) if !Dir.exists?(dir)
46
- self.pdbs.each{|pdb|
47
- target="#{dir}/#{File.basename(pdb)}"
48
- if(!File.exists?(target))
49
- puts " copying #{pdb} to #{target}"
50
- FileUtils.cp(pdb,"#{target}")
51
- end
52
- }
53
- end
34
+ def pdbs
35
+ items = Array.new()
36
+ self.section("[builddirs]").each { |dir|
37
+ Dir.glob("#{dir}/**/*.pdb").sort.each { |pdb|
38
+ items << pdb
39
+ }
40
+ }
41
+ items
42
+ end
54
43
 
55
- def source_dirs(pattern)
56
- items = Array.new()
57
- self.section('[builddirs]').each{|dir|
58
- if(dir.include?(pattern))
59
- parts = dir.split("package/")
60
- if(parts.length == 2)
61
- items << "#{parts[0]}source"
62
- end
63
- end
64
- }
65
- items
66
- end
44
+ def copy_pdbs(dir)
45
+ FileUtils.mkdir_p(dir) if !Dir.exists?(dir)
46
+ self.pdbs.each { |pdb|
47
+ target = "#{dir}/#{File.basename(pdb)}"
48
+ if (!File.exists?(target))
49
+ puts " copying #{pdb} to #{target}"
50
+ FileUtils.cp(pdb, "#{target}")
51
+ end
52
+ }
53
+ end
54
+
55
+ def source_dirs(pattern)
56
+ items = Array.new()
57
+ self.section("[builddirs]").each { |dir|
58
+ if (dir.include?(pattern))
59
+ parts = dir.split("package/")
60
+ if (parts.length == 2)
61
+ items << "#{parts[0]}source"
62
+ end
63
+ end
64
+ }
65
+ items
67
66
  end
68
67
  end
69
68
  end
70
-
69
+ end
data/lib/raykit.rb CHANGED
@@ -11,7 +11,21 @@ Dir.glob("#{lib_dir}/raykit/**/*.rb").sort.each { |file| require file }
11
11
 
12
12
  PROJECT = Raykit::Project.new
13
13
  SECRETS = Raykit::Secrets.new
14
- # TIMER=Raykit::Timer.new
15
14
 
16
15
  REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
17
16
  GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) # if Dir.exist?(".git")
17
+
18
+ # include Raykit::TopLevel to make run method accessible from the global scope
19
+ module Raykit
20
+ module TopLevel
21
+ def self.run(command, quit_on_failure = true)
22
+ PROJECT.run(command, quit_on_failure)
23
+ end
24
+ end
25
+ end
26
+
27
+ if defined?(RAYKIT_RUN)
28
+ def run(command, quit_on_failure = true)
29
+ Raykit::TopLevel.run(command, quit_on_failure)
30
+ end
31
+ 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.334
4
+ version: 0.0.335
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler