raykit 0.0.326 → 0.0.327

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: 8b03662c8cedb6e2e5661562a7d1602ea64c97732b41f66a9156a7006580037d
4
- data.tar.gz: 871b92663b0fc51c52d27498e2bd57f3e981acfd573970c98512054b57da5cc7
3
+ metadata.gz: f93acb6ca8d1677fbe714816617ebcc206ca1dbcbe34ac6384d006eaab3b14ea
4
+ data.tar.gz: 869d995712eee449fd5195cef6df474d95b4fce9530e3262ded3986a8b303344
5
5
  SHA512:
6
- metadata.gz: 190c9c3d09891549fd4f53cd9bfe7b8e8880754270f53184099b8927979ff62eeafebd195e08cb639d22031673f6f3e5255367a1d4ab2a74ee2ac9313deb66f4
7
- data.tar.gz: 19bfcc016d2dc5db1a6bd070ef785b95dd8325baf3fbf630ad21e7a8f56e4cacc733b7feffecb8f62aa4dd09767ef5a990932561322f9b4fb14ac413cf4c3e0c
6
+ metadata.gz: 6c82df42ad9952c3ae24c37c7b80cde130b738258fe71f6d4e7fbf90ecb7dede76b1d7c753e572b2d7537ab1eaf047ebeb8e90da0898eb00e95f906fc143cd2f
7
+ data.tar.gz: 76b1accfa40bd32bfe3847d133e90b1078e20094edb8daa825629f3749fc61272750c54b8d23db44b1c539c3ca7a9a7854e42cf8a5a06a89357624028a4d8b67
@@ -33,7 +33,7 @@ module Raykit
33
33
  end
34
34
 
35
35
  def initialize(command)
36
- #def initialize(command, timeout = 0, success_log_level = Logger::DEBUG, logging_enabled = true)
36
+ #def initialize(command, timeout = 0, success_log_level = Logger::DEBUG, logging_enabled = true)
37
37
  timeout = 0
38
38
  success_log_level = nil
39
39
  logging_enabled = false
@@ -113,7 +113,6 @@ module Raykit
113
113
  self
114
114
  end
115
115
 
116
-
117
116
  def to_log_event
118
117
  secrets = Secrets.new
119
118
  msg = secrets.hide(@command)
@@ -197,12 +196,12 @@ module Raykit
197
196
  def details
198
197
  if @output.length > 0
199
198
  @output.lines.each do |line|
200
- puts ' ' + line
199
+ puts " " + line
201
200
  end
202
201
  end
203
202
  if @error.length > 0
204
203
  @error.lines.each do |line|
205
- puts ' ' + line
204
+ puts " " + line
206
205
  end
207
206
  end
208
207
  # summary
@@ -19,18 +19,5 @@ module Raykit
19
19
  end
20
20
  ""
21
21
  end
22
-
23
- def self.msbuild_2019_path
24
- ["2019/Enterprise/MSBuild/Current/Bin",
25
- "2019/Professional/MSBuild/Current/Bin",
26
- "2019/Community/MSBuild/Current/Bin"].each do |relative_path|
27
- ["C:/Program Files/Microsoft Visual Studio/",
28
- "C:/Program Files (x86)/Microsoft Visual Studio/"].each do |prog_path|
29
- path = "#{prog_path}#{relative_path}"
30
- return path if Dir.exist?(path)
31
- end
32
- end
33
- ""
34
- end
35
22
  end
36
23
  end
@@ -97,6 +97,11 @@ module Raykit
97
97
  outstanding_commit? || !`git log -n 1`.include?("tag:")
98
98
  end
99
99
 
100
+ def read_only?
101
+ return true if !File.exists?(".git")
102
+ return false
103
+ end
104
+
100
105
  def detached?
101
106
  return true if @git_directory.nil?
102
107
  @git_directory.detached?
@@ -279,7 +284,7 @@ module Raykit
279
284
 
280
285
  def run(command, quit_on_failure = true)
281
286
  if command.is_a?(Array)
282
- command.each { |subcommand| run(subcommand, quit_on_failure) }
287
+ command.each { |subcommand| run(subcommand, quit_on_failure, success_log_level) }
283
288
  else
284
289
  cmd = Command.new(command).set_timeout(0).run
285
290
  cmd.summary
data/lib/raykit/tasks.rb CHANGED
@@ -9,27 +9,31 @@ desc "integrate changes into the git repository"
9
9
  task :integrate do
10
10
  puts Rainbow(": integrate").blue.bright
11
11
 
12
- git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
13
- if git_dir.detached?
14
- puts "detached head state, skipping integrate operations"
12
+ if PROJECT.read_only?
13
+ puts " read only state, skipping integrate operations"
15
14
  else
16
- if PROJECT.outstanding_commit?
17
- Rake::Task["test"].invoke if Rake::Task.task_defined?("test")
15
+ git_dir = Raykit::Git::Directory.new(Rake.application.original_dir)
16
+ if git_dir.detached?
17
+ puts " detached head state, skipping integrate operations"
18
18
  else
19
- puts " no outstanding commits detected"
20
- end
19
+ if PROJECT.outstanding_commit?
20
+ Rake::Task["test"].invoke if Rake::Task.task_defined?("test")
21
+ else
22
+ puts " no outstanding commits detected"
23
+ end
21
24
 
22
- if !File.exist?(".gitignore")
23
- puts "warning: .gitignore does not exist."
24
- else
25
- PROJECT.run("git add --all")
26
- unless `git status`.include?("nothing to commit")
27
- # if(PROJECT.outstanding_commit?)
28
- commit_message = "integrate"
29
- PROJECT.run("git commit -m\"#{commit_message}\"") if PROJECT.outstanding_commit?
30
- PROJECT.run("git pull")
31
- # PROJECT.run("git push")
32
- # PROJECT.run("git push --tags")
25
+ if !File.exist?(".gitignore")
26
+ puts "warning: .gitignore does not exist."
27
+ else
28
+ PROJECT.run("git add --all")
29
+ unless `git status`.include?("nothing to commit")
30
+ # if(PROJECT.outstanding_commit?)
31
+ commit_message = "integrate"
32
+ PROJECT.run("git commit -m\"#{commit_message}\"") if PROJECT.outstanding_commit?
33
+ PROJECT.run("git pull")
34
+ # PROJECT.run("git push")
35
+ # PROJECT.run("git push --tags")
36
+ end
33
37
  end
34
38
  end
35
39
  end
data/lib/raykit.rb CHANGED
@@ -14,4 +14,4 @@ SECRETS = Raykit::Secrets.new
14
14
  # TIMER=Raykit::Timer.new
15
15
 
16
16
  REPOSITORIES = Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
17
- GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) if Dir.exist?(".git")
17
+ GIT_DIRECTORY = Raykit::Git::Directory.new(Rake.application.original_dir) # if Dir.exist?(".git")
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.326
4
+ version: 0.0.327
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-08 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler