bones 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/History.txt +5 -0
  2. data/Rakefile +2 -2
  3. data/lib/bones.rb +25 -2
  4. metadata +3 -3
@@ -1,3 +1,8 @@
1
+ == 3.1.2 / 2009-12-05
2
+
3
+ * 1 minor enhancement
4
+ - More informative error message when gems cannot be found
5
+
1
6
  == 3.1.1 / 2009-12-03
2
7
 
3
8
  * 1 bug fix
data/Rakefile CHANGED
@@ -24,8 +24,8 @@ Bones {
24
24
  --------------------------
25
25
  MSG
26
26
 
27
- ann.paragraphs = %w[install synopsis features]
28
- ann.text = gem.extras[:post_install_message]
27
+ ann.paragraphs %w[install synopsis features]
28
+ ann.text gem.extras[:post_install_message]
29
29
 
30
30
  use_gmail
31
31
  enable_sudo
@@ -13,7 +13,7 @@ module Bones
13
13
  extend LittlePlugger
14
14
 
15
15
  # :stopdoc:
16
- VERSION = '3.1.1'
16
+ VERSION = '3.1.2'
17
17
  PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
18
18
  LIBPATH = File.expand_path(File.join(PATH, 'lib'))
19
19
  HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
@@ -95,7 +95,30 @@ module Kernel
95
95
  ps = plugin.const_get :Syntax rescue next
96
96
  extend_method.call ps
97
97
  }
98
- instance_eval_method.call(&block)
98
+
99
+ begin
100
+ instance_eval_method.call(&block)
101
+ rescue NoMethodError => err
102
+ raise unless err.backtrace
103
+
104
+ _, fn, line_number = %r/^([^:]+):(\d+)/.match(err.backtrace.first).to_a
105
+ raise unless fn =~ %r/Rakefile$/
106
+
107
+ line = File.readlines(fn)[line_number.to_i-1]
108
+ STDERR.puts <<-__
109
+ There is an error on line #{line_number} of your Rakefile:
110
+
111
+ #{err.message}
112
+ [#{line_number}] #{line.chomp}
113
+
114
+ Please ensure required gems are installed, otherwise Mr Bones will
115
+ not generate default configuration settings and values. This can lead
116
+ to undefined method errors on nil values.
117
+ __
118
+ exit 42
119
+ rescue StandardError
120
+ abort
121
+ end
99
122
 
100
123
  # config.exclude << "^#{Regexp.escape(config.rcov.dir)}/"
101
124
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bones
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-03 00:00:00 -07:00
12
+ date: 2009-12-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 3.1.1
83
+ version: 3.1.2
84
84
  version:
85
85
  description: |-
86
86
  Mr Bones is a handy tool that creates new Ruby projects from a code