raykit 0.0.435 → 0.0.437

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/raykit/git/repository.rb +5 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2105e95c04a09dff02d244df156138ee1562dcd0bb8d6e179aa7f7edcf41ba5c
4
- data.tar.gz: bac5e8131a8b2d7dfb4a511f6093930d25d55bf00f54809f6a2926f6caffd305
3
+ metadata.gz: 98cf5f0bdd9cebb7f589fd780db251516e8ce5a5c949a4f78bc8657c0922aef1
4
+ data.tar.gz: 54ef2e3a238e2ea18ba3455218649397e1dff762b7398e0570df5db87aebf080
5
5
  SHA512:
6
- metadata.gz: 4f24b9f1cea0934b489e2b064a887e90584a4734afa4db8359436f40e6bff99096eb099b2bf91ce1dc8949881c4e52c81b420c20ff138bd0969c0e934e36abec
7
- data.tar.gz: bbcb87cbdb3ca07535ee047add4b9aa6c0e4f48fd8b0cf446fc38faaa84f8f7f78137baafd47ec49ee4f76eea1eba714f345a4c29ec4ac3ae8c0e3397c063568
6
+ metadata.gz: 3faa3938c63672db01a90069493479b3eb7dbf8e91bf64802314a3899edab69128d0b7f7d9c6a9860f9ed5df518246cfd09a296bb7a29091fa1cd01c45829610
7
+ data.tar.gz: 0da88c6acf36b409c5fff76a837c363ef8232ea26dd4fb3381ff235e3f2b406c42e682d6f5750f050dd5a8f441f41191c917fdaa1ae9a35fbe06c7060b88ccdc
@@ -147,7 +147,6 @@ module Raykit
147
147
  def work(command)
148
148
  pull if (!Dir.exist?(get_dev_dir("work")))
149
149
  filename = "#{Raykit::Environment::log_dir}/work_#{relative_path.gsub("/", "-")}.json"
150
- puts " filename #{filename}"
151
150
  if (Raykit::Git::Directory.new(get_dev_dir("work")).outstanding_commit?)
152
151
  puts " outstanding commit in #{get_dev_dir("work")}"
153
152
  work_cmd = Raykit::Git::Repository::work(url, command)
@@ -156,7 +155,6 @@ module Raykit
156
155
  else
157
156
  if (File.exist?(filename))
158
157
  return Raykit::Command::parse(IO.read(filename))
159
- #work_cmd.summary(true).details_on_failure
160
158
  else
161
159
  work_cmd = Raykit::Git::Repository::work_url(url, command)
162
160
  work_cmd.save_as(filename)
@@ -169,10 +167,8 @@ module Raykit
169
167
  commit_id = "#{latest_commit(default_branch)}"
170
168
  make_id = "make_#{relative_path.gsub("/", "-")}_#{commit_id}"
171
169
  filename = "#{Raykit::Environment::log_dir}/#{make_id}.json"
172
- puts " filename #{filename}"
173
170
  if (File.exist?(filename))
174
171
  return Raykit::Command::parse(IO.read(filename))
175
- #make_cmd.summary(true).details_on_failure
176
172
  else
177
173
  make_cmd = Raykit::Git::Repository::make_url(url, commit_id, "rake default")
178
174
  make_cmd.save_as(filename)
@@ -201,20 +197,22 @@ module Raykit
201
197
 
202
198
  def self.work_url(url, cmd)
203
199
  repo = Raykit::Git::Repository.new(url)
200
+ puts " work #{url} #{command}"
204
201
  work_dir = repo.get_dev_dir("work")
205
202
  repo.clone(work_dir) if !Dir.exist?(work_dir)
206
203
  Dir.chdir(work_dir) do
207
204
  run("git pull")
208
205
  #run(cmd)
209
206
  cmd = Raykit::Command.new(cmd)
210
- cmd = cmd.run() ##.summary().details_on_failure
207
+ cmd = cmd.run().summary()
211
208
  cmd
212
209
  end
213
210
  end
214
211
 
215
212
  def self.make_url(url, commit_id, command)
216
213
  repo = Raykit::Git::Repository.new(url)
217
- make_dir = repo.get_dev_dir("make") + "/" + commit_id
214
+ puts " make #{url} #{commit_id} #{command}"
215
+ make_dir = Raykit::Environment::normalize_path(repo.get_dev_dir("make") + "/" + commit_id)
218
216
  FileUtils.mkdir_p(repo.get_dev_dir("make")) if !Dir.exist?(repo.get_dev_dir("make"))
219
217
  if (Dir.exist?(make_dir))
220
218
  FileUtils.rm_rf(make_dir)
@@ -225,7 +223,7 @@ module Raykit
225
223
  run("git reset --hard #{commit_id}")
226
224
  FileUtils.rm_rf(".git")
227
225
  cmd = Raykit::Command.new(command)
228
- cmd = cmd.run() #.summary().details_on_failure
226
+ cmd = cmd.run().summary()
229
227
  end
230
228
  FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
231
229
  cmd
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.435
4
+ version: 0.0.437
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow