m2m_keygen 0.4.9 → 0.5.0
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 +4 -4
- data/.overcommit.yml +4 -7
- data/.rubocop.yml +19 -16
- data/.ruby-version +1 -1
- data/.streerc +1 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +60 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +135 -158
- data/README.md +64 -78
- data/docs/MIGRATING.md +69 -0
- data/docs/SPEC.md +245 -0
- data/examples/nonce_store/postgres.rb +40 -0
- data/examples/nonce_store/redis.rb +23 -0
- data/gemfiles/rack_2.gemfile +5 -0
- data/gemfiles/rack_3.gemfile +5 -0
- data/lib/m2m_keygen/canonicalizer.rb +57 -0
- data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
- data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
- data/lib/m2m_keygen/nonce_store.rb +18 -0
- data/lib/m2m_keygen/rack_validator.rb +72 -19
- data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
- data/lib/m2m_keygen/request_signer.rb +118 -0
- data/lib/m2m_keygen/signature.rb +41 -39
- data/lib/m2m_keygen/types/params_type.rb +6 -17
- data/lib/m2m_keygen/version.rb +1 -1
- data/lib/m2m_keygen.rb +6 -0
- data/m2m_keygen.gemspec +12 -14
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
- data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
- data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
- data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
- data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
- data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
- data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
- data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
- data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
- data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
- data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
- data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
- data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
- data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
- data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
- data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
- data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
- data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
- data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
- data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
- data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
- data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
- data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
- data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
- data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
- data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
- data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
- data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
- data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
- data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
- data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
- data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
- data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
- data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
- data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
- data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
- data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
- data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
- data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
- data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
- data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
- data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
- data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
- data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
- data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
- data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
- data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
- data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
- data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
- metadata +105 -111
- data/.prettierrc.js +0 -4
- data/docs/M2mKeygen/Error.html +0 -135
- data/docs/M2mKeygen/ParamsEncoder.html +0 -321
- data/docs/M2mKeygen/RackValidator.html +0 -533
- data/docs/M2mKeygen/Signature.html +0 -680
- data/docs/M2mKeygen/Types.html +0 -147
- data/docs/M2mKeygen.html +0 -157
- data/docs/_index.html +0 -182
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -497
- data/docs/file.README.html +0 -230
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -230
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -139
- data/docs/top-level-namespace.html +0 -110
- data/lib/m2m_keygen/params_encoder.rb +0 -56
- data/package.json +0 -12
- data/sig/m2m_keygen.rbs +0 -4
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
- data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
- data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
- data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
- data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
- data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
- data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
- data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
- data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
- data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
- data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
- data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
- data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
- data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
- data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
- data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
- data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
- data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
- data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
- data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
- data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
- data/sorbet/rbi/manual.rbi +0 -7
- data/yarn.lock +0 -20
|
@@ -4,183 +4,200 @@
|
|
|
4
4
|
# This is an autogenerated file for types exported from the `method_source` gem.
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem method_source`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
# pkg:gem/method_source#lib/method_source.rb:163
|
|
8
9
|
class Method
|
|
9
10
|
include ::MethodSource::SourceLocation::MethodExtensions
|
|
10
11
|
include ::MethodSource::MethodExtensions
|
|
11
12
|
end
|
|
12
13
|
|
|
13
|
-
#
|
|
14
|
+
# pkg:gem/method_source#lib/method_source/version.rb:1
|
|
14
15
|
module MethodSource
|
|
15
16
|
extend ::MethodSource::CodeHelpers
|
|
16
17
|
|
|
17
18
|
class << self
|
|
19
|
+
# Clear cache.
|
|
20
|
+
#
|
|
21
|
+
# pkg:gem/method_source#lib/method_source.rb:59
|
|
22
|
+
def clear_cache; end
|
|
23
|
+
|
|
18
24
|
# Helper method responsible for opening source file and buffering up
|
|
19
25
|
# the comments for a specified method. Defined here to avoid polluting
|
|
20
26
|
# `Method` class.
|
|
21
|
-
#
|
|
22
|
-
# @param
|
|
23
|
-
# @param method_name [String]
|
|
24
|
-
# @raise [SourceNotFoundError]
|
|
27
|
+
# @param [Array] source_location The array returned by Method#source_location
|
|
28
|
+
# @param [String] method_name
|
|
25
29
|
# @return [String] The comments up to the point of the method.
|
|
26
30
|
#
|
|
27
|
-
#
|
|
31
|
+
# pkg:gem/method_source#lib/method_source.rb:38
|
|
28
32
|
def comment_helper(source_location, name = T.unsafe(nil)); end
|
|
29
33
|
|
|
30
34
|
# @deprecated — use MethodSource::CodeHelpers#expression_at
|
|
31
35
|
#
|
|
32
|
-
#
|
|
36
|
+
# pkg:gem/method_source#lib/method_source.rb:71
|
|
33
37
|
def extract_code(source_location); end
|
|
34
38
|
|
|
35
39
|
# Load a memoized copy of the lines in a file.
|
|
36
40
|
#
|
|
37
|
-
# @param
|
|
38
|
-
# @param
|
|
41
|
+
# @param [String] file_name
|
|
42
|
+
# @param [String] method_name
|
|
43
|
+
# @return [Array<String>] the contents of the file
|
|
39
44
|
# @raise [SourceNotFoundError]
|
|
40
|
-
# @return [Array<String>] the contents of the file
|
|
41
45
|
#
|
|
42
|
-
#
|
|
46
|
+
# pkg:gem/method_source#lib/method_source.rb:51
|
|
43
47
|
def lines_for(file_name, name = T.unsafe(nil)); end
|
|
44
48
|
|
|
45
49
|
# Helper method responsible for extracting method body.
|
|
46
50
|
# Defined here to avoid polluting `Method` class.
|
|
47
|
-
#
|
|
48
|
-
# @param
|
|
49
|
-
# @param method_name [String]
|
|
51
|
+
# @param [Array] source_location The array returned by Method#source_location
|
|
52
|
+
# @param [String] method_name
|
|
50
53
|
# @return [String] The method body
|
|
51
54
|
#
|
|
52
|
-
#
|
|
55
|
+
# pkg:gem/method_source#lib/method_source.rb:23
|
|
53
56
|
def source_helper(source_location, name = T.unsafe(nil)); end
|
|
54
57
|
|
|
55
58
|
# @deprecated — use MethodSource::CodeHelpers#complete_expression?
|
|
56
|
-
# @return [Boolean]
|
|
57
59
|
#
|
|
58
|
-
#
|
|
60
|
+
# pkg:gem/method_source#lib/method_source.rb:64
|
|
59
61
|
def valid_expression?(str); end
|
|
60
62
|
end
|
|
61
63
|
end
|
|
62
64
|
|
|
63
|
-
#
|
|
65
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:3
|
|
64
66
|
module MethodSource::CodeHelpers
|
|
65
67
|
# Retrieve the comment describing the expression on the given line of the given file.
|
|
66
68
|
#
|
|
67
69
|
# This is useful to get module or method documentation.
|
|
68
70
|
#
|
|
69
|
-
# @param
|
|
70
|
-
#
|
|
71
|
-
# @param
|
|
72
|
-
#
|
|
73
|
-
# @return [String]
|
|
71
|
+
# @param [Array<String>, File, String] file The file to parse, either as a File or as
|
|
72
|
+
# a String or an Array of lines.
|
|
73
|
+
# @param [Integer] line_number The line number at which to look.
|
|
74
|
+
# NOTE: The first line in a file is line 1!
|
|
75
|
+
# @return [String] The comment
|
|
74
76
|
#
|
|
75
|
-
#
|
|
77
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:52
|
|
76
78
|
def comment_describing(file, line_number); end
|
|
77
79
|
|
|
78
80
|
# Determine if a string of code is a complete Ruby expression.
|
|
79
|
-
#
|
|
81
|
+
# @param [String] code The code to validate.
|
|
82
|
+
# @return [Boolean] Whether or not the code is a complete Ruby expression.
|
|
83
|
+
# @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
|
|
80
84
|
# @example
|
|
81
85
|
# complete_expression?("class Hello") #=> false
|
|
82
86
|
# complete_expression?("class Hello; end") #=> true
|
|
83
87
|
# complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER
|
|
84
|
-
# @param code [String] The code to validate.
|
|
85
|
-
# @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
|
|
86
|
-
# @return [Boolean] Whether or not the code is a complete Ruby expression.
|
|
87
88
|
#
|
|
88
|
-
#
|
|
89
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:66
|
|
89
90
|
def complete_expression?(str); end
|
|
90
91
|
|
|
91
92
|
# Retrieve the first expression starting on the given line of the given file.
|
|
92
93
|
#
|
|
93
94
|
# This is useful to get module or method source code.
|
|
94
95
|
#
|
|
96
|
+
# @param [Array<String>, File, String] file The file to parse, either as a File or as
|
|
97
|
+
# @param [Integer] line_number The line number at which to look.
|
|
98
|
+
# NOTE: The first line in a file is
|
|
95
99
|
# line 1!
|
|
100
|
+
# @param [Hash] options The optional configuration parameters.
|
|
101
|
+
# @option options [Boolean] :strict If set to true, then only completely
|
|
102
|
+
# valid expressions are returned. Otherwise heuristics are used to extract
|
|
103
|
+
# expressions that may have been valid inside an eval.
|
|
104
|
+
# @option options [Integer] :consume A number of lines to automatically
|
|
105
|
+
# consume (add to the expression buffer) without checking for validity.
|
|
106
|
+
# @return [String] The first complete expression
|
|
107
|
+
# @raise [SyntaxError] If the first complete expression can't be identified
|
|
96
108
|
#
|
|
97
|
-
#
|
|
98
|
-
# @option options
|
|
99
|
-
# @param file [Array<String>, File, String] The file to parse, either as a File or as
|
|
100
|
-
# @param line_number [Integer] The line number at which to look.
|
|
101
|
-
# NOTE: The first line in a file is
|
|
102
|
-
# @param options [Hash] The optional configuration parameters.
|
|
103
|
-
# @raise [SyntaxError] If the first complete expression can't be identified
|
|
104
|
-
# @return [String] The first complete expression
|
|
105
|
-
#
|
|
106
|
-
# source://method_source-1.0.0/lib/method_source/code_helpers.rb:20
|
|
109
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:20
|
|
107
110
|
def expression_at(file, line_number, options = T.unsafe(nil)); end
|
|
108
111
|
|
|
109
112
|
private
|
|
110
113
|
|
|
111
114
|
# Get the first expression from the input.
|
|
112
115
|
#
|
|
113
|
-
# @param
|
|
114
|
-
# @param
|
|
116
|
+
# @param [Array<String>] lines
|
|
117
|
+
# @param [Integer] consume A number of lines to automatically
|
|
115
118
|
# consume (add to the expression buffer) without checking for validity.
|
|
116
|
-
# @raise [SyntaxError]
|
|
117
|
-
# @return [String] a valid ruby expression
|
|
118
119
|
# @yield a clean-up function to run before checking for complete_expression
|
|
120
|
+
# @return [String] a valid ruby expression
|
|
121
|
+
# @raise [SyntaxError]
|
|
119
122
|
#
|
|
120
|
-
#
|
|
123
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:92
|
|
121
124
|
def extract_first_expression(lines, consume = T.unsafe(nil), &block); end
|
|
122
125
|
|
|
123
126
|
# Get the last comment from the input.
|
|
124
127
|
#
|
|
125
|
-
# @param
|
|
128
|
+
# @param [Array<String>] lines
|
|
126
129
|
# @return [String]
|
|
127
130
|
#
|
|
128
|
-
#
|
|
131
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:106
|
|
129
132
|
def extract_last_comment(lines); end
|
|
130
133
|
end
|
|
131
134
|
|
|
132
135
|
# An exception matcher that matches only subsets of SyntaxErrors that can be
|
|
133
136
|
# fixed by adding more input to the buffer.
|
|
134
137
|
#
|
|
135
|
-
#
|
|
138
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:124
|
|
136
139
|
module MethodSource::CodeHelpers::IncompleteExpression
|
|
137
140
|
class << self
|
|
138
|
-
#
|
|
141
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:137
|
|
139
142
|
def ===(ex); end
|
|
140
143
|
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
# source://method_source-1.0.0/lib/method_source/code_helpers.rb:149
|
|
144
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:149
|
|
144
145
|
def rbx?; end
|
|
145
146
|
end
|
|
146
147
|
end
|
|
147
148
|
|
|
148
|
-
#
|
|
149
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:125
|
|
149
150
|
MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array)
|
|
150
151
|
|
|
151
|
-
#
|
|
152
|
+
# pkg:gem/method_source#lib/method_source/code_helpers.rb:133
|
|
152
153
|
MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array)
|
|
153
154
|
|
|
154
155
|
# This module is to be included by `Method` and `UnboundMethod` and
|
|
155
156
|
# provides the `#source` functionality
|
|
156
157
|
#
|
|
157
|
-
#
|
|
158
|
+
# pkg:gem/method_source#lib/method_source.rb:77
|
|
158
159
|
module MethodSource::MethodExtensions
|
|
159
|
-
# Return the comments associated with the method
|
|
160
|
+
# Return the comments associated with the method class/module.
|
|
161
|
+
# @return [String] The method's comments as a string
|
|
162
|
+
# @raise SourceNotFoundException
|
|
160
163
|
#
|
|
161
164
|
# @example
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
165
|
+
# MethodSource::MethodExtensions.method(:included).module_comment
|
|
166
|
+
# =>
|
|
167
|
+
# # This module is to be included by `Method` and `UnboundMethod` and
|
|
168
|
+
# # provides the `#source` functionality
|
|
169
|
+
#
|
|
170
|
+
# pkg:gem/method_source#lib/method_source.rb:139
|
|
171
|
+
def class_comment; end
|
|
172
|
+
|
|
173
|
+
# Return the comments associated with the method as a string.
|
|
166
174
|
# @return [String] The method's comments as a string
|
|
175
|
+
# @raise SourceNotFoundException
|
|
167
176
|
#
|
|
168
|
-
#
|
|
177
|
+
# @example
|
|
178
|
+
# Set.instance_method(:clear).comment.display
|
|
179
|
+
# =>
|
|
180
|
+
# # Removes all elements and returns self.
|
|
181
|
+
#
|
|
182
|
+
# pkg:gem/method_source#lib/method_source.rb:126
|
|
169
183
|
def comment; end
|
|
170
184
|
|
|
185
|
+
# pkg:gem/method_source#lib/method_source.rb:159
|
|
186
|
+
def module_comment; end
|
|
187
|
+
|
|
171
188
|
# Return the sourcecode for the method as a string
|
|
189
|
+
# @return [String] The method sourcecode as a string
|
|
190
|
+
# @raise SourceNotFoundException
|
|
172
191
|
#
|
|
173
192
|
# @example
|
|
174
|
-
#
|
|
175
|
-
#
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
# @raise SourceNotFoundException
|
|
181
|
-
# @return [String] The method sourcecode as a string
|
|
193
|
+
# Set.instance_method(:clear).source.display
|
|
194
|
+
# =>
|
|
195
|
+
# def clear
|
|
196
|
+
# @hash.clear
|
|
197
|
+
# self
|
|
198
|
+
# end
|
|
182
199
|
#
|
|
183
|
-
#
|
|
200
|
+
# pkg:gem/method_source#lib/method_source.rb:114
|
|
184
201
|
def source; end
|
|
185
202
|
|
|
186
203
|
class << self
|
|
@@ -188,84 +205,88 @@ module MethodSource::MethodExtensions
|
|
|
188
205
|
# We need to use the included hook as Rubinius defines a `source`
|
|
189
206
|
# on Method so including a module will have no effect (as it's
|
|
190
207
|
# higher up the MRO).
|
|
208
|
+
# @param [Class] klass The class that includes the module.
|
|
191
209
|
#
|
|
192
|
-
#
|
|
193
|
-
#
|
|
194
|
-
# source://method_source-1.0.0/lib/method_source.rb:79
|
|
210
|
+
# pkg:gem/method_source#lib/method_source.rb:84
|
|
195
211
|
def included(klass); end
|
|
196
212
|
end
|
|
197
213
|
end
|
|
198
214
|
|
|
199
|
-
#
|
|
215
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:2
|
|
200
216
|
module MethodSource::ReeSourceLocation
|
|
201
217
|
# Ruby enterprise edition provides all the information that's
|
|
202
218
|
# needed, in a slightly different way.
|
|
203
219
|
#
|
|
204
|
-
#
|
|
220
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:5
|
|
205
221
|
def source_location; end
|
|
206
222
|
end
|
|
207
223
|
|
|
208
|
-
#
|
|
224
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:10
|
|
209
225
|
module MethodSource::SourceLocation; end
|
|
210
226
|
|
|
211
|
-
#
|
|
227
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:11
|
|
212
228
|
module MethodSource::SourceLocation::MethodExtensions
|
|
229
|
+
# JRuby version source_location hack
|
|
230
|
+
# @return [Array] A two element array containing the source location of the method
|
|
213
231
|
# Return the source location of a method for Ruby 1.8.
|
|
214
|
-
#
|
|
215
232
|
# @return [Array] A two element array. First element is the
|
|
216
233
|
# file, second element is the line in the file where the
|
|
217
234
|
# method definition is found.
|
|
218
235
|
#
|
|
219
|
-
#
|
|
236
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:40
|
|
220
237
|
def source_location; end
|
|
221
238
|
|
|
222
239
|
private
|
|
223
240
|
|
|
224
|
-
#
|
|
241
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:26
|
|
225
242
|
def trace_func(event, file, line, id, binding, classname); end
|
|
226
243
|
end
|
|
227
244
|
|
|
228
|
-
#
|
|
245
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:54
|
|
229
246
|
module MethodSource::SourceLocation::ProcExtensions
|
|
247
|
+
# Return the source location for a Proc (Rubinius only)
|
|
248
|
+
# @return [Array] A two element array. First element is the
|
|
249
|
+
# file, second element is the line in the file where the
|
|
250
|
+
# proc definition is found.
|
|
230
251
|
# Return the source location for a Proc (in implementations
|
|
231
252
|
# without Proc#source_location)
|
|
232
|
-
#
|
|
233
253
|
# @return [Array] A two element array. First element is the
|
|
234
254
|
# file, second element is the line in the file where the
|
|
235
255
|
# proc definition is found.
|
|
236
256
|
#
|
|
237
|
-
#
|
|
257
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:74
|
|
238
258
|
def source_location; end
|
|
239
259
|
end
|
|
240
260
|
|
|
241
|
-
#
|
|
261
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:81
|
|
242
262
|
module MethodSource::SourceLocation::UnboundMethodExtensions
|
|
263
|
+
# JRuby version source_location hack
|
|
264
|
+
# @return [Array] A two element array containing the source location of the method
|
|
243
265
|
# Return the source location of an instance method for Ruby 1.8.
|
|
244
|
-
#
|
|
245
266
|
# @return [Array] A two element array. First element is the
|
|
246
267
|
# file, second element is the line in the file where the
|
|
247
268
|
# method definition is found.
|
|
248
269
|
#
|
|
249
|
-
#
|
|
270
|
+
# pkg:gem/method_source#lib/method_source/source_location.rb:101
|
|
250
271
|
def source_location; end
|
|
251
272
|
end
|
|
252
273
|
|
|
253
274
|
# An Exception to mark errors that were raised trying to find the source from
|
|
254
275
|
# a given source_location.
|
|
255
276
|
#
|
|
256
|
-
#
|
|
277
|
+
# pkg:gem/method_source#lib/method_source.rb:16
|
|
257
278
|
class MethodSource::SourceNotFoundError < ::StandardError; end
|
|
258
279
|
|
|
259
|
-
#
|
|
280
|
+
# pkg:gem/method_source#lib/method_source/version.rb:2
|
|
260
281
|
MethodSource::VERSION = T.let(T.unsafe(nil), String)
|
|
261
282
|
|
|
262
|
-
#
|
|
283
|
+
# pkg:gem/method_source#lib/method_source.rb:173
|
|
263
284
|
class Proc
|
|
264
285
|
include ::MethodSource::SourceLocation::ProcExtensions
|
|
265
286
|
include ::MethodSource::MethodExtensions
|
|
266
287
|
end
|
|
267
288
|
|
|
268
|
-
#
|
|
289
|
+
# pkg:gem/method_source#lib/method_source.rb:168
|
|
269
290
|
class UnboundMethod
|
|
270
291
|
include ::MethodSource::SourceLocation::UnboundMethodExtensions
|
|
271
292
|
include ::MethodSource::MethodExtensions
|