m2m_keygen 0.4.7 → 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.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/.overcommit.yml +4 -7
  3. data/.rubocop.yml +19 -16
  4. data/.ruby-version +1 -1
  5. data/.streerc +1 -0
  6. data/.tool-versions +1 -0
  7. data/CHANGELOG.md +73 -1
  8. data/Gemfile +2 -2
  9. data/Gemfile.lock +138 -160
  10. data/README.md +64 -78
  11. data/docs/MIGRATING.md +69 -0
  12. data/docs/SPEC.md +245 -0
  13. data/examples/nonce_store/postgres.rb +40 -0
  14. data/examples/nonce_store/redis.rb +23 -0
  15. data/gemfiles/rack_2.gemfile +5 -0
  16. data/gemfiles/rack_3.gemfile +5 -0
  17. data/lib/m2m_keygen/canonicalizer.rb +57 -0
  18. data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
  19. data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
  20. data/lib/m2m_keygen/nonce_store.rb +18 -0
  21. data/lib/m2m_keygen/rack_validator.rb +72 -19
  22. data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
  23. data/lib/m2m_keygen/request_signer.rb +118 -0
  24. data/lib/m2m_keygen/signature.rb +41 -39
  25. data/lib/m2m_keygen/types/params_type.rb +6 -16
  26. data/lib/m2m_keygen/version.rb +1 -1
  27. data/lib/m2m_keygen.rb +6 -0
  28. data/m2m_keygen.gemspec +12 -14
  29. data/sorbet/config +1 -0
  30. data/sorbet/rbi/gems/.gitattributes +1 -0
  31. data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
  32. data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
  33. data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
  34. data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
  35. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
  36. data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
  37. data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
  38. data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
  39. data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
  40. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  41. data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
  42. data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
  43. data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
  44. data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
  45. data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
  46. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  47. data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
  48. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  49. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
  50. data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
  51. data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
  52. data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
  53. data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
  54. data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
  55. data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
  56. data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
  57. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
  58. data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
  59. data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
  60. data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
  61. data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
  62. data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
  63. data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
  64. data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
  65. data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
  66. data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
  67. data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
  68. data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
  69. data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
  70. data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
  71. data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
  72. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
  73. data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
  74. data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
  75. data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
  76. data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
  77. data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
  78. data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
  79. data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
  80. data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
  81. data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
  82. data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
  83. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  84. data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
  85. data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
  86. data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
  87. data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
  88. data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
  89. data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
  90. data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
  91. data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
  92. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
  93. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
  94. data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
  95. data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
  96. data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
  97. metadata +106 -111
  98. data/.prettierrc.js +0 -4
  99. data/docs/M2mKeygen/Error.html +0 -135
  100. data/docs/M2mKeygen/ParamsEncoder.html +0 -321
  101. data/docs/M2mKeygen/RackValidator.html +0 -533
  102. data/docs/M2mKeygen/Signature.html +0 -680
  103. data/docs/M2mKeygen/Types.html +0 -147
  104. data/docs/M2mKeygen.html +0 -157
  105. data/docs/_index.html +0 -182
  106. data/docs/class_list.html +0 -51
  107. data/docs/css/common.css +0 -1
  108. data/docs/css/full_list.css +0 -58
  109. data/docs/css/style.css +0 -497
  110. data/docs/file.README.html +0 -230
  111. data/docs/file_list.html +0 -56
  112. data/docs/frames.html +0 -17
  113. data/docs/index.html +0 -230
  114. data/docs/js/app.js +0 -314
  115. data/docs/js/full_list.js +0 -216
  116. data/docs/js/jquery.js +0 -4
  117. data/docs/method_list.html +0 -139
  118. data/docs/top-level-namespace.html +0 -110
  119. data/lib/m2m_keygen/params_encoder.rb +0 -56
  120. data/package.json +0 -12
  121. data/sig/m2m_keygen.rbs +0 -4
  122. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
  123. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
  124. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
  125. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
  126. data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
  127. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
  128. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
  129. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
  130. data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
  131. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
  132. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
  133. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
  134. data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
  135. data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
  136. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
  137. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
  138. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
  139. data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
  140. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
  141. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
  142. data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
  143. data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
  144. data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
  145. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
  146. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
  147. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
  148. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
  149. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
  150. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
  151. data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
  152. data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
  153. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
  154. data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
  155. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
  156. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
  157. data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
  158. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
  159. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
  160. data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
  161. data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
  162. data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
  163. data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
  164. data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
  165. data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
  166. data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
  167. data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
  168. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
  169. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
  170. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
  171. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
  172. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
  173. data/sorbet/rbi/manual.rbi +0 -7
  174. data/yarn.lock +0 -20
@@ -4,9 +4,10 @@
4
4
  # This is an autogenerated file for types exported from the `docile` gem.
5
5
  # Please instead update this file by running `bin/tapioca gem docile`.
6
6
 
7
+
7
8
  # Docile keeps your Ruby DSLs tame and well-behaved.
8
9
  #
9
- # source://docile-1.4.0/lib/docile/version.rb:3
10
+ # pkg:gem/docile#lib/docile/version.rb:3
10
11
  module Docile
11
12
  extend ::Docile::Execution
12
13
 
@@ -15,6 +16,8 @@ module Docile
15
16
  # Execute a block in the context of an object whose methods represent the
16
17
  # commands in a DSL.
17
18
  #
19
+ # @note Use with an *imperative* DSL (commands modify the context object)
20
+ #
18
21
  # Use this method to execute an *imperative* DSL, which means that:
19
22
  #
20
23
  # 1. Each command mutates the state of the DSL context object
@@ -23,31 +26,35 @@ module Docile
23
26
  #
24
27
  # @example Use a String as a DSL
25
28
  # Docile.dsl_eval("Hello, world!") do
26
- # reverse!
27
- # upcase!
29
+ # reverse!
30
+ # upcase!
28
31
  # end
29
32
  # #=> "!DLROW ,OLLEH"
33
+ #
30
34
  # @example Use an Array as a DSL
31
35
  # Docile.dsl_eval([]) do
32
- # push 1
33
- # push 2
34
- # pop
35
- # push 3
36
+ # push 1
37
+ # push 2
38
+ # pop
39
+ # push 3
36
40
  # end
37
41
  # #=> [1, 3]
38
- # @note Use with an *imperative* DSL (commands modify the context object)
39
- # @param dsl [Object] context object whose methods make up the DSL
40
- # @param args [Array] arguments to be passed to the block
41
- # @param block [Proc] the block of DSL commands to be executed against the
42
- # `dsl` context object
43
- # @return [Object] the `dsl` context object after executing the block
44
42
  #
45
- # source://docile-1.4.0/lib/docile.rb:45
43
+ # @param dsl [Object] context object whose methods make up the DSL
44
+ # @param args [Array] arguments to be passed to the block
45
+ # @param block [Proc] the block of DSL commands to be executed against the
46
+ # `dsl` context object
47
+ # @return [Object] the `dsl` context object after executing the block
48
+ #
49
+ # pkg:gem/docile#lib/docile.rb:45
46
50
  def dsl_eval(dsl, *args, **_arg2, &block); end
47
51
 
48
52
  # Execute a block in the context of an immutable object whose methods,
49
53
  # and the methods of their return values, represent the commands in a DSL.
50
54
  #
55
+ # @note Use with a *functional* DSL (commands return successor
56
+ # context objects)
57
+ #
51
58
  # Use this method to execute a *functional* DSL, which means that:
52
59
  #
53
60
  # 1. The original DSL context object is never mutated
@@ -56,31 +63,33 @@ module Docile
56
63
  #
57
64
  # @example Use a frozen String as a DSL
58
65
  # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
59
- # reverse
60
- # upcase
66
+ # reverse
67
+ # upcase
61
68
  # end
62
69
  # #=> "!ELBATUMMI M'I"
70
+ #
63
71
  # @example Use a Float as a DSL
64
72
  # Docile.dsl_eval_immutable(84.5) do
65
- # fdiv(2)
66
- # floor
73
+ # fdiv(2)
74
+ # floor
67
75
  # end
68
76
  # #=> 42
69
- # @note Use with a *functional* DSL (commands return successor
70
- # context objects)
71
- # @param dsl [Object] immutable context object whose methods make up the
72
- # initial DSL
73
- # @param args [Array] arguments to be passed to the block
74
- # @param block [Proc] the block of DSL commands to be executed against the
75
- # `dsl` context object and successor return values
76
- # @return [Object] the return value of the final command in the block
77
77
  #
78
- # source://docile-1.4.0/lib/docile.rb:128
78
+ # @param dsl [Object] immutable context object whose methods make up the
79
+ # initial DSL
80
+ # @param args [Array] arguments to be passed to the block
81
+ # @param block [Proc] the block of DSL commands to be executed against the
82
+ # `dsl` context object and successor return values
83
+ # @return [Object] the return value of the final command in the block
84
+ #
85
+ # pkg:gem/docile#lib/docile.rb:128
79
86
  def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
80
87
 
81
88
  # Execute a block in the context of an object whose methods represent the
82
89
  # commands in a DSL, and return *the block's return value*.
83
90
  #
91
+ # @note Use with an *imperative* DSL (commands modify the context object)
92
+ #
84
93
  # Use this method to execute an *imperative* DSL, which means that:
85
94
  #
86
95
  # 1. Each command mutates the state of the DSL context object
@@ -89,34 +98,37 @@ module Docile
89
98
  #
90
99
  # @example Use a String as a DSL
91
100
  # Docile.dsl_eval_with_block_return("Hello, world!") do
92
- # reverse!
93
- # upcase!
94
- # first
101
+ # reverse!
102
+ # upcase!
103
+ # first
95
104
  # end
96
105
  # #=> "!"
106
+ #
97
107
  # @example Use an Array as a DSL
98
108
  # Docile.dsl_eval_with_block_return([]) do
99
- # push "a"
100
- # push "b"
101
- # pop
102
- # push "c"
103
- # length
109
+ # push "a"
110
+ # push "b"
111
+ # pop
112
+ # push "c"
113
+ # length
104
114
  # end
105
115
  # #=> 2
106
- # @note Use with an *imperative* DSL (commands modify the context object)
107
- # @param dsl [Object] context object whose methods make up the DSL
108
- # @param args [Array] arguments to be passed to the block
109
- # @param block [Proc] the block of DSL commands to be executed against the
110
- # `dsl` context object
111
- # @return [Object] the return value from executing the block
112
116
  #
113
- # source://docile-1.4.0/lib/docile.rb:87
117
+ # @param dsl [Object] context object whose methods make up the DSL
118
+ # @param args [Array] arguments to be passed to the block
119
+ # @param block [Proc] the block of DSL commands to be executed against the
120
+ # `dsl` context object
121
+ # @return [Object] the return value from executing the block
122
+ #
123
+ # pkg:gem/docile#lib/docile.rb:87
114
124
  def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
115
125
 
116
126
  class << self
117
127
  # Execute a block in the context of an object whose methods represent the
118
128
  # commands in a DSL.
119
129
  #
130
+ # @note Use with an *imperative* DSL (commands modify the context object)
131
+ #
120
132
  # Use this method to execute an *imperative* DSL, which means that:
121
133
  #
122
134
  # 1. Each command mutates the state of the DSL context object
@@ -125,31 +137,35 @@ module Docile
125
137
  #
126
138
  # @example Use a String as a DSL
127
139
  # Docile.dsl_eval("Hello, world!") do
128
- # reverse!
129
- # upcase!
140
+ # reverse!
141
+ # upcase!
130
142
  # end
131
143
  # #=> "!DLROW ,OLLEH"
144
+ #
132
145
  # @example Use an Array as a DSL
133
146
  # Docile.dsl_eval([]) do
134
- # push 1
135
- # push 2
136
- # pop
137
- # push 3
147
+ # push 1
148
+ # push 2
149
+ # pop
150
+ # push 3
138
151
  # end
139
152
  # #=> [1, 3]
140
- # @note Use with an *imperative* DSL (commands modify the context object)
141
- # @param dsl [Object] context object whose methods make up the DSL
142
- # @param args [Array] arguments to be passed to the block
143
- # @param block [Proc] the block of DSL commands to be executed against the
144
- # `dsl` context object
145
- # @return [Object] the `dsl` context object after executing the block
146
153
  #
147
- # source://docile-1.4.0/lib/docile.rb:45
154
+ # @param dsl [Object] context object whose methods make up the DSL
155
+ # @param args [Array] arguments to be passed to the block
156
+ # @param block [Proc] the block of DSL commands to be executed against the
157
+ # `dsl` context object
158
+ # @return [Object] the `dsl` context object after executing the block
159
+ #
160
+ # pkg:gem/docile#lib/docile.rb:51
148
161
  def dsl_eval(dsl, *args, **_arg2, &block); end
149
162
 
150
163
  # Execute a block in the context of an immutable object whose methods,
151
164
  # and the methods of their return values, represent the commands in a DSL.
152
165
  #
166
+ # @note Use with a *functional* DSL (commands return successor
167
+ # context objects)
168
+ #
153
169
  # Use this method to execute a *functional* DSL, which means that:
154
170
  #
155
171
  # 1. The original DSL context object is never mutated
@@ -158,31 +174,33 @@ module Docile
158
174
  #
159
175
  # @example Use a frozen String as a DSL
160
176
  # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
161
- # reverse
162
- # upcase
177
+ # reverse
178
+ # upcase
163
179
  # end
164
180
  # #=> "!ELBATUMMI M'I"
181
+ #
165
182
  # @example Use a Float as a DSL
166
183
  # Docile.dsl_eval_immutable(84.5) do
167
- # fdiv(2)
168
- # floor
184
+ # fdiv(2)
185
+ # floor
169
186
  # end
170
187
  # #=> 42
171
- # @note Use with a *functional* DSL (commands return successor
172
- # context objects)
173
- # @param dsl [Object] immutable context object whose methods make up the
174
- # initial DSL
175
- # @param args [Array] arguments to be passed to the block
176
- # @param block [Proc] the block of DSL commands to be executed against the
177
- # `dsl` context object and successor return values
178
- # @return [Object] the return value of the final command in the block
179
188
  #
180
- # source://docile-1.4.0/lib/docile.rb:128
189
+ # @param dsl [Object] immutable context object whose methods make up the
190
+ # initial DSL
191
+ # @param args [Array] arguments to be passed to the block
192
+ # @param block [Proc] the block of DSL commands to be executed against the
193
+ # `dsl` context object and successor return values
194
+ # @return [Object] the return value of the final command in the block
195
+ #
196
+ # pkg:gem/docile#lib/docile.rb:133
181
197
  def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
182
198
 
183
199
  # Execute a block in the context of an object whose methods represent the
184
200
  # commands in a DSL, and return *the block's return value*.
185
201
  #
202
+ # @note Use with an *imperative* DSL (commands modify the context object)
203
+ #
186
204
  # Use this method to execute an *imperative* DSL, which means that:
187
205
  #
188
206
  # 1. Each command mutates the state of the DSL context object
@@ -191,119 +209,114 @@ module Docile
191
209
  #
192
210
  # @example Use a String as a DSL
193
211
  # Docile.dsl_eval_with_block_return("Hello, world!") do
194
- # reverse!
195
- # upcase!
196
- # first
212
+ # reverse!
213
+ # upcase!
214
+ # first
197
215
  # end
198
216
  # #=> "!"
217
+ #
199
218
  # @example Use an Array as a DSL
200
219
  # Docile.dsl_eval_with_block_return([]) do
201
- # push "a"
202
- # push "b"
203
- # pop
204
- # push "c"
205
- # length
220
+ # push "a"
221
+ # push "b"
222
+ # pop
223
+ # push "c"
224
+ # length
206
225
  # end
207
226
  # #=> 2
208
- # @note Use with an *imperative* DSL (commands modify the context object)
209
- # @param dsl [Object] context object whose methods make up the DSL
210
- # @param args [Array] arguments to be passed to the block
211
- # @param block [Proc] the block of DSL commands to be executed against the
212
- # `dsl` context object
213
- # @return [Object] the return value from executing the block
214
227
  #
215
- # source://docile-1.4.0/lib/docile.rb:87
228
+ # @param dsl [Object] context object whose methods make up the DSL
229
+ # @param args [Array] arguments to be passed to the block
230
+ # @param block [Proc] the block of DSL commands to be executed against the
231
+ # `dsl` context object
232
+ # @return [Object] the return value from executing the block
233
+ #
234
+ # pkg:gem/docile#lib/docile.rb:94
216
235
  def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
217
236
  end
218
237
  end
219
238
 
239
+ # @api private
240
+ #
220
241
  # This is used to remove entries pointing to Docile's source files
221
242
  # from {Exception#backtrace} and {Exception#backtrace_locations}.
222
243
  #
223
244
  # If {NoMethodError} is caught then the exception object will be extended
224
245
  # by this module to add filter functionalities.
225
246
  #
226
- # @api private
227
- #
228
- # source://docile-1.4.0/lib/docile/backtrace_filter.rb:11
247
+ # pkg:gem/docile#lib/docile/backtrace_filter.rb:11
229
248
  module Docile::BacktraceFilter
230
- # @api private
231
- #
232
- # source://docile-1.4.0/lib/docile/backtrace_filter.rb:14
249
+ # pkg:gem/docile#lib/docile/backtrace_filter.rb:14
233
250
  def backtrace; end
234
251
 
235
- # @api private
236
- #
237
- # source://docile-1.4.0/lib/docile/backtrace_filter.rb:19
252
+ # pkg:gem/docile#lib/docile/backtrace_filter.rb:19
238
253
  def backtrace_locations; end
239
254
  end
240
255
 
241
- # @api private
242
- #
243
- # source://docile-1.4.0/lib/docile/backtrace_filter.rb:12
256
+ # pkg:gem/docile#lib/docile/backtrace_filter.rb:12
244
257
  Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp)
245
258
 
259
+ # @api private
260
+ #
246
261
  # Operates in the same manner as {FallbackContextProxy}, but replacing
247
262
  # the primary `receiver` object with the result of each proxied method.
248
263
  #
249
264
  # This is useful for implementing DSL evaluation for immutable context
250
265
  # objects.
251
266
  #
252
- #
253
- # @api private
254
267
  # @see Docile.dsl_eval_immutable
255
268
  #
256
- # source://docile-1.4.0/lib/docile/chaining_fallback_context_proxy.rb:19
269
+ # pkg:gem/docile#lib/docile/chaining_fallback_context_proxy.rb:17
257
270
  class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy
258
271
  # Proxy methods as in {FallbackContextProxy#method_missing}, replacing
259
272
  # `receiver` with the returned value.
260
273
  #
261
- # @api private
262
- #
263
- # source://docile-1.4.0/lib/docile/chaining_fallback_context_proxy.rb:20
274
+ # pkg:gem/docile#lib/docile/chaining_fallback_context_proxy.rb:20
264
275
  def method_missing(method, *args, **_arg2, &block); end
265
276
  end
266
277
 
278
+ # @api private
279
+ #
267
280
  # A namespace for functions relating to the execution of a block against a
268
281
  # proxy object.
269
282
  #
270
- # @api private
271
- #
272
- # source://docile-1.4.0/lib/docile/execution.rb:8
283
+ # pkg:gem/docile#lib/docile/execution.rb:8
273
284
  module Docile::Execution
274
285
  private
275
286
 
276
287
  # Execute a block in the context of an object whose methods represent the
277
288
  # commands in a DSL, using a specific proxy class.
278
289
  #
279
- # @api private
280
- # @param dsl [Object] context object whose methods make up the
281
- # (initial) DSL
282
- # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
283
- # @param args [Array] arguments to be passed to the block
284
- # @param block [Proc] the block of DSL commands to be executed
285
- # @return [Object] the return value of the block
290
+ # @param dsl [Object] context object whose methods make up the
291
+ # (initial) DSL
292
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy]
293
+ # which class to instantiate as proxy context
294
+ # @param args [Array] arguments to be passed to the block
295
+ # @param block [Proc] the block of DSL commands to be executed
296
+ # @return [Object] the return value of the block
286
297
  #
287
- # source://docile-1.4.0/lib/docile/execution.rb:19
298
+ # pkg:gem/docile#lib/docile/execution.rb:19
288
299
  def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
289
300
 
290
301
  class << self
291
302
  # Execute a block in the context of an object whose methods represent the
292
303
  # commands in a DSL, using a specific proxy class.
293
304
  #
294
- # @api private
295
- # @param dsl [Object] context object whose methods make up the
296
- # (initial) DSL
297
- # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
298
- # @param args [Array] arguments to be passed to the block
299
- # @param block [Proc] the block of DSL commands to be executed
300
- # @return [Object] the return value of the block
305
+ # @param dsl [Object] context object whose methods make up the
306
+ # (initial) DSL
307
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy]
308
+ # which class to instantiate as proxy context
309
+ # @param args [Array] arguments to be passed to the block
310
+ # @param block [Proc] the block of DSL commands to be executed
311
+ # @return [Object] the return value of the block
301
312
  #
302
- # source://docile-1.4.0/lib/docile/execution.rb:19
313
+ # pkg:gem/docile#lib/docile/execution.rb:51
303
314
  def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
304
315
  end
305
316
  end
306
317
 
318
+ # @api private
319
+ #
307
320
  # A proxy object with a primary receiver as well as a secondary
308
321
  # fallback receiver.
309
322
  #
@@ -313,64 +326,51 @@ end
313
326
  #
314
327
  # This is useful for implementing DSL evaluation in the context of an object.
315
328
  #
316
- #
317
- # @api private
318
329
  # @see Docile.dsl_eval
319
330
  #
320
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:20
331
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:20
321
332
  class Docile::FallbackContextProxy
322
- # @api private
323
- # @param receiver [Object] the primary proxy target to which all methods
324
- # initially will be forwarded
325
- # @param fallback [Object] the fallback proxy target to which any methods
326
- # not handled by `receiver` will be forwarded
327
- # @return [FallbackContextProxy] a new instance of FallbackContextProxy
333
+ # @param [Object] receiver the primary proxy target to which all methods
334
+ # initially will be forwarded
335
+ # @param [Object] fallback the fallback proxy target to which any methods
336
+ # not handled by `receiver` will be forwarded
328
337
  #
329
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:46
338
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:46
330
339
  def initialize(receiver, fallback); end
331
340
 
332
- # @api private
333
- # @return [Array<Symbol>] Instance variable names, excluding
334
- # {NON_PROXIED_INSTANCE_VARIABLES}
341
+ # @return [Array<Symbol>] Instance variable names, excluding
342
+ # {NON_PROXIED_INSTANCE_VARIABLES}
335
343
  #
336
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:85
344
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:85
337
345
  def instance_variables; end
338
346
 
339
347
  # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver`
340
348
  # and then to `fallback` if not found.
341
349
  #
342
- # @api private
343
- #
344
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:91
350
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:91
345
351
  def method_missing(method, *args, **_arg2, &block); end
346
352
  end
347
353
 
348
354
  # The set of methods which will **not** fallback from the block's context
349
355
  # to the dsl object.
350
356
  #
351
- # @api private
352
- #
353
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:30
357
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:30
354
358
  Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set)
355
359
 
356
360
  # The set of instance variables which are local to this object and hidden.
357
361
  # All other instance variables will be copied in and out of this object
358
362
  # from the scope in which this proxy was created.
359
363
  #
360
- # @api private
361
- #
362
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:35
364
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:35
363
365
  Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set)
364
366
 
365
367
  # The set of methods which will **not** be proxied, but instead answered
366
368
  # by this object directly.
367
369
  #
368
- # @api private
369
- #
370
- # source://docile-1.4.0/lib/docile/fallback_context_proxy.rb:23
370
+ # pkg:gem/docile#lib/docile/fallback_context_proxy.rb:23
371
371
  Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set)
372
372
 
373
373
  # The current version of this library
374
374
  #
375
- # source://docile-1.4.0/lib/docile/version.rb:5
375
+ # pkg:gem/docile#lib/docile/version.rb:5
376
376
  Docile::VERSION = T.let(T.unsafe(nil), String)