raykit 0.0.440 → 0.0.441

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: d8c2403f2969862b6794ccee4702f40f3b62b450d057a58a5c7f3acfb20f2d7a
4
- data.tar.gz: bc98bdd06e4d2743b3a6f3dc9ca1216aa852d440db77147c2513042d793ccae6
3
+ metadata.gz: 94b2cf08f83bf1471755f4243b3ff27fabed667151da409150ba95d089646619
4
+ data.tar.gz: 3ecc869f957d7dfd88c30bc7b3504875f254d735b300af1e66a4f57c68b8a709
5
5
  SHA512:
6
- metadata.gz: 3108eb214771280ff819e06f024ff547f25f3e92e92439b60c56c9473ff8f69914651d6e5619eab9b5588d9f7803fe658d06723f90250794d671361e27c65ff3
7
- data.tar.gz: a027e05958a96158ef2125d5ca76358f36eda1c3adf28ecbfec9a7f7ed17b39bd77a9537f59a5c7e2b8bb3b42fa40f527a567f72335f7b72635266db7f694e46
6
+ metadata.gz: c460af89b0c02547f76439e1d531f9ce29cab17750b346d71989f23913244203e460415d91236c434c5b10d56f26ce99f7bc7cdcbaa0852ffec6528afdba3551
7
+ data.tar.gz: 1b9f0a3c4099667057e66854bebf7891e3f0203ec0a1065b5942fd559df1f7db99aa8232d10fd5d8fa352074bba64b5c940e90d3b8e026242488941c18190ca6
@@ -25,5 +25,10 @@ module Raykit
25
25
  return "#{dest} now exists"
26
26
  end
27
27
  end
28
+
29
+ def self.replace_invalid_chars(str)
30
+ #[\\/:"*?<>|]
31
+ str.gsub('\\', "_").gsub("/", "_").gsub(":", "_").gsub("*", "_").gsub("?", "_")
32
+ end
28
33
  end
29
34
  end
@@ -144,10 +144,11 @@ module Raykit
144
144
  update_local_clone_directory
145
145
  end
146
146
 
147
- def work(command)
147
+ def work(command, force = false)
148
148
  pull if (!Dir.exist?(get_dev_dir("work")))
149
- filename = "#{Raykit::Environment::log_dir}/work_#{relative_path.gsub("/", "-")}.json"
150
- if (Raykit::Git::Directory.new(get_dev_dir("work")).outstanding_commit?)
149
+ fcommand = Raykit::FileSystem::replace_invalid_chars(command)
150
+ filename = "#{Raykit::Environment::log_dir}/work_#{fcommand}_#{relative_path.gsub("/", "-")}.json"
151
+ if (Raykit::Git::Directory.new(get_dev_dir("work")).outstanding_commit? || force)
151
152
  puts " outstanding commit in #{get_dev_dir("work")}"
152
153
  work_cmd = Raykit::Git::Repository::work_url(url, command)
153
154
  work_cmd.save_as(filename)
@@ -163,11 +164,12 @@ module Raykit
163
164
  end
164
165
  end
165
166
 
166
- def make(command)
167
+ def make(command, force = false)
167
168
  commit_id = "#{latest_commit(default_branch)}"
168
169
  make_id = "make_#{relative_path.gsub("/", "-")}_#{commit_id}"
169
- filename = "#{Raykit::Environment::log_dir}/#{make_id}.json"
170
- if (File.exist?(filename))
170
+ fcommand = Raykit::FileSystem::replace_invalid_chars(command)
171
+ filename = "#{Raykit::Environment::log_dir}/#{make_id}_#{fcommand}.json"
172
+ if (!force && File.exist?(filename))
171
173
  return Raykit::Command::parse(IO.read(filename))
172
174
  else
173
175
  make_cmd = Raykit::Git::Repository::make_url(url, commit_id, "rake default")
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.440
4
+ version: 0.0.441
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-11-09 00:00:00.000000000 Z
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler