thor-tropo 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/thor-tropo.rb +8 -7
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.1.0
data/lib/thor-tropo.rb CHANGED
@@ -18,6 +18,9 @@ module ThorTropo
18
18
  include Thor::Actions
19
19
 
20
20
  @packaged_cookbook = nil
21
+
22
+ namespace "tropo"
23
+
21
24
  class_option :called_path,
22
25
  :type => :string,
23
26
  :default => Dir.pwd
@@ -27,8 +30,6 @@ module ThorTropo
27
30
  :aliases => "-v",
28
31
  :default => false
29
32
 
30
- namespace "tropo"
31
-
32
33
  method_option :force,
33
34
  :type => :boolean,
34
35
  :aliases => "-f",
@@ -42,7 +43,7 @@ module ThorTropo
42
43
  :default => false,
43
44
  :desc => "NO-OP mode, dont actually upload anything"
44
45
 
45
- method_option :ignore,
46
+ method_option :ignore_dirty,
46
47
  :type => :boolean,
47
48
  :aliases => "-i",
48
49
  :default => false,
@@ -62,8 +63,8 @@ module ThorTropo
62
63
 
63
64
  $config = ThorTropo::Configuration.new(options[:called_path])
64
65
 
65
- unless options[:ignore]
66
- unless clean?
66
+ unless clean?
67
+ unless options[:ignore_dirty]
67
68
  say "There are files that need to be committed first.", :red
68
69
  exit 1
69
70
  end
@@ -102,14 +103,14 @@ module ThorTropo
102
103
  end
103
104
 
104
105
  def clean?
105
- sh_with_excode("git diff --exit-codeBerkshelf")[1] == 0
106
+ sh_with_excode("cd #{options[:called_path]}; git diff --exit-code")[1] == 0
106
107
  end
107
108
 
108
109
  def clean_lockfile
109
110
  berksfile = "#{options[:called_path]}/Berksfile.lock"
110
111
 
111
112
  if File.exists? berksfile
112
- say "[ TROPO ] - Removing Berksfile.lock before running Berkshelf", :green
113
+ say "[ TROPO ] - Removing Berksfile.lock before running Berkshelf", :blue
113
114
  remove_file berksfile
114
115
  else
115
116
  say "[ TROPO ] - Unable to find berksfile to delete - [ #{berksfile} ]", :yellow
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-tropo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: