ric 0.11.9 → 0.11.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/HISTORY.yml +2 -0
  2. data/VERSION +1 -1
  3. data/bin/xcopy +12 -22
  4. data/lib/ric/files.rb +4 -1
  5. data/ric.gemspec +1 -1
  6. metadata +3 -3
@@ -1,4 +1,6 @@
1
1
  # would like to have this in YML format :)
2
+ 2011-02-06 v0.11.10:
3
+ - refactored fatal, and better xcopy script and library. Yay!
2
4
  2011-02-06 v0.11.8:
3
5
  - just cleanup
4
6
  2011-02-06 v0.11.7:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.9
1
+ 0.11.10
data/bin/xcopy CHANGED
@@ -25,14 +25,6 @@
25
25
  'dryrun' => true,
26
26
  }
27
27
 
28
- #def usage(comment=nil)
29
- # puts "#{$0} v.#{$PROG_VER}"
30
- # puts "Usage: #{File.basename $0} [-dhjv] [-l LOGFILE] <FOO> <BAR>"
31
- # puts $opts
32
- # pred comment if comment
33
- # exit 11
34
- #end
35
-
36
28
  def main
37
29
  debug_on 'Just created script, presuming u need some debug. TODO REMOVE ME when everything works!' if $DEBUG
38
30
  # Maybe you may want to check on ARGV
@@ -43,21 +35,19 @@
43
35
  xcopy(
44
36
  File.expand_path(myconf['from']),
45
37
  File.expand_path(myconf['to']),
46
- myconf['files'] ,
47
- myconf
48
- #‘’:dryrun => myconf['dryrun'] ,
49
- #‘’:description => myconf['dryrun'] ,
38
+ myconf['files'] , #myconf
39
+ :dryrun => myconf['dryrun']
50
40
  )
51
41
  end
52
42
 
53
- # remove me in 0.11.8!
54
- def fatal(ret,str=nil)
55
- unless str
56
- str = ret
57
- ret = 66
58
- end
59
- STDERR.puts "#{red 'XCpFatal (remove me from gem 0.11.7!)'}(#{ret}) #{str}"
60
- exit ret
61
- end
43
+ ## remove me in 0.11.8!
44
+ #def fatal(ret,str=nil)
45
+ # unless str
46
+ # str = ret
47
+ # ret = 66
48
+ # end
49
+ # STDERR.puts "#{red 'XCpFatal (remove me from gem 0.11.7!)'}(#{ret}) #{str}"
50
+ # exit ret
51
+ #end
62
52
 
63
- main
53
+ main()
@@ -11,6 +11,7 @@ module Ric
11
11
  n_actions = 0
12
12
  puts "+ Travasing: #{yellow from} ==> #{green to}"
13
13
  verbose = opts.fetch :verbose, true
14
+ dryrun = opts.fetch :dryrun, true # i scared of copying files!
14
15
 
15
16
  unless File.exists?("#{to}/.git")
16
17
  fatal 11,"Sorry cant travase data to an unversioned dir. Please version it with git (or add a .git dir/file to trick me)"
@@ -24,6 +25,8 @@ module Ric
24
25
  # With this i can understand what has been deleted, with lots of magic from git on both ends.. :)
25
26
  deb "+ First the differences:"
26
27
  deb `diff -qr #{from} #{to} |egrep -v '\\.git' `
28
+
29
+ puts "Dryrun is: #{azure dryrun}"
27
30
 
28
31
  puts "+ Files: #{cyan glob_files}"
29
32
  Dir.chdir(from)
@@ -42,7 +45,7 @@ module Ric
42
45
  command = "mkdir -p \"#{destdir}\" && cp \"#{from_file}\" \"#{to_file}\""
43
46
  end
44
47
 
45
- if opts.fetch(:dryrun, false)
48
+ if dryrun
46
49
  puts "[DRYRUN] Skipping #{gray command}"
47
50
  else
48
51
  ret = `#{command} 2>&1`
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ric}
5
- s.version = "0.11.9"
5
+ s.version = "0.11.10"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Riccardo Carlesso"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ric
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 39
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
- - 9
10
- version: 0.11.9
9
+ - 10
10
+ version: 0.11.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Riccardo Carlesso