hekate 0.1.0.pre15 → 0.1.0.pre17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/hekate +14 -8
  3. data/lib/hekate/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d455fd921236415bd73747158836e4638ff389e
4
- data.tar.gz: ff1fdc3e402323a464f4db4a09aef387117ad4ba
3
+ metadata.gz: 69cd022959e65663fcc87c6d2df13f283a36322b
4
+ data.tar.gz: 01d70b921e120d2b4ac81cbc72d06386b895e8a7
5
5
  SHA512:
6
- metadata.gz: 08370465dbc597d29ca180944ab1aedb16489a4d962089a6e3fdfc85dfde3eb2f7b5f56f456c57383e4fc1817dd6ecb814780623cdae0beb2ee7cc09a0d51228
7
- data.tar.gz: 07dde4c299b146830d9292a6c678c0b006397a3a411607b390cc2225c09352f38f25d8c013b6231725dbeabbcff73e0eaa510ddffa84c72db6672f2d60172cff
6
+ metadata.gz: 0b4b05b72b32fb0272260ac12dbdc7878a04b9c330c3fc9916e9255fa00b1daf848fc39dbc8a8e35ecdd9dd07d7b30287a3e06ef4eb030c89c9a1f31cc594c75
7
+ data.tar.gz: 8b6978a2b98314d0f8bcb89933f457b8814bb4695462f291e2f703e6927101ec0dd18690877072bd327615dc97238c69e6dae43131765d951df8564839f44be0
data/bin/hekate CHANGED
@@ -24,10 +24,10 @@ class CommandProcessor
24
24
  end
25
25
 
26
26
  def self.valid?(options)
27
- say("<%= color('--application is required', RED) %>!") unless options.application
28
- say("<%= color('--environment is required', RED) %>!") unless options.environment
27
+ say("<%= color('--application is required', RED) %>!") if options.application.blank?
28
+ say("<%= color('--environment is required', RED) %>!") if options.environment.blank?
29
29
 
30
- options.application && options.environment && yield
30
+ !options.application.blank? && !options.environment.blank? && yield
31
31
  end
32
32
  end
33
33
 
@@ -40,7 +40,7 @@ command :import do |c|
40
40
  CommandProcessor.add_default_values options
41
41
 
42
42
  next unless CommandProcessor.valid?(options) do
43
- unless options.file && File.exist?(options.file)
43
+ if options.file.blank? || !File.exist?(options.file)
44
44
  say("<%= color('--file was not provided or does not exist', RED) %>!")
45
45
  next(false)
46
46
  end
@@ -49,6 +49,7 @@ command :import do |c|
49
49
  say("<%= color('ABORTED', RED) %>!")
50
50
  next(false)
51
51
  end
52
+ next(true)
52
53
  end
53
54
 
54
55
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
@@ -66,10 +67,11 @@ command :put do |c|
66
67
  CommandProcessor.add_default_values options
67
68
 
68
69
  next unless CommandProcessor.valid?(options) do
69
- unless options.key && options.value
70
+ if options.key.blank? || options.value.blank?
70
71
  say("<%= color('--key and --value are required', RED) %>!")
71
72
  next(false)
72
73
  end
74
+ next(true)
73
75
  end
74
76
 
75
77
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
@@ -86,10 +88,11 @@ command :delete do |c|
86
88
  CommandProcessor.add_default_values options
87
89
 
88
90
  next unless CommandProcessor.valid?(options) do
89
- unless options.key
91
+ if options.key.blank?
90
92
  say("<%= color('--key is required', RED) %>!")
91
93
  next(false)
92
94
  end
95
+ next(true)
93
96
  end
94
97
 
95
98
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
@@ -109,6 +112,7 @@ command :delete_all do |c|
109
112
  say("<%= color('ABORTED', RED) %>!")
110
113
  next(false)
111
114
  end
115
+ next(true)
112
116
  end
113
117
 
114
118
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
@@ -125,10 +129,11 @@ command :get do |c|
125
129
  CommandProcessor.add_default_values options
126
130
 
127
131
  next unless CommandProcessor.valid?(options) do
128
- unless options.key
132
+ if options.key.blank?
129
133
  say("<%= color('--key is required', RED) %>!")
130
134
  next(false)
131
135
  end
136
+ next(true)
132
137
  end
133
138
 
134
139
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
@@ -145,7 +150,7 @@ command :export do |c|
145
150
  CommandProcessor.add_default_values options
146
151
 
147
152
  next unless CommandProcessor.valid?(options) do
148
- unless options.file
153
+ if options.file.blank?
149
154
  say("<%= color('--file is required', RED) %>!")
150
155
  next(false)
151
156
  end
@@ -155,6 +160,7 @@ command :export do |c|
155
160
  next(false)
156
161
  end
157
162
  end
163
+ next true
158
164
  end
159
165
  engine = Hekate::Engine.new(options.region, options.environment, options.application)
160
166
  engine.export options.file
@@ -1,3 +1,3 @@
1
1
  module Hekate
2
- VERSION = '0.1.0.pre15'.freeze
2
+ VERSION = '0.1.0.pre17'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hekate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre15
4
+ version: 0.1.0.pre17
5
5
  platform: ruby
6
6
  authors:
7
7
  - jasonrisch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-15 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk