effuse 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +5 -0
- data/README.md +2 -0
- data/bin/effuse +10 -2
- data/effuse.gemspec +1 -1
- metadata +2 -2
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -45,6 +45,8 @@ Usage: effuse [OPTION...] [DEST]
|
|
45
45
|
-y, --noconfirm CHOICE Assume CHOICE on file conflicts
|
46
46
|
-n, --no-backup Do not create backup files
|
47
47
|
|
48
|
+
-p --prefix PREFIX Prefix relative paths with PREFIX
|
49
|
+
|
48
50
|
-v, --verbose Show verbose output
|
49
51
|
-h, --help Show this message
|
50
52
|
```
|
data/bin/effuse
CHANGED
@@ -8,10 +8,11 @@ options = OpenStruct.new(:verbose => false,
|
|
8
8
|
:clean => false,
|
9
9
|
:noconfirm => nil,
|
10
10
|
:backup => true,
|
11
|
+
:prefix => '',
|
11
12
|
:exclude => %w[.effuseignore .git .gitignore .gitmodules *~ .*~ .*.swp])
|
12
13
|
|
13
14
|
if File.exist?('.effuseignore')
|
14
|
-
File.open('.effuseignore').lines do |line|
|
15
|
+
File.open('.effuseignore').lines.each do |line| # Ruby 1.8 (.each)
|
15
16
|
options.exclude << line.chomp
|
16
17
|
end
|
17
18
|
end
|
@@ -45,6 +46,12 @@ OptionParser.new do |o|
|
|
45
46
|
|
46
47
|
o.separator ''
|
47
48
|
|
49
|
+
o.on('-p', '--prefix PREFIX', 'Prefix relative paths with PREFIX') do |prefix|
|
50
|
+
options.prefix = prefix
|
51
|
+
end
|
52
|
+
|
53
|
+
o.separator ''
|
54
|
+
|
48
55
|
o.on('-v', '--verbose', 'Show verbose output') do
|
49
56
|
options.verbose = true
|
50
57
|
end
|
@@ -84,7 +91,8 @@ dirs.each do |dir|
|
|
84
91
|
end
|
85
92
|
|
86
93
|
puts "found #{file}" if options.verbose
|
87
|
-
|
94
|
+
relpath = file.split('/')[1..-1]
|
95
|
+
dest = File.join([dest_dir, options.prefix + relpath[0]] + relpath[1..-1])
|
88
96
|
files[File.expand_path(file)] = dest # Shakes fist at Ruby 1.8 (File.absolute_path)
|
89
97
|
end
|
90
98
|
end
|
data/effuse.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effuse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A tool for managing symlinks
|
15
15
|
email:
|