effuse 0.3.2 → 1.0.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 +4 -1
- data/bin/effuse +23 -5
- data/effuse.gemspec +1 -1
- metadata +2 -2
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -31,7 +31,9 @@ Symlinks aren't working out for you? Effuse has got you covered. Just run
|
|
31
31
|
symlinks it created before.
|
32
32
|
|
33
33
|
Don't want to symlink a certain bothersome file? Why not tell Effuse your
|
34
|
-
opinion on the matter using `effuse -e file`?
|
34
|
+
opinion on the matter using `effuse -e file`? Or why not give it a stern
|
35
|
+
talking to using a `.effuseignore` file? Just put one file glob to exclude per
|
36
|
+
line in there and never worry again.
|
35
37
|
|
36
38
|
```
|
37
39
|
Usage: effuse [OPTION...] [DEST]
|
@@ -41,6 +43,7 @@ Usage: effuse [OPTION...] [DEST]
|
|
41
43
|
-i, --include GLOB Include GLOB in symlinking
|
42
44
|
|
43
45
|
-y, --noconfirm CHOICE Assume CHOICE on file conflicts
|
46
|
+
-n, --no-backup Do not create backup files
|
44
47
|
|
45
48
|
-v, --verbose Show verbose output
|
46
49
|
-h, --help Show this message
|
data/bin/effuse
CHANGED
@@ -4,7 +4,17 @@ require 'optparse'
|
|
4
4
|
require 'ostruct'
|
5
5
|
require 'fileutils'
|
6
6
|
|
7
|
-
options = OpenStruct.new(:verbose
|
7
|
+
options = OpenStruct.new(:verbose => false,
|
8
|
+
:clean => false,
|
9
|
+
:noconfirm => nil,
|
10
|
+
:backup => true,
|
11
|
+
:exclude => %w[.effuseignore .git .gitignore .gitmodules *~ .*~ .*.swp])
|
12
|
+
|
13
|
+
if File.exist?('.effuseignore')
|
14
|
+
File.open('.effuseignore').lines do |line|
|
15
|
+
options.exclude << line.chomp
|
16
|
+
end
|
17
|
+
end
|
8
18
|
|
9
19
|
OptionParser.new do |o|
|
10
20
|
o.banner = 'Usage: effuse [OPTION...] [DEST]'
|
@@ -29,6 +39,10 @@ OptionParser.new do |o|
|
|
29
39
|
options.noconfirm = choice.downcase[0].chr # Shakes fist at Ruby 1.8 (.chr)
|
30
40
|
end
|
31
41
|
|
42
|
+
o.on('-n', '--no-backup', 'Do not create backup files') do
|
43
|
+
options.backup = false
|
44
|
+
end
|
45
|
+
|
32
46
|
o.separator ''
|
33
47
|
|
34
48
|
o.on('-v', '--verbose', 'Show verbose output') do
|
@@ -109,11 +123,15 @@ else
|
|
109
123
|
|
110
124
|
case input
|
111
125
|
when 'r'
|
112
|
-
|
113
|
-
|
126
|
+
if options.backup
|
127
|
+
puts "renaming #{dest} -> #{dest + '~'}" if options.verbose
|
128
|
+
File.rename(dest, dest + '~')
|
129
|
+
end
|
114
130
|
when 'i'
|
115
|
-
|
116
|
-
|
131
|
+
if options.backup
|
132
|
+
puts "renaming #{src} -> #{src + '~'}" if options.verbose
|
133
|
+
File.rename(src, src + '~')
|
134
|
+
end
|
117
135
|
puts "renaming #{dest} -> #{src}" if options.verbose
|
118
136
|
File.rename(dest, src)
|
119
137
|
when 'k'
|
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: 0.
|
4
|
+
version: 1.0.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-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A tool for managing symlinks
|
15
15
|
email:
|