sprout 1.0.3.pre → 1.0.4.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprout might be problematic. Click here for more details.
@@ -12,14 +12,6 @@ module Sprout::System
|
|
12
12
|
# windows normally offers.
|
13
13
|
class WinNixSystem < WinSystem
|
14
14
|
|
15
|
-
def clean_path(path)
|
16
|
-
return nil if path.nil?
|
17
|
-
if(path.index(' '))
|
18
|
-
return %{'#{path}'}
|
19
|
-
end
|
20
|
-
return path
|
21
|
-
end
|
22
|
-
|
23
15
|
def win_home
|
24
16
|
@win_home ||= ENV['HOMEDRIVE'] + ENV['HOMEPATH']
|
25
17
|
end
|
@@ -53,7 +53,7 @@ module Sprout::System
|
|
53
53
|
# Gets the process runner and calls
|
54
54
|
# platform-specific execute method
|
55
55
|
def get_and_execute_process_runner tool, options=nil
|
56
|
-
tool = find_tool
|
56
|
+
tool = clean_path find_tool(tool)
|
57
57
|
runner = get_process_runner
|
58
58
|
runner.execute_win32 "\"#{tool}\" #{options}"
|
59
59
|
runner
|
data/lib/sprout/version.rb
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
|
2
2
|
class SongGenerator < Sprout::Generator::Base
|
3
|
-
|
3
|
+
##
|
4
|
+
# Set your favorite song name:
|
4
5
|
add_param :favorite, String, { :default => 'Emerge' }
|
5
6
|
|
7
|
+
##
|
8
|
+
# Define your generator directories, files and templates:
|
6
9
|
def manifest
|
7
|
-
template "#{
|
10
|
+
template "#{favorite_cleaned}.txt", 'Song.txt'
|
8
11
|
end
|
9
12
|
|
13
|
+
protected
|
14
|
+
|
15
|
+
# helper methods will be available to templates too:
|
16
|
+
def favorite_cleaned
|
17
|
+
favorite.gsub(' ', '').snake_case
|
18
|
+
end
|
10
19
|
end
|
11
20
|
|
@@ -21,7 +21,7 @@ class WinNixSystemTest < Test::Unit::TestCase
|
|
21
21
|
end
|
22
22
|
|
23
23
|
should "wrap paths that have spaces with escaped quotes" do
|
24
|
-
assert_equal "\
|
24
|
+
assert_equal "\"foo bar\"", @sys.clean_path("foo bar")
|
25
25
|
end
|
26
26
|
|
27
27
|
should "not modify paths that have no spaced" do
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 4
|
9
9
|
- pre
|
10
|
-
version: 1.0.
|
10
|
+
version: 1.0.4.pre
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Bayes
|
@@ -265,7 +265,6 @@ files:
|
|
265
265
|
- script/console
|
266
266
|
- script/destroy
|
267
267
|
- script/generate
|
268
|
-
- sprout-1.0.2.pre.gem
|
269
268
|
- sprout.gemspec
|
270
269
|
- test/fixtures/archive_unpacker/copyable/some_file.exe
|
271
270
|
- test/fixtures/archive_unpacker/copyable/some_file.rb
|
data/sprout-1.0.2.pre.gem
DELETED
Binary file
|