raykit 0.0.443 → 0.0.444

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: 15ee49eb7a6946c02d37bf0ee1dfdf031e6660e5b68bcba735b7f432a44bc8e9
4
- data.tar.gz: 3efbc4b1c843315b434ecc2c1e0f92ddb1871b3ea185b58d506d8018cf49f684
3
+ metadata.gz: f336d59fe5c67cc24da002a0f6a86bf2ecc068e4931e2c4010626fdb07a1d676
4
+ data.tar.gz: 61ebe6b53e5476756a51f32115219e2efbb49e50ce5cfac014a073258730669a
5
5
  SHA512:
6
- metadata.gz: 2da160fa12a8c697b0448f5d1acfab0059674f07111e64a4b48434849c20843b18c58e7bb93213cfd9ecf03fc6c68031e868d2db070b3317e8ccd03e98ee6030
7
- data.tar.gz: c127f43376683d8609e95f3bc3187b2f5d602797184655ff4d43ae5c326a3ec96110f8b3ea94131a39346287b57f58c16a7f22445a88b0681e360ed67ea6fc2e
6
+ metadata.gz: add666b8a0ec6f15d60adacaa2413ad967edbd6689ba013f6d74a78f1c69944dc9a736a9d60c05c4f83faa1e7bf5ef8af90f612504cb4a734b137fdc605132bd
7
+ data.tar.gz: 89f75136b50ed71d24402cab50bb520b1a17c823b02d0ed135ae08d733ab59e23d5440ecb2bfbc14a890ac502197ae69bba5f7714ec6011771f51c04adabdf96
@@ -272,7 +272,7 @@ module Raykit
272
272
  end
273
273
 
274
274
  def log_to_file(filename)
275
- File.delete(filename) if File.exists?(filename)
275
+ File.delete(filename) if File.exist?(filename)
276
276
  File.open(filename, "w") { |f|
277
277
  f.puts output
278
278
  f.puts error
@@ -42,10 +42,10 @@ module Raykit
42
42
  end
43
43
 
44
44
  def copy_pdbs(dir)
45
- FileUtils.mkdir_p(dir) if !Dir.exists?(dir)
45
+ FileUtils.mkdir_p(dir) if !Dir.exist?(dir)
46
46
  self.pdbs.each { |pdb|
47
47
  target = "#{dir}/#{File.basename(pdb)}"
48
- if (!File.exists?(target))
48
+ if (!File.exist?(target))
49
49
  puts " copying #{pdb} to #{target}"
50
50
  FileUtils.cp(pdb, "#{target}")
51
51
  end
data/lib/raykit/dotnet.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Raykit
4
4
  class DotNet
5
5
  def self.init_new(name, template)
6
- if (!File.exists?("#{name}/#{name}.csproj"))
6
+ if (!File.exist?("#{name}/#{name}.csproj"))
7
7
  puts " #{name}.csproj not found, creating..."
8
8
  run("dotnet new #{template} --name #{name} --output #{name} --language C# ")
9
9
  else
@@ -7,7 +7,7 @@ module Raykit
7
7
  Dir.glob("#{source_dir}/#{glob_pattern}").each { |f|
8
8
  rel = f.gsub("#{source_dir}/", "")
9
9
  dest = "#{target_dir}/#{rel}"
10
- FileUtils.mkdir_p(File.dirname(dest)) if (!Dir.exists?(File.dirname(dest)))
10
+ FileUtils.mkdir_p(File.dirname(dest)) if (!Dir.exist?(File.dirname(dest)))
11
11
  #puts " copying #{rel} to #{dest}"
12
12
  FileUtils.cp(f, dest)
13
13
  file_count = file_count + 1
@@ -18,7 +18,7 @@ module Raykit
18
18
 
19
19
  def self.copy_file_to_dir(file, dir)
20
20
  dest = "#{dir}/#{File.basename(file)}"
21
- if (File.exists?(dest))
21
+ if (File.exist?(dest))
22
22
  return "#{dest} already exists"
23
23
  else
24
24
  FileUtils.cp(file, dest)
@@ -15,7 +15,7 @@ module Raykit
15
15
 
16
16
  def outstanding_commit?
17
17
  Dir.chdir(directory) do
18
- return false if !File.exists?(".git")
18
+ return false if !File.exist?(".git")
19
19
  if user_can_commit
20
20
  return !`git status`.include?("nothing to commit,")
21
21
  else
@@ -9,7 +9,7 @@ module Raykit
9
9
  run("candle #{File.basename(wxs_file)}")
10
10
  run("light #{name}.wixobj")
11
11
  FileUtils.cp("#{name}.msi", msi_filename)
12
- raise "#{msi_filename} does not exist" if !File.exists?(msi_filename)
12
+ raise "#{msi_filename} does not exist" if !File.exist?(msi_filename)
13
13
  File.delete("#{name}.wixobj")
14
14
  end
15
15
  end
@@ -108,7 +108,7 @@ module Raykit
108
108
  end
109
109
 
110
110
  def read_only?
111
- return true if !File.exists?(".git") || detached?
111
+ return true if !File.exist?(".git") || detached?
112
112
  return false
113
113
  end
114
114
 
data/lib/raykit.rb CHANGED
@@ -40,25 +40,29 @@ if defined?(RAYKIT_GLOBALS)
40
40
  Raykit::TopLevel.run(command, false)
41
41
  end
42
42
 
43
+ def dir(name)
44
+ FileUtils.mkdir("artifacts") if (!Dir.exist?(name))
45
+ end
46
+
43
47
  def make(artifact, command)
44
- if (File.exists?(artifact))
48
+ if (File.exist?(artifact))
45
49
  puts " #{artifact} exists"
46
50
  else
47
51
  cmd = run(command)
48
52
  if (cmd.exitstatus != 0)
49
- File.delete(artifact) if (File.exists?(artifact))
53
+ File.delete(artifact) if (File.exist?(artifact))
50
54
  end
51
55
  cmd
52
56
  end
53
57
  end
54
58
 
55
59
  def make_log(artifact, command)
56
- if (File.exists?(artifact))
60
+ if (File.exist?(artifact))
57
61
  puts " #{artifact} exists"
58
62
  else
59
63
  cmd = run(command).log_to_file(artifact)
60
64
  if (cmd.exitstatus != 0)
61
- File.delete(artifact) if (File.exists?(artifact))
65
+ File.delete(artifact) if (File.exist?(artifact))
62
66
  end
63
67
  cmd
64
68
  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.443
4
+ version: 0.0.444
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow