raykit 0.0.408 → 0.0.411

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 024dac6959b43253232a6e4c43b9e42967730646d1da7827bff4b3458a84bb78
4
- data.tar.gz: 1cf515084460361dd7475e198235df760cdc998bb04bcdec45560585913d25cc
3
+ metadata.gz: 237647e3382b0e13272094aaca7dbfbe31e2d4851b45eb24ef9d27760458fb1d
4
+ data.tar.gz: d598dc82464ce5d24e8cc4261d3f9d15d774d5ea52b01f91381032d6218c8ffd
5
5
  SHA512:
6
- metadata.gz: 45537a5255f5de259c50d9ea902b7a087e97a44f879f39a3650f196f665d41c2f05b4736b53f335a2a12061f8f05e109edd01309726c4c1fe9c3ef7d8fc93def
7
- data.tar.gz: 47a4b915502c937cb51710a01f73ae5875d2df5766c8dfdc344472d8282179afbfb34b59069e25e313d71935a8247ba0b3786df72393df49db9ab6b132942dd6
6
+ metadata.gz: 34f1fcd9a63768503c519378f7cdc83fbd6457f525e92459b08a2eb2788dff77f338aad8b73440693721cd35a5b541ceb6294e6321ca11db8d8891461da046be
7
+ data.tar.gz: 37b7fe39602e485826ad84cf7f2d1246df834a88a1b70cb2f57ef773165d7b1cb76520ffa692e60d10d5af34ce69e1412aa55552cdbc189813ca1d99c98c240d
@@ -204,7 +204,7 @@ module Raykit
204
204
  "#{format("%.0f", elapsed)}s"
205
205
  end
206
206
 
207
- def summary(show_directory = true)
207
+ def summary(show_directory = false)
208
208
  checkmark = "\u2713"
209
209
  # warning="\u26A0"
210
210
  error = "\u0058"
@@ -215,7 +215,8 @@ module Raykit
215
215
  puts "#{symbol} #{cmd} " + Rainbow("#{elapsed_str}").cyan
216
216
  puts Rainbow(" #{@directory}").cyan
217
217
  else
218
- puts "#{symbol} #{Rainbow(SECRETS.hide(@command)).yellow} (#{elapsed_str})"
218
+ puts "#{symbol} #{Rainbow(SECRETS.hide(@command)).yellow} " + Rainbow("#{elapsed_str}").cyan
219
+ #puts "#{symbol} #{Rainbow(SECRETS.hide(@command)).yellow} (#{elapsed_str})"
219
220
  end
220
221
  self
221
222
  end
@@ -263,6 +264,14 @@ module Raykit
263
264
  self
264
265
  end
265
266
 
267
+ def log_to_file(filename)
268
+ File.delete(filename) if File.exists?(filename)
269
+ File.open(filename, "w") { |f|
270
+ f.puts output
271
+ f.puts error
272
+ }
273
+ end
274
+
266
275
  def to_hash
267
276
  hash = {}
268
277
  hash[:command] = @command
@@ -7,9 +7,25 @@ module Raykit
7
7
  class Environment
8
8
  # Normalize a directory or filename to use forward slashes
9
9
  def self.normalize_path(name)
10
+ if (windows?)
11
+ normalize_windows(name)
12
+ else
13
+ normalize_unix(name)
14
+ end
15
+ end
16
+
17
+ def self.normalize_unix(name)
10
18
  name.gsub('\\', "/")
11
19
  end
12
20
 
21
+ def self.normalize_windows(name)
22
+ name.gsub("/", '\\')
23
+ end
24
+
25
+ def self.windows?
26
+ Gem.win_platform?
27
+ end
28
+
13
29
  # The root directory for the development environment.
14
30
  # May be set using the environment variable DEV_ROOT,
15
31
  # otherwise defaults to the user home directory
@@ -17,14 +33,14 @@ module Raykit
17
33
  if ENV["DEV_ROOT"].nil?
18
34
  Environment.home_dir
19
35
  else
20
- normalize_path(ENV["DEV_ROOT"])
36
+ root = ENV["DEV_ROOT"].gsub("\\", "/").chomp("/")
37
+ normalize_path(root)
21
38
  end
22
39
  end
23
40
 
24
41
  # The user home directory
25
42
  def self.home_dir
26
43
  return normalize_path(ENV["USERPROFILE"]) if ENV.include?("USERPROFILE")
27
-
28
44
  normalize_path(ENV["HOME"])
29
45
  end
30
46
 
@@ -37,9 +53,9 @@ module Raykit
37
53
  dir = Pathname.new("#{Environment.root_dir}/#{name}")
38
54
  dir.mkpath
39
55
  if (dir.to_s.include?("https:") || dir.to_s.include?("http:"))
40
- dir.to_s.gsub("https://", ".").gsub("http://", ".").gsub("//", "/")
56
+ normalize_path(dir.to_s.gsub("https://", ".").gsub("http://", ".").gsub("//", "/"))
41
57
  else
42
- dir
58
+ normalize_path(dir.to_s)
43
59
  end
44
60
  end
45
61
 
@@ -245,7 +245,7 @@ module Raykit
245
245
  end
246
246
 
247
247
  def commit_message_filename
248
- warn "[DEPRECATION] 'commit_message_filename' is deprectated."
248
+ warn "[DEPRECATION] 'commit_message_filename' is deprecated."
249
249
  @commit_message_filename
250
250
  end
251
251
 
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.408
4
+ version: 0.0.411
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-08-26 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.2.22
148
+ rubygems_version: 3.3.7
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: ruby gem to support rake ci/cd tasks