greenhouse 0.0.9 → 0.0.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fce2d1b9935a0e274bd3fb71dad2caabc941711
4
- data.tar.gz: bbac9793912cc2c3bb352fc0c7625b1c1218b2b6
3
+ metadata.gz: 70e837df0dc41ac4c7420f9d91fe280e76299325
4
+ data.tar.gz: cbb320ed8cd0d342c759c75d33d3afd0b097acea
5
5
  SHA512:
6
- metadata.gz: eb6088d05f0bc0718ee9782247426eeaeef9c7dc18c348e58e54c773da4894d8c3d31835a37014599bb018a17df4ddf2ce234208890e5e22b42a299140b0b2c4
7
- data.tar.gz: f060d28c108e25fcf2dec6cab6e05d21c48b9fd8882190c4629fdcfbfc261014dfa68165b98d43329d0b66d1084ed34e1025093363bb0f30c2fdce7e93df9025
6
+ metadata.gz: 37ba75f3252e4a8c61bd26cef97d1bf0663133c1c037b216c65c2e6670f46700163ef5d19ca3d2dd5d2beb01c61d7496e10fe383c18cba67eb100c33ec486a09
7
+ data.tar.gz: 328f1386ec44208f0478a52b266d99a2a0da28b6cbd8b6a4b68fff739e264479ab7d677c42451b08a1247b393775ebfca4de5903372d75a141439ba2f0d75fce
@@ -3,11 +3,16 @@ module Greenhouse
3
3
  include Scripts::Script
4
4
 
5
5
  valid_argument Scripts::Argument.new("-v, --verbose", :valid => [], :summary => "Output additional information from command executions to STDOUT")
6
+ valid_argument Scripts::Argument.new("-d, --debug", :valid => [], :summary => "Output full backtraces for exceptions and errors")
6
7
 
7
8
  def self.verbose?
8
9
  user_arguments.map(&:key).include?("-v")
9
10
  end
10
11
 
12
+ def self.debug?
13
+ user_arguments.map(&:key).include?("-d")
14
+ end
15
+
11
16
  def self.exec(cmd)
12
17
  if verbose?
13
18
  system cmd
@@ -34,6 +34,7 @@ module Greenhouse
34
34
  after_hooks.each { |block| @command.instance_eval(&block) }
35
35
  rescue Exception => e
36
36
  puts e.message
37
+ puts e.backtrace if ::Greenhouse::CLI.debug?
37
38
  @command.usage if e.is_a?(Scripts::InvalidArgument)
38
39
  return
39
40
  end
@@ -49,6 +49,7 @@ module Greenhouse
49
49
  def write
50
50
  open("w") do |f|
51
51
  @config.each do |key,val|
52
+ next if val.nil? || val.empty?
52
53
  f.write("#{key}=#{val}\n")
53
54
  end
54
55
  end
@@ -1,8 +1,12 @@
1
1
  module Greenhouse
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
4
4
 
5
5
  __END__
6
+ 0.0.10:
7
+ * Adding a -d/--debug flag to output full backtraces
8
+ * Not writing empty .env vars
9
+
6
10
  0.0.9:
7
11
  * Removing a really stupid debug raise call that got missed in the last release (need to write specs!!)
8
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenhouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec