lachlan-sprinkle 0.0.8 → 0.0.9
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.
- data/lib/sprinkle/actors/local.rb +1 -0
- data/lib/sprinkle/verifiers/directory.rb +1 -0
- data/lib/sprinkle/verifiers/executable.rb +1 -0
- data/lib/sprinkle/verifiers/file.rb +2 -0
- data/lib/sprinkle/verifiers/process.rb +1 -0
- data/lib/sprinkle/verifiers/ruby.rb +1 -0
- data/lib/sprinkle/verifiers/symlink.rb +2 -1
- data/lib/sprinkle/version.rb +1 -1
- data/sprinkle.gemspec +2 -2
- metadata +2 -2
@@ -23,6 +23,7 @@ module Sprinkle
|
|
23
23
|
# absolute path to an executable. If no '/' is in the path, it assumes you're
|
24
24
|
# checking for a global executable that would be available anywhere on the command line.
|
25
25
|
def has_executable(path)
|
26
|
+
path = path.to_s
|
26
27
|
if RUBY_PLATFORM =~ /win32/
|
27
28
|
raise NotImplementedError, "Win32 platform does not support checking for executables"
|
28
29
|
else
|
@@ -15,6 +15,7 @@ module Sprinkle
|
|
15
15
|
|
16
16
|
# Checks to make sure <tt>path</tt> is a file on the remote server.
|
17
17
|
def has_file(path)
|
18
|
+
path = path.to_s
|
18
19
|
if RUBY_PLATFORM =~ /win32/
|
19
20
|
command = "if exist \"#{path}\" (if not exist \"#{path}\\\" (exit 0) else (exit 1)) else (exit 1)"
|
20
21
|
command << ' > NUL 2>&1' unless logger.debug?
|
@@ -25,6 +26,7 @@ module Sprinkle
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def file_contains(path, text)
|
29
|
+
path, text = path.to_s, text.to_s
|
28
30
|
if RUBY_PLATFORM =~ /win32/
|
29
31
|
command = "findstr /m /c:\"#{text}\" \"#{path}\""
|
30
32
|
command << ' > NUL 2>&1' unless logger.debug?
|
@@ -14,6 +14,7 @@ module Sprinkle
|
|
14
14
|
# Checks to make sure <tt>process</tt> is a process running
|
15
15
|
# on the remote server.
|
16
16
|
def has_process(process)
|
17
|
+
process = process.to_s
|
17
18
|
if RUBY_PLATFORM =~ /win32/
|
18
19
|
command = "tasklist /fo table /nh | findstr /c:\"#{process}\""
|
19
20
|
command << ' > NUL 2>&1' unless logger.debug?
|
@@ -17,6 +17,7 @@ module Sprinkle
|
|
17
17
|
|
18
18
|
# Checks if a gem exists by calling "sudo gem list" and grepping against it.
|
19
19
|
def has_gem(name, version=nil)
|
20
|
+
name = name.to_s
|
20
21
|
version = version.nil? ? '' : version.gsub('.', '\.')
|
21
22
|
if RUBY_PLATFORM =~ /win32/
|
22
23
|
command = "gem list | findstr /r /c:\"^#{name} (.*#{version}.*)$\""
|
@@ -19,10 +19,11 @@ module Sprinkle
|
|
19
19
|
# Checks that <tt>symlink</tt> is a symbolic link. If <tt>file</tt> is
|
20
20
|
# given, it checks that <tt>symlink</tt> points to <tt>file</tt>
|
21
21
|
def has_symlink(symlink, file = nil)
|
22
|
+
symlink, file = symlink.to_s, file.to_s
|
22
23
|
if RUBY_PLATFORM =~ /win32/
|
23
24
|
raise NotImplementedError, "Win32 platform does not support checking for symbolic links"
|
24
25
|
else
|
25
|
-
if file.
|
26
|
+
if file.empty?
|
26
27
|
@commands << "test -L #{symlink}"
|
27
28
|
else
|
28
29
|
@commands << "test '#{file}' = `readlink #{symlink}`"
|
data/lib/sprinkle/version.rb
CHANGED
data/sprinkle.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{sprinkle}
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.9"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Marcus Crafter", "Mitchell Hashimoto"]
|
7
|
-
s.date = %q{2009-03-
|
7
|
+
s.date = %q{2009-03-31}
|
8
8
|
s.default_executable = %q{sprinkle}
|
9
9
|
s.description = %q{Ruby DSL based software provisioning tool}
|
10
10
|
s.email = ["crafterm@redartisan.com", "mitchell.hashimoto@citrusbyte.com"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lachlan-sprinkle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Crafter
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-03-
|
13
|
+
date: 2009-03-31 00:00:00 -07:00
|
14
14
|
default_executable: sprinkle
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|