effuse 0.3.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/ChangeLog.md +5 -0
  2. data/README.md +4 -1
  3. data/bin/effuse +23 -5
  4. data/effuse.gemspec +1 -1
  5. metadata +2 -2
data/ChangeLog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.0 (April 9 2012)
4
+
5
+ * Added `--no-backup`
6
+ * Support for `.effuseignore`
7
+
3
8
  ## 0.3.2 (March 31 2012)
4
9
 
5
10
  * Fix: Exclude `.*~` files from symlinking
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 => false, :exclude => ['.git', '.gitignore', '.gitmodules', '*~', '.*~', '.*.swp'], :clean => false, :noconfirm => nil)
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
- puts "renaming #{dest} -> #{dest + '~'}" if options.verbose
113
- File.rename(dest, dest + '~')
126
+ if options.backup
127
+ puts "renaming #{dest} -> #{dest + '~'}" if options.verbose
128
+ File.rename(dest, dest + '~')
129
+ end
114
130
  when 'i'
115
- puts "renaming #{src} -> #{src + '~'}" if options.verbose
116
- File.rename(src, src + '~')
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'effuse'
3
- s.version = '0.3.2'
3
+ s.version = '1.0.0'
4
4
  s.authors = ['Curtis McEnroe']
5
5
  s.email = ['programble@gmail.com']
6
6
  s.homepage = 'https://github.com/programble/effuse'
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.3.2
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-01 00:00:00.000000000 Z
12
+ date: 2012-04-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A tool for managing symlinks
15
15
  email: