gordon 0.0.15 → 0.0.16

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: 77d003b8301e3fdf10dc46f8c3478d5f8f5be391
4
- data.tar.gz: 82eb02e41d6f36a1307abbe12c06ff2c1fd9664b
3
+ metadata.gz: 7fd96ba18bed624cc7d5d28d282c33fb16a1bc1a
4
+ data.tar.gz: dea16e96a56887b85e6b50104b3b84151394620c
5
5
  SHA512:
6
- metadata.gz: 8b126c87ef02e08e4d812d61d56d62e710ceed461a7907080096083f135240d38c4ef11f71d7f46532fe0886e1b5e2de778b5aefc2938a5f88b087bb977dbabd
7
- data.tar.gz: d60e21e5a6933bc1b4a4dda5f4d4b4a1a42f308d013b90fb0b051c19394c2e338d1a14fbd3f4e9ccc16adccb469ef1ef44db8c106af5953723f077a0f65649de
6
+ metadata.gz: 458188db5ac52c3f5550db6f98d14ec1e3c79cc4d3479ee5112064bb46b5f9e792c0c072869e0939cca2113a05b1468e1cc1c471667a1fa60ffc7dff29383f58
7
+ data.tar.gz: a689b7b0523ea330e5b845f27c2db5dd8c850b4cb960e993fbdef7fd0e9f12c67373c00fd57cbb8e416a4f2b007de5bc2221044b36bddb021760f5f2f3ddfb7b
data/lib/gordon/cli.rb CHANGED
@@ -75,6 +75,10 @@ module Gordon
75
75
  options.debug = debug
76
76
  end
77
77
 
78
+ opts.on('-t', '--trace', 'Trace Mode') do |trace|
79
+ options.trace = trace
80
+ end
81
+
78
82
  opts.on('-h', '--help', 'Displays Help') do
79
83
  puts opts
80
84
  exit
data/lib/gordon/cooker.rb CHANGED
@@ -56,17 +56,24 @@ module Gordon
56
56
  command = "#{env_vars.join " "} #{FPM_COOKERY_COMMAND} #{cook_args.join " "}"
57
57
 
58
58
  debug(command) if options.debug
59
+ trace(command) if options.trace
59
60
 
60
61
  Process.run(command)
61
62
  end
62
63
 
63
64
  def debug(command)
64
- STDOUT.puts '*' * 80
65
- STDOUT.puts ''
66
- STDOUT.puts 'Gordon will run the following command:'
67
65
  STDOUT.puts ''
68
66
  STDOUT.puts command
69
67
  STDOUT.puts ''
68
+ end
69
+
70
+ def trace(command)
71
+ STDOUT.puts '*' * 80
72
+ STDOUT.puts ''
73
+ STDOUT.puts 'Gordon will run the following command:'
74
+
75
+ debug(command)
76
+
70
77
  STDOUT.puts 'With these environment variables:'
71
78
  STDOUT.puts ''
72
79
  STDOUT.puts ENV.sort.map { |k, v| "#{k} = #{v}" }.join "\n"
@@ -8,6 +8,6 @@ module Gordon
8
8
  attr_accessor :init_type
9
9
  attr_accessor :package_type
10
10
  attr_accessor :output_dir
11
- attr_accessor :debug
11
+ attr_accessor :debug, :trace
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Gordon
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -38,6 +38,7 @@ describe Gordon::CLI do
38
38
  [ %w(-P --package-type), "rpm" ],
39
39
  [ %w(-O --output-dir), "pkg" ],
40
40
  [ %w(-d --debug), true ],
41
+ [ %w(-t --trace), true ],
41
42
  ]
42
43
  end
43
44
 
@@ -17,6 +17,7 @@ describe Gordon::Cooker do
17
17
  package_type: "rpm",
18
18
  output_dir: "pkg",
19
19
  debug: true,
20
+ trace: true,
20
21
  }
21
22
 
22
23
  instance_double(Gordon::Options, attrs)
@@ -33,7 +34,7 @@ describe Gordon::Cooker do
33
34
  subject { described_class.new(recipe) }
34
35
 
35
36
  before :each do
36
- expect(subject).to receive(:debug)
37
+ expect(subject).to receive(:debug).at_least(2).times
37
38
  end
38
39
 
39
40
  describe 'cooking a package' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gordon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Pinheiro