hierarchical_config 0.11 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/release.yml +41 -0
- data/.github/workflows/ruby.yml +55 -0
- data/.gitignore +2 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +68 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +15 -2
- data/Gemfile.2.4 +19 -0
- data/Gemfile.2.4.lock +117 -0
- data/Gemfile.lock +126 -25
- data/README.md +0 -2
- data/bin/console +3 -3
- data/bin/tapioca +29 -0
- data/hierarchical_config.gemspec +14 -13
- data/lib/hierarchical_config/version.rb +3 -1
- data/lib/hierarchical_config.rb +195 -98
- data/release-please-config.json +14 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/annotations/activesupport.rbi +128 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.2.rbi +16155 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/binding_of_caller@1.0.0.rbi +55 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/debug_inspector@1.1.0.rbi +23 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/interception@0.5.rbi +138 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +1457 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.2.1.0.rbi +7252 -0
- data/sorbet/rbi/gems/pry-rescue@1.5.2.rbi +186 -0
- data/sorbet/rbi/gems/pry-stack_explorer@0.6.1.rbi +295 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3018 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +3580 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
- data/sorbet/rbi/gems/rspec-core@3.12.1.rbi +10845 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +8100 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +5299 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1611 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
- data/sorbet/rbi/gems/rubocop-ast@1.27.0.rbi +6998 -0
- data/sorbet/rbi/gems/rubocop-performance@1.16.0.rbi +3004 -0
- data/sorbet/rbi/gems/rubocop@1.46.0.rbi +54549 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1239 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
- data/sorbet/rbi/gems/tapioca@0.11.1.rbi +3255 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17841 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +75 -47
- data/.travis.yml +0 -6
@@ -0,0 +1,138 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `interception` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem interception`.
|
6
|
+
|
7
|
+
# Provides global facility for monitoring exceptions raised in your application.
|
8
|
+
#
|
9
|
+
# source://interception//lib/interception.rb#5
|
10
|
+
module Interception
|
11
|
+
class << self
|
12
|
+
# Listen for any exceptions raised.
|
13
|
+
#
|
14
|
+
# The listener block that you pass in will be executed as though inside Kernel#raise,
|
15
|
+
# so your entire program is still actively running. If you have a gem like
|
16
|
+
# pry-stack_explorer you can access the stack frames that lead to the exception
|
17
|
+
# occurring.
|
18
|
+
#
|
19
|
+
# NOTE: Be careful when writing a listener, if your listener raises an
|
20
|
+
# exception it will mask the original exception (though it will not recursively
|
21
|
+
# call your listener).
|
22
|
+
#
|
23
|
+
# @example
|
24
|
+
#
|
25
|
+
# # To log exceptions for the duration of a given block.
|
26
|
+
# def log_exceptions(&block)
|
27
|
+
# Interception.listen(block) do |exception, binding|
|
28
|
+
# puts "#{binding.eval("self.inspect")} raised #{exception.inspect}"
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
# @example
|
32
|
+
#
|
33
|
+
# # To report exceptions for the entire run of the program:
|
34
|
+
# Interception.listen do |exception, binding|
|
35
|
+
# Emailer.spam!('on-duty@startup.com', exception, binding.eval('self.class.name'))
|
36
|
+
# end
|
37
|
+
# @example
|
38
|
+
#
|
39
|
+
# # You can also turn listeners on and off manually
|
40
|
+
#
|
41
|
+
# listener = Proc.new{ |exception, binding|
|
42
|
+
# binding.pry
|
43
|
+
# }
|
44
|
+
# Interception.listen(listener)
|
45
|
+
# Async::Redis.get("foo") do
|
46
|
+
# Interception.unlisten(listener)
|
47
|
+
# end
|
48
|
+
# @param listen_block [Proc] The block to call when an exception occurs,
|
49
|
+
# takes two arguments, the exception and the
|
50
|
+
# binding
|
51
|
+
# @param for_block [Proc] (nil) If you pass for_block in, then you will only
|
52
|
+
# intercept exceptions raised while that block
|
53
|
+
# is running.
|
54
|
+
# @raise [ArgumentError]
|
55
|
+
# @return [Object] The return value of the for_block (if present)
|
56
|
+
# @see .unlisten
|
57
|
+
# @yield [exception, binding]
|
58
|
+
#
|
59
|
+
# source://interception//lib/interception.rb#62
|
60
|
+
def listen(for_block = T.unsafe(nil), &listen_block); end
|
61
|
+
|
62
|
+
# Returns the value of attribute listeners.
|
63
|
+
#
|
64
|
+
# source://interception//lib/interception.rb#8
|
65
|
+
def listeners; end
|
66
|
+
|
67
|
+
# Sets the attribute listeners
|
68
|
+
#
|
69
|
+
# @param value the value to set the attribute listeners to.
|
70
|
+
#
|
71
|
+
# source://interception//lib/interception.rb#8
|
72
|
+
def listeners=(_arg0); end
|
73
|
+
|
74
|
+
# Returns the value of attribute mutex.
|
75
|
+
#
|
76
|
+
# source://interception//lib/interception.rb#8
|
77
|
+
def mutex; end
|
78
|
+
|
79
|
+
# Sets the attribute mutex
|
80
|
+
#
|
81
|
+
# @param value the value to set the attribute mutex to.
|
82
|
+
#
|
83
|
+
# source://interception//lib/interception.rb#8
|
84
|
+
def mutex=(_arg0); end
|
85
|
+
|
86
|
+
# Called by platform-specific implementations whenever an exception is raised.
|
87
|
+
#
|
88
|
+
# The arguments will be forwarded on to all listeners added via {listen} that
|
89
|
+
# haven't been removed via {unlisten}.
|
90
|
+
#
|
91
|
+
# For efficiency, this block will never be called unless there are active
|
92
|
+
# listeners.
|
93
|
+
#
|
94
|
+
# @param exception [Exception] The exception that was raised
|
95
|
+
# @param binding [Binding] The binding from which it was raised
|
96
|
+
#
|
97
|
+
# source://interception//lib/interception.rb#101
|
98
|
+
def rescue(exception, binding); end
|
99
|
+
|
100
|
+
# Returns the value of attribute rescueing.
|
101
|
+
#
|
102
|
+
# source://interception//lib/interception.rb#8
|
103
|
+
def rescueing; end
|
104
|
+
|
105
|
+
# Sets the attribute rescueing
|
106
|
+
#
|
107
|
+
# @param value the value to set the attribute rescueing to.
|
108
|
+
#
|
109
|
+
# source://interception//lib/interception.rb#8
|
110
|
+
def rescueing=(_arg0); end
|
111
|
+
|
112
|
+
# Disable a previously added listener
|
113
|
+
#
|
114
|
+
# @param listen_block [Proc] The listen block you wish to remove.
|
115
|
+
# @see .listen
|
116
|
+
#
|
117
|
+
# source://interception//lib/interception.rb#84
|
118
|
+
def unlisten(listen_block); end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
# Start sending events to rescue.
|
123
|
+
# Implemented per-platform
|
124
|
+
#
|
125
|
+
# @raise [NotImplementedError]
|
126
|
+
#
|
127
|
+
# source://interception//lib/cross_platform.rb#66
|
128
|
+
def start; end
|
129
|
+
|
130
|
+
# Stop sending events to rescue.
|
131
|
+
# Implemented per-platform
|
132
|
+
#
|
133
|
+
# @raise [NotImplementedError]
|
134
|
+
#
|
135
|
+
# source://interception//lib/cross_platform.rb#74
|
136
|
+
def stop; end
|
137
|
+
end
|
138
|
+
end
|