raykit 0.0.439 → 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: 54d7aa6c3a8cb54d80f50e8d452a1881a2cf20a6a74d80cf0645b9bee0d430d5
4
- data.tar.gz: 50ed85cddcc44c580ebbb4b048dd636d46da7f3b6583fb17efecfa04a1fe029c
3
+ metadata.gz: 94b2cf08f83bf1471755f4243b3ff27fabed667151da409150ba95d089646619
4
+ data.tar.gz: 3ecc869f957d7dfd88c30bc7b3504875f254d735b300af1e66a4f57c68b8a709
5
5
  SHA512:
6
- metadata.gz: 8270cd7c18792132f85f6b2093f9e2e5e683e482ce6253dc8b520df3e4f72644494feb3add9d010bdcfa6cb8f5e59e34d936bfa57b9de3f0f147d9b76b2a3dd9
7
- data.tar.gz: e5eafbf053099b6e2acdb21339e3edd66f7f6936456dddb7ee0e9c32f70ecfe528d1dd7ebe20eab00c2b6a41ba9ec22c1ba52b2ef18c1a5bd2ed4daab49bb1f8
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")
@@ -197,12 +199,11 @@ module Raykit
197
199
 
198
200
  def self.work_url(url, cmd)
199
201
  repo = Raykit::Git::Repository.new(url)
200
- puts " work #{url} #{command}"
202
+ puts " work #{url} #{cmd}"
201
203
  work_dir = repo.get_dev_dir("work")
202
204
  repo.clone(work_dir) if !Dir.exist?(work_dir)
203
205
  Dir.chdir(work_dir) do
204
206
  run("git pull")
205
- #run(cmd)
206
207
  cmd = Raykit::Command.new(cmd)
207
208
  cmd = cmd.run().summary()
208
209
  cmd
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.439
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