rake_exception_hook 3.14
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 +7 -0
- data/lib/rake_exception_hook.rb +60 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e492a92b512841a2172c2f5c6cbf2d13f62cf467
|
4
|
+
data.tar.gz: 4aa75956672a86768807924361079ec753eb5cda
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0c7f823668c221793c16fc05ba9e1c9af5c3f374c3b5ef5221fd2e34f379b3e302dfb19c773c11b95e3dc0923609a33d160a0f9a94df743ff549f2ff1f4c4025
|
7
|
+
data.tar.gz: 1bcc093616d20bdc1bdbc344a98e5c57251977ebe5dd24b51545a759bcd411cad7ba86150d124d47e7ff7d2b1b400b567a789d2fc8a915135dcd9b9355e56537
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module RakeExceptionHook
|
2
|
+
VERSION = "3.14"
|
3
|
+
@@start_hook = nil
|
4
|
+
@@finish_hook = nil
|
5
|
+
@@except_hook = nil
|
6
|
+
|
7
|
+
def self.start &block
|
8
|
+
@@start_block = block
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.finish &block
|
12
|
+
@@finish_block = block
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.except &block
|
16
|
+
@@except_block = block
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.start_hook
|
20
|
+
@@start_block
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.finish_hook
|
24
|
+
@@finish_block
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.except_hook
|
28
|
+
@@except_block
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
module Rake
|
34
|
+
class Application
|
35
|
+
def top_level
|
36
|
+
run_with_threads do
|
37
|
+
if options.show_tasks
|
38
|
+
display_tasks_and_comments
|
39
|
+
elsif options.show_prereqs
|
40
|
+
display_prerequisites
|
41
|
+
else
|
42
|
+
if RakeExceptionHook.start_hook
|
43
|
+
RakeExceptionHook.start_hook.call
|
44
|
+
end
|
45
|
+
top_level_tasks.each { |task_name| invoke_task(task_name) }
|
46
|
+
if RakeExceptionHook.finish_hook
|
47
|
+
RakeExceptionHook.finish_hook.call
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
alias_method :old_display_error_message, :display_error_message
|
53
|
+
def display_error_message(ex)
|
54
|
+
if RakeExceptionHook.except_hook
|
55
|
+
RakeExceptionHook.except_hook.call ex
|
56
|
+
end
|
57
|
+
old_display_error_message ex
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rake_exception_hook
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '3.14'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chenkovsky.chen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-21 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: rake exception start end hook
|
14
|
+
email: chenkov@yeah.net
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/rake_exception_hook.rb
|
20
|
+
homepage: https://github.com/chenkovsky/rake_exception_hook
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.5.1
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: rake exception start end hook
|
44
|
+
test_files: []
|
45
|
+
has_rdoc:
|