raykit 0.0.323 → 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: efd74944a1f30ac6317bef794cc964e37e484cef50814f0702b61b7b17c1d4d2
4
- data.tar.gz: 5eb12a1cafeb1dd6812d5747ea90046face2dfefffdc4c6008ec7d4593d26a4a
3
+ metadata.gz: f93acb6ca8d1677fbe714816617ebcc206ca1dbcbe34ac6384d006eaab3b14ea
4
+ data.tar.gz: 869d995712eee449fd5195cef6df474d95b4fce9530e3262ded3986a8b303344
5
5
  SHA512:
6
- metadata.gz: 4848c9952dcc2853067c1e7ef54b275f1c08c4dd18dac99c5e692750bc2ce28d526bd7e74da7910e27577ae1251f2ba20fe0f6510c51a7ab5ea140a58722a8b0
7
- data.tar.gz: 8390ef4a06b1c5c48217dda4e729647750757e03c15e3a0a4ebc5c90c9dfae214f9422aedc329f5346b39903ad27986dec94f6c0311877b7645f0d0ddc52fffa
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
@@ -87,7 +87,7 @@ module Raykit
87
87
  end
88
88
 
89
89
  def get_tag_commit_id(name)
90
- cmd = Raykit::Command.new("git rev-parse \"#{name}\"").run#, 0, nil, false)
90
+ cmd = Raykit::Command.new("git rev-parse \"#{name}\"").run
91
91
  if !cmd.output.include?("fatal") && !cmd.error.include?("fatal")
92
92
  cmd.output.strip
93
93
  else
@@ -96,7 +96,7 @@ module Raykit
96
96
  end
97
97
 
98
98
  def has_tag(name)
99
- cmd = Raykit::Command.new("git rev-parse \"#{name}\"", 0, nil, false)
99
+ cmd = Raykit::Command.new("git rev-parse \"#{name}\"").run
100
100
  if !cmd.output.include?("fatal") && !cmd.error.include?("fatal")
101
101
  true
102
102
  else
@@ -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?
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.323
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: 2021-12-29 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