dyntool 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/dyntool.rb +16 -5
  2. metadata +2 -2
data/lib/dyntool.rb CHANGED
@@ -61,11 +61,22 @@ class Authentication
61
61
  def SvnChk()
62
62
  @svn_chk=`svn stat dyn.yml`
63
63
  if @svn_chk != ""
64
- STDOUT.puts <<-EOF
65
- Your dyn.yaml is not identical to the svn copy, or not exist.
66
- Run "svn up" before using this tool
67
- EOF
68
- exit 2
64
+ puts "Your dyn.yaml is not identical to the dyn.yml in the svn, or does not exist."
65
+ @q1 = ask("Do you want to see the diffrences? (yes|no)?") { |q| q.echo = true }
66
+ case @q1
67
+ when "yes" then
68
+ `svn diff dyn.yml`
69
+ @q2 = ask ("Do you want to use the local or svn version? (local|svn)?") { |q| q.echo = true }
70
+ if @q2 == "local"
71
+ `svn ci dyn.yml -m"Updating dyn.yml file to svn`
72
+ elsif @q2 == "svn"
73
+ `svn revert dyn.yml; svn up`
74
+ end
75
+ when "no"
76
+ puts "Please make sure that you local and svn copies are identical"
77
+ exit 2
78
+
79
+ end
69
80
  end
70
81
  end
71
82
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ariel Moskovich