raykit 0.0.431 → 0.0.433

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: dae967b38af596d44f5c3d1165799a935ea374b346d9df9cd29a939061c5896b
4
- data.tar.gz: '09ebc88a3852e78c7d5e7865c6f438c01f11b4171f255cc20ae75d4440b6ea64'
3
+ metadata.gz: 906835a35dd62c8e3769e29e0a34baab4f3f55a3bcc5804228da25956e5e6d4f
4
+ data.tar.gz: 4428b03b8b5b332d2852dccd38f964fddcf301daf3fc0d209e4335d370869399
5
5
  SHA512:
6
- metadata.gz: 2f439ee9911857a5d01ee352d96af4a9c0dc14e508a2b7aa487d07a5715018c49a1ee0ca7c8cb9f19c6e1ec4045f88f6fda6f67265243f5b4ddcd97dd34e4393
7
- data.tar.gz: 2448751192c19383df0a89e081b7e75c87900218c0c2edf5417665b6f9dc0322112d08d412554505d8b7092e631717438c3e4468bb47212731c8e3928bcf0806
6
+ metadata.gz: 364612f07e661ffd49d7a7385977f9ea76065345732f25f3aa185513df3a9ca875c466a8e32e423312fc5439ed875017e13e32b02e3349763c84443683daf9db
7
+ data.tar.gz: 90bfbe1a3f1d24d7217a11db95f765007622c499a419a4c98a967678a7403c5040b948e24a582b621eb61521f5ab5eed5f84a389719e6ad26b58ccd9d99f834d
@@ -127,11 +127,11 @@ module Raykit
127
127
  def clobber
128
128
  ["work", "clone", "make"].each { |d|
129
129
  dir = get_dev_dir(d)
130
- if (Dir.exists?(dir))
130
+ if (Dir.exist?(dir))
131
131
  begin
132
132
  puts " deleting #{dir}"
133
133
  FileUtils.rm_rf(dir)
134
- FileUtils.rm(dir) if (Dir.exists?(dir))
134
+ FileUtils.rm(dir) if (Dir.exist?(dir))
135
135
  rescue
136
136
  puts " problem while deleting #{dir}"
137
137
  end
@@ -144,6 +144,40 @@ module Raykit
144
144
  update_local_clone_directory
145
145
  end
146
146
 
147
+ def work(command)
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?)
151
+ puts " outstanding commit in #{get_dev_dir("work")}"
152
+ work_cmd = Raykit::Git::Repository::work(url, command)
153
+ work_cmd.save_as(filename)
154
+ return work_cmd
155
+ else
156
+ if (File.exist?(filename))
157
+ return Raykit::Command::parse(IO.read(filename))
158
+ #work_cmd.summary(true).details_on_failure
159
+ else
160
+ work_cmd = Raykit::Git::Repository::work_url(url, command)
161
+ work_cmd.save_as(filename)
162
+ end
163
+ #
164
+ end
165
+ end
166
+
167
+ def make(command)
168
+ commit_id = "#{latest_commit(default_branch)}"
169
+ make_id = "make_#{relative_path.gsub("/", "-")}_#{commit_id}"
170
+ filename = "#{Raykit::Environment::log_dir}/{make_id}.json"
171
+ if (File.exists?(filename))
172
+ return Raykit::Command::parse(IO.read(filename))
173
+ #make_cmd.summary(true).details_on_failure
174
+ else
175
+ make_cmd = Raykit::Git::Repository::make_url(url, commit_id, "rake default")
176
+ make_cmd.save_as(filename)
177
+ return make_cmd
178
+ end
179
+ end
180
+
147
181
  def self.work_pull(url)
148
182
  repo = Raykit::Git::Repository.new(url)
149
183
  work_dir = repo.get_dev_dir("work")
@@ -163,7 +197,7 @@ module Raykit
163
197
  end
164
198
  end
165
199
 
166
- def self.work(url, cmd)
200
+ def self.work_url(url, cmd)
167
201
  repo = Raykit::Git::Repository.new(url)
168
202
  work_dir = repo.get_dev_dir("work")
169
203
  repo.clone(work_dir) if !Dir.exist?(work_dir)
@@ -171,12 +205,12 @@ module Raykit
171
205
  run("git pull")
172
206
  #run(cmd)
173
207
  cmd = Raykit::Command.new(cmd)
174
- cmd = cmd.run().summary().details_on_failure
208
+ cmd = cmd.run() ##.summary().details_on_failure
175
209
  cmd
176
210
  end
177
211
  end
178
212
 
179
- def self.make(url, commit_id, command)
213
+ def self.make_url(url, commit_id, command)
180
214
  repo = Raykit::Git::Repository.new(url)
181
215
  make_dir = repo.get_dev_dir("make") + "/" + commit_id
182
216
  FileUtils.mkdir_p(repo.get_dev_dir("make")) if !Dir.exists?(repo.get_dev_dir("make"))
@@ -189,7 +223,7 @@ module Raykit
189
223
  run("git reset --hard #{commit_id}")
190
224
  FileUtils.rm_rf(".git")
191
225
  cmd = Raykit::Command.new(command)
192
- cmd = cmd.run().summary().details_on_failure
226
+ cmd = cmd.run() #.summary().details_on_failure
193
227
  end
194
228
  FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
195
229
  cmd
@@ -13,7 +13,7 @@ module Raykit
13
13
  has_msbuild = false
14
14
  end
15
15
  if (!has_msbuild)
16
- if (Dir.exists?(msbuild_path))
16
+ if (Dir.exist?(msbuild_path))
17
17
  puts " added #{msbuild_path} to PATH for msbuild"
18
18
  ENV["PATH"] = ENV["PATH"] + ";#{msbuild_path}"
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.431
4
+ version: 0.0.433
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow