teapot 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cab59314fe9ef8f78a0342da3cea677294caa817
4
- data.tar.gz: e090a7424c81f028f0a0cff3c00e2df46f4954a2
3
+ metadata.gz: 95704463becbd754a4675c065b8356d434318711
4
+ data.tar.gz: 143691ea31e27c14477ed2c9186491c192770d2b
5
5
  SHA512:
6
- metadata.gz: d9ed28c25903c8022883c51615f8149eefa6991656c50227925a7dada50a7d6018cefb19dbc1845942f7607ed7c2e148303553e780fc2299c3ef75cc990a3527
7
- data.tar.gz: 4b360e8e17eba0528656203aa386cfa909dd51ae8c8d5a0862034331646128776c31be316e1aa181e881351f07a74ca130f25bf9fb99082fd280ed60fa634beb
6
+ metadata.gz: 916ab1935e2807fe66590fbecaa66adfb0298051d8c7024b43621b9f6fdab0ad5e3adcee2ba9ee765ceb9970b7ec03020058a00b148f66d4917b3c6688ec4965
7
+ data.tar.gz: de110634be9ebb0413a83ac7a50817894d1f6fc8c2cc86038e58d36acea5ee7b212d798d33c63bfa50bafb36013cf421b3b192fab8fb96885975e2e3ee32241d
data/bin/teapot CHANGED
@@ -43,6 +43,8 @@ OPTIONS = Trollop::options do
43
43
  opt :force, "Force the operation if it would otherwise be be stopped due to a warning."
44
44
 
45
45
  opt :configuration, "Specify a specific build configuration.", :type => :string
46
+
47
+ opt :verbose, "Verbose output and error backtraces."
46
48
  end
47
49
 
48
50
  def make_controller(root = nil)
@@ -124,19 +126,11 @@ end
124
126
  track_time do
125
127
  begin
126
128
  Application.send(action.to_sym)
127
- rescue Teapot::NonexistantTeapotError => error
128
- $stderr.puts error.message.color(:red)
129
-
130
- exit -2
131
129
  rescue Teapot::IncompatibleTeapotError => error
132
130
  $stderr.puts error.message.color(:red)
133
131
  $stderr.puts "Supported minimum version #{Teapot::MINIMUM_LOADER_VERSION.dump} to #{Teapot::LOADER_VERSION.dump}."
134
132
 
135
133
  exit -3
136
- rescue Teapot::Commands::CommandError => error
137
- $stderr.puts error.message.color(:red)
138
-
139
- exit -4
140
134
  rescue Teapot::Dependency::UnresolvedDependencyError => error
141
135
  $stderr.puts "Unresolved dependencies:"
142
136
 
@@ -155,5 +149,16 @@ track_time do
155
149
  $stderr.puts "Cannot continue due to unresolved dependencies!".color(:red)
156
150
 
157
151
  exit -5
152
+ rescue StandardError => error
153
+ $stderr.puts error.message.color(:red)
154
+
155
+ # Could be nice to have some improved error reporting.
156
+ if OPTIONS[:verbose]
157
+ $stderr.puts error.backtrace
158
+ else
159
+ $stderr.puts "Run with --verbose for more details."
160
+ end
161
+
162
+ exit -10
158
163
  end
159
164
  end
@@ -26,6 +26,13 @@ require 'tempfile'
26
26
 
27
27
  module Teapot
28
28
  class GeneratorError < StandardError
29
+ def initialize(message, generator = nil)
30
+ super(message)
31
+
32
+ @generator = generator
33
+ end
34
+
35
+ attr :generator
29
36
  end
30
37
 
31
38
  class Generator < Definition
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Teapot
22
- VERSION = "0.9.4"
22
+ VERSION = "0.9.5"
23
23
  end
data/teapot.gemspec CHANGED
@@ -3,31 +3,32 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'teapot/version'
5
5
 
6
- Gem::Specification.new do |gem|
7
- gem.name = "teapot"
8
- gem.version = Teapot::VERSION
9
- gem.authors = ["Samuel Williams"]
10
- gem.email = ["samuel.williams@oriontransfer.co.nz"]
11
- gem.description = <<-EOF
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "teapot"
8
+ spec.version = Teapot::VERSION
9
+ spec.authors = ["Samuel Williams"]
10
+ spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
+ spec.description = <<-EOF
12
12
  Teapot is a tool for managing complex cross-platform builds. It provides
13
13
  advanced dependency management via the Teapot file and is supported by
14
14
  the infusions ecosystem of packages and platform tooling.
15
15
  EOF
16
- gem.summary = %q{Teapot is a tool for managing complex cross-platform builds.}
17
- gem.homepage = "http://www.kyusu.org"
16
+ spec.summary = %q{Teapot is a tool for managing complex cross-platform builds.}
17
+ spec.homepage = "http://www.kyusu.org"
18
+ spec.license = "MIT"
18
19
 
19
- gem.files = `git ls-files`.split($/)
20
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
21
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
22
- gem.require_paths = ["lib"]
20
+ spec.files = `git ls-files`.split($/)
21
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
22
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+ spec.require_paths = ["lib"]
23
24
 
24
- gem.required_ruby_version = '>= 1.9.3'
25
+ spec.required_ruby_version = '>= 1.9.3'
25
26
 
26
- gem.add_dependency "rainbow"
27
- gem.add_dependency "rexec"
28
- gem.add_dependency "trollop"
29
- gem.add_dependency "facter"
27
+ spec.add_dependency "rainbow"
28
+ spec.add_dependency "rexec"
29
+ spec.add_dependency "trollop"
30
+ spec.add_dependency "facter"
30
31
 
31
32
  # This could be a good option in the future for teapot fetch:
32
- #gem.add_dependency "rugged"
33
+ #spec.add_dependency "rugged"
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teapot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -135,7 +135,8 @@ files:
135
135
  - test/test_substitutions.rb
136
136
  - test/test_teapot.rb
137
137
  homepage: http://www.kyusu.org
138
- licenses: []
138
+ licenses:
139
+ - MIT
139
140
  metadata: {}
140
141
  post_install_message:
141
142
  rdoc_options: []