raykit 0.0.443 → 0.0.445

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: '049527926a62d88f12dabb8ba1bd5a627f979a5b8c92c99ca877152f6ba4bbd7'
4
+ data.tar.gz: 11911b5cc1d11daefe4126cf25f17f335eddb9dbf30ea8e6d8610d3775471638
5
5
  SHA512:
6
- metadata.gz: 2da160fa12a8c697b0448f5d1acfab0059674f07111e64a4b48434849c20843b18c58e7bb93213cfd9ecf03fc6c68031e868d2db070b3317e8ccd03e98ee6030
7
- data.tar.gz: c127f43376683d8609e95f3bc3187b2f5d602797184655ff4d43ae5c326a3ec96110f8b3ea94131a39346287b57f58c16a7f22445a88b0681e360ed67ea6fc2e
6
+ metadata.gz: 9c6dbc390b0009bb8d4dacec50703ea99cdbaad04318329eeb0f0ae4c2dea0f9e8092fc849487df604df4564aae63d191d21734dfbe9a13e637ba3bfac92a496
7
+ data.tar.gz: a9a0dc81ea6da5972b7bebefdd9eb482790e42c36136f0bda78e78f8e1c1aa7d1c87bbd358eab97fe634e69e1cbd377052ee951e39b8350d4fb1d1b75186635d
@@ -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,34 @@ 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
+
47
+ def cpy(source,dest)
48
+ FileUtils.mkdir_p(File.dirname(dest)) if !Dir.exist?(File.dirname(dest))
49
+ FileUtils.cp(source,dest)
50
+ end
51
+
43
52
  def make(artifact, command)
44
- if (File.exists?(artifact))
53
+ if (File.exist?(artifact))
45
54
  puts " #{artifact} exists"
46
55
  else
47
56
  cmd = run(command)
48
57
  if (cmd.exitstatus != 0)
49
- File.delete(artifact) if (File.exists?(artifact))
58
+ File.delete(artifact) if (File.exist?(artifact))
50
59
  end
51
60
  cmd
52
61
  end
53
62
  end
54
63
 
55
64
  def make_log(artifact, command)
56
- if (File.exists?(artifact))
65
+ if (File.exist?(artifact))
57
66
  puts " #{artifact} exists"
58
67
  else
59
68
  cmd = run(command).log_to_file(artifact)
60
69
  if (cmd.exitstatus != 0)
61
- File.delete(artifact) if (File.exists?(artifact))
70
+ File.delete(artifact) if (File.exist?(artifact))
62
71
  end
63
72
  cmd
64
73
  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.445
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow