checkoff 0.200.0 → 0.203.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +130 -28
  3. data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
  4. data/.overcommit.yml +27 -2
  5. data/.rubocop.yml +20 -2
  6. data/.rubocop_todo.yml +90 -0
  7. data/.solargraph.yml +10 -1
  8. data/DEVELOPMENT.md +1 -1
  9. data/Gemfile +11 -8
  10. data/Gemfile.lock +66 -42
  11. data/LICENSE +1 -1
  12. data/Makefile +14 -12
  13. data/bin/brakeman +27 -0
  14. data/bin/overcommit_branch +117 -0
  15. data/bin/spoom +27 -0
  16. data/bin/srb +27 -0
  17. data/bin/srb-rbi +27 -0
  18. data/bin/tapioca +27 -0
  19. data/config/annotations_misc.rb +35 -0
  20. data/docs/cookiecutter_input.json +1 -0
  21. data/fix.sh +14 -6
  22. data/lib/checkoff/custom_fields.rb +3 -2
  23. data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
  24. data/lib/checkoff/version.rb +1 -1
  25. data/requirements_dev.txt +1 -1
  26. data/sorbet/config +4 -0
  27. data/sorbet/rbi/annotations/.gitattributes +1 -0
  28. data/sorbet/rbi/annotations/activesupport.rbi +453 -0
  29. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  30. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  31. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  32. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  33. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  34. data/sorbet/rbi/dsl/.gitattributes +1 -0
  35. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  36. data/sorbet/rbi/gems/.gitattributes +1 -0
  37. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
  38. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
  39. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  40. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
  41. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  42. data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
  43. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  44. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  45. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
  46. data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
  47. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  48. data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
  49. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
  50. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
  51. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
  52. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  53. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
  54. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  55. data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
  56. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
  57. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  58. data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
  59. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
  60. data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
  61. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
  62. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
  63. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
  64. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
  65. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
  66. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
  67. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
  68. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
  69. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
  70. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
  71. data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
  72. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
  73. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
  74. data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
  75. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
  76. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
  77. data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
  78. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
  79. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
  80. data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
  81. data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
  82. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
  83. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
  84. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  85. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  86. data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
  87. data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
  88. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
  89. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
  90. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
  91. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
  92. data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
  93. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
  94. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
  95. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
  96. data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
  97. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  98. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
  99. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
  100. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
  101. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  102. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  103. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
  104. data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
  105. data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
  106. data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
  107. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
  108. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  109. data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
  110. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
  111. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
  116. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  117. data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
  118. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
  119. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
  120. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
  121. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
  122. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
  123. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
  124. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  125. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
  126. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  127. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  128. data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
  129. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  130. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
  131. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  132. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  133. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
  134. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
  135. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  136. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
  137. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  138. data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
  139. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
  140. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  141. data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
  142. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  143. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
  144. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  145. data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
  146. data/sorbet/rbi/todo.rbi +11 -0
  147. data/sorbet/tapioca/config.yml +13 -0
  148. data/sorbet/tapioca/require.rb +4 -0
  149. metadata +134 -3
@@ -0,0 +1,211 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `cache` gem.
5
+ # Please instead update this file by running `bin/tapioca gem cache`.
6
+
7
+
8
+ # source://cache//lib/cache/config.rb#1
9
+ class Cache
10
+ # @return [Cache] a new instance of Cache
11
+ #
12
+ # source://cache//lib/cache.rb#29
13
+ def initialize(metal = T.unsafe(nil)); end
14
+
15
+ # Get the current value (if any), pass it into a block, and set the result.
16
+ #
17
+ # Example:
18
+ # cache.cas 'hello' { |current| 'world' }
19
+ #
20
+ # source://cache//lib/cache.rb#151
21
+ def cas(k, ttl = T.unsafe(nil), &blk); end
22
+
23
+ # Flush the cache.
24
+ #
25
+ # Example:
26
+ # cache.flush
27
+ #
28
+ # source://cache//lib/cache.rb#95
29
+ def clear; end
30
+
31
+ # Get the current value (if any), pass it into a block, and set the result.
32
+ #
33
+ # Example:
34
+ # cache.cas 'hello' { |current| 'world' }
35
+ #
36
+ # source://cache//lib/cache.rb#151
37
+ def compare_and_swap(k, ttl = T.unsafe(nil), &blk); end
38
+
39
+ # Returns the value of attribute config.
40
+ #
41
+ # source://cache//lib/cache.rb#23
42
+ def config; end
43
+
44
+ # Decrement a value.
45
+ #
46
+ # Example:
47
+ # cache.decrement 'high-fives'
48
+ #
49
+ # source://cache//lib/cache.rb#126
50
+ def decrement(k, amount = T.unsafe(nil), ignored_options = T.unsafe(nil)); end
51
+
52
+ # Delete a value.
53
+ #
54
+ # Example:
55
+ # cache.delete 'hello'
56
+ #
57
+ # source://cache//lib/cache.rb#86
58
+ def delete(k, ignored_options = T.unsafe(nil)); end
59
+
60
+ # Check if something exists.
61
+ #
62
+ # Example:
63
+ # cache.exist? 'hello'
64
+ #
65
+ # @return [Boolean]
66
+ #
67
+ # source://cache//lib/cache.rb#106
68
+ def exist?(k, ignored_options = T.unsafe(nil)); end
69
+
70
+ # Try to get a value and if it doesn't exist, set it to the result of the block.
71
+ #
72
+ # Accepts :expires_in for compatibility with Rails.
73
+ #
74
+ # Example:
75
+ # cache.fetch 'hello' { 'world' }
76
+ #
77
+ # source://cache//lib/cache.rb#136
78
+ def fetch(k, ttl = T.unsafe(nil), &blk); end
79
+
80
+ # Flush the cache.
81
+ #
82
+ # Example:
83
+ # cache.flush
84
+ #
85
+ # source://cache//lib/cache.rb#95
86
+ def flush; end
87
+
88
+ # Get a value.
89
+ #
90
+ # Example:
91
+ # cache.get 'hello'
92
+ #
93
+ # source://cache//lib/cache.rb#54
94
+ def get(k, ignored_options = T.unsafe(nil)); end
95
+
96
+ # Get multiple cache entries.
97
+ #
98
+ # Example:
99
+ # cache.get_multi 'hello', 'privyet'
100
+ #
101
+ # source://cache//lib/cache.rb#65
102
+ def get_multi(*ks); end
103
+
104
+ # Increment a value.
105
+ #
106
+ # Example:
107
+ # cache.increment 'high-fives'
108
+ #
109
+ # source://cache//lib/cache.rb#115
110
+ def increment(k, amount = T.unsafe(nil), ignored_options = T.unsafe(nil)); end
111
+
112
+ # For compatibility with Rails 2.x
113
+ #
114
+ # source://cache//lib/cache.rb#27
115
+ def logger; end
116
+
117
+ # For compatibility with Rails 2.x
118
+ #
119
+ # source://cache//lib/cache.rb#27
120
+ def logger=(_arg0); end
121
+
122
+ # Returns the value of attribute metal.
123
+ #
124
+ # source://cache//lib/cache.rb#24
125
+ def metal; end
126
+
127
+ # Get a value.
128
+ #
129
+ # Example:
130
+ # cache.get 'hello'
131
+ #
132
+ # source://cache//lib/cache.rb#54
133
+ def read(k, ignored_options = T.unsafe(nil)); end
134
+
135
+ # Store a value. Note that this will Marshal it.
136
+ #
137
+ # Example:
138
+ # cache.set 'hello', 'world'
139
+ # cache.set 'hello', 'world', 80 # seconds til it expires
140
+ #
141
+ # source://cache//lib/cache.rb#75
142
+ def set(k, v, ttl = T.unsafe(nil), ignored_options = T.unsafe(nil)); end
143
+
144
+ # Get stats.
145
+ #
146
+ # Example:
147
+ # cache.stats
148
+ #
149
+ # source://cache//lib/cache.rb#167
150
+ def stats; end
151
+
152
+ # Store a value. Note that this will Marshal it.
153
+ #
154
+ # Example:
155
+ # cache.set 'hello', 'world'
156
+ # cache.set 'hello', 'world', 80 # seconds til it expires
157
+ #
158
+ # source://cache//lib/cache.rb#75
159
+ def write(k, v, ttl = T.unsafe(nil), ignored_options = T.unsafe(nil)); end
160
+
161
+ private
162
+
163
+ # source://cache//lib/cache.rb#181
164
+ def after_fork; end
165
+
166
+ # source://cache//lib/cache.rb#185
167
+ def extract_ttl(ttl); end
168
+
169
+ # source://cache//lib/cache.rb#174
170
+ def handle_fork; end
171
+
172
+ class << self
173
+ # Create a new Cache instance by wrapping a client of your choice.
174
+ #
175
+ # Defaults to an in-process memory store.
176
+ #
177
+ # Supported memcached clients:
178
+ # * memcached[https://github.com/evan/memcached] (either a Memcached or a Memcached::Rails)
179
+ # * dalli[https://github.com/mperham/dalli] (either a Dalli::Client or an ActiveSupport::Cache::DalliStore)
180
+ # * memcache-client[https://github.com/mperham/memcache-client] (MemCache, the one commonly used by Rails)
181
+ #
182
+ # Supported Redis clients:
183
+ # * redis[https://github.com/ezmobius/redis-rb]
184
+ #
185
+ # Example:
186
+ # raw_client = Memcached.new('127.0.0.1:11211')
187
+ # cache = Cache.wrap raw_client
188
+ #
189
+ # source://cache//lib/cache.rb#19
190
+ def wrap(metal = T.unsafe(nil)); end
191
+ end
192
+ end
193
+
194
+ # Here's where config options are kept.
195
+ #
196
+ # Example:
197
+ # cache.config.default_ttl = 120 # seconds
198
+ #
199
+ # source://cache//lib/cache/config.rb#6
200
+ class Cache::Config
201
+ # source://cache//lib/cache/config.rb#15
202
+ def default_ttl; end
203
+
204
+ # TTL for method caches. Defaults to 60 seconds.
205
+ #
206
+ # Example:
207
+ # cache.config.default_ttl = 120 # seconds
208
+ #
209
+ # source://cache//lib/cache/config.rb#11
210
+ def default_ttl=(seconds); end
211
+ end
@@ -0,0 +1,293 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `cache_method` gem.
5
+ # Please instead update this file by running `bin/tapioca gem cache_method`.
6
+
7
+
8
+ # source://cache_method//lib/cache_method/config.rb#3
9
+ module CacheMethod
10
+ class << self
11
+ # source://cache_method//lib/cache_method.rb#12
12
+ def config; end
13
+
14
+ # source://cache_method//lib/cache_method.rb#55
15
+ def digest(obj); end
16
+
17
+ # source://cache_method//lib/cache_method.rb#18
18
+ def klass_name(obj); end
19
+
20
+ # source://cache_method//lib/cache_method.rb#22
21
+ def method_delimiter(obj); end
22
+
23
+ # source://cache_method//lib/cache_method.rb#26
24
+ def method_signature(obj, method_id); end
25
+
26
+ # source://cache_method//lib/cache_method.rb#30
27
+ def resolve_cache_key(obj); end
28
+ end
29
+ end
30
+
31
+ # source://cache_method//lib/cache_method.rb#10
32
+ CacheMethod::CACHE_KEY_JOINER = T.let(T.unsafe(nil), String)
33
+
34
+ # source://cache_method//lib/cache_method/cached_result.rb#2
35
+ class CacheMethod::CachedResult
36
+ # @return [CachedResult] a new instance of CachedResult
37
+ #
38
+ # source://cache_method//lib/cache_method/cached_result.rb#3
39
+ def initialize(obj, method_id, original_method_id, ttl, args, &blk); end
40
+
41
+ # Returns the value of attribute args.
42
+ #
43
+ # source://cache_method//lib/cache_method/cached_result.rb#19
44
+ def args; end
45
+
46
+ # Returns the value of attribute args_digest.
47
+ #
48
+ # source://cache_method//lib/cache_method/cached_result.rb#20
49
+ def args_digest; end
50
+
51
+ # Returns the value of attribute blk.
52
+ #
53
+ # source://cache_method//lib/cache_method/cached_result.rb#21
54
+ def blk; end
55
+
56
+ # @return [Boolean]
57
+ #
58
+ # source://cache_method//lib/cache_method/cached_result.rb#45
59
+ def exist?; end
60
+
61
+ # Store things wrapped in an Array so that nil is accepted
62
+ #
63
+ # source://cache_method//lib/cache_method/cached_result.rb#25
64
+ def fetch; end
65
+
66
+ # Returns the value of attribute method_id.
67
+ #
68
+ # source://cache_method//lib/cache_method/cached_result.rb#16
69
+ def method_id; end
70
+
71
+ # Returns the value of attribute method_signature.
72
+ #
73
+ # source://cache_method//lib/cache_method/cached_result.rb#17
74
+ def method_signature; end
75
+
76
+ # Returns the value of attribute obj.
77
+ #
78
+ # source://cache_method//lib/cache_method/cached_result.rb#15
79
+ def obj; end
80
+
81
+ # Returns the value of attribute original_method_id.
82
+ #
83
+ # source://cache_method//lib/cache_method/cached_result.rb#18
84
+ def original_method_id; end
85
+
86
+ # Returns the value of attribute ttl.
87
+ #
88
+ # source://cache_method//lib/cache_method/cached_result.rb#22
89
+ def ttl; end
90
+
91
+ private
92
+
93
+ # source://cache_method//lib/cache_method/cached_result.rb#51
94
+ def cache_key; end
95
+
96
+ # source://cache_method//lib/cache_method/cached_result.rb#59
97
+ def current_generation; end
98
+
99
+ # source://cache_method//lib/cache_method/cached_result.rb#65
100
+ def get_wrapped; end
101
+
102
+ # source://cache_method//lib/cache_method/cached_result.rb#69
103
+ def set_wrapped; end
104
+ end
105
+
106
+ # All Classes (but not instances), get the <tt>.cache_method</tt> method.
107
+ #
108
+ # source://cache_method//lib/cache_method.rb#81
109
+ module CacheMethod::ClassMethods
110
+ # Cache a method. TTL in seconds, defaults to whatever's in CacheMethod.config.default_ttl
111
+ #
112
+ # Note: Remember to define <tt>#as_cache_key</tt> on any object whose instance methods might get cached.
113
+ #
114
+ # Note 2: Check out CacheMethod.config.default_ttl... the default is 24 hours.
115
+ #
116
+ # Example:
117
+ # class Blog
118
+ # def get_latest_entries
119
+ # # [...]
120
+ # end
121
+ # cache_method :get_latest_entries
122
+ # end
123
+ #
124
+ # source://cache_method//lib/cache_method.rb#95
125
+ def cache_method(method_id, ttl = T.unsafe(nil)); end
126
+
127
+ # Clear a cache method once another method is called. Useful in situations where
128
+ # you want to clear a cache whenever another method is callled, commonly
129
+ # an update.
130
+ #
131
+ # Example:
132
+ # class Blog
133
+ # def get_latest_entries
134
+ # # [...]
135
+ # end
136
+ # def update_entries
137
+ # # update happens
138
+ # end
139
+ # cache_method_clear_on :update_entries, :get_latest_entries
140
+ # end
141
+ #
142
+ # source://cache_method//lib/cache_method.rb#117
143
+ def cache_method_clear_on(method_id, cache_method_clear_id); end
144
+ end
145
+
146
+ # Here's where you set config options.
147
+ #
148
+ # Example:
149
+ # CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
150
+ # CacheMethod.config.default_ttl = 120 # seconds
151
+ #
152
+ # You'd probably put this in your Rails config/initializers, for example.
153
+ #
154
+ # source://cache_method//lib/cache_method/config.rb#11
155
+ class CacheMethod::Config
156
+ # @return [Config] a new instance of Config
157
+ #
158
+ # source://cache_method//lib/cache_method/config.rb#13
159
+ def initialize; end
160
+
161
+ # source://cache_method//lib/cache_method/config.rb#75
162
+ def default_generational_ttl; end
163
+
164
+ # TTL for method generational caches. Defaults to 0 (never).
165
+ #
166
+ # Example:
167
+ # CacheMethod.config.default_generational_ttl = 120 # seconds
168
+ #
169
+ # source://cache_method//lib/cache_method/config.rb#71
170
+ def default_generational_ttl=(seconds); end
171
+
172
+ # source://cache_method//lib/cache_method/config.rb#63
173
+ def default_ttl; end
174
+
175
+ # TTL for method caches. Defaults to 24 hours or 86,400 seconds.
176
+ #
177
+ # Example:
178
+ # CacheMethod.config.default_ttl = 120 # seconds
179
+ #
180
+ # source://cache_method//lib/cache_method/config.rb#59
181
+ def default_ttl=(seconds); end
182
+
183
+ # Whether to use "generational" caching. Default is true.
184
+ #
185
+ # Pro: enables clearing/flushing/expiring specific methods
186
+ # Con: requires an extra trip to memcached to get the current "generation"
187
+ #
188
+ # Set to false if you just flush everything and don't need to selectively flush particular methods
189
+ #
190
+ # source://cache_method//lib/cache_method/config.rb#23
191
+ def generational=(boolean); end
192
+
193
+ # @return [Boolean]
194
+ #
195
+ # source://cache_method//lib/cache_method/config.rb#27
196
+ def generational?; end
197
+
198
+ # source://cache_method//lib/cache_method/config.rb#49
199
+ def storage; end
200
+
201
+ # Storage for the cache.
202
+ #
203
+ # Supported memcached clients:
204
+ # * memcached[https://github.com/fauna/memcached] (either a Memcached or a Memcached::Rails)
205
+ # * dalli[https://github.com/mperham/dalli] (either a Dalli::Client or an ActiveSupport::Cache::DalliStore)
206
+ # * memcache-client[https://github.com/mperham/memcache-client] (MemCache, the one commonly used by Rails)
207
+ #
208
+ # Supported Redis clients:
209
+ # * redis[https://github.com/ezmobius/redis-rb]
210
+ #
211
+ # Uses the cache[https://github.com/seamusabshere/cache] gem to wrap these, so support depends on that gem
212
+ #
213
+ # Example:
214
+ # CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
215
+ #
216
+ # source://cache_method//lib/cache_method/config.rb#45
217
+ def storage=(storage = T.unsafe(nil)); end
218
+ end
219
+
220
+ # source://cache_method//lib/cache_method/generation.rb#2
221
+ class CacheMethod::Generation
222
+ # @return [Generation] a new instance of Generation
223
+ #
224
+ # source://cache_method//lib/cache_method/generation.rb#3
225
+ def initialize(obj, method_id); end
226
+
227
+ # source://cache_method//lib/cache_method/generation.rb#14
228
+ def fetch; end
229
+
230
+ # source://cache_method//lib/cache_method/generation.rb#24
231
+ def mark_passing; end
232
+
233
+ # Returns the value of attribute method_id.
234
+ #
235
+ # source://cache_method//lib/cache_method/generation.rb#11
236
+ def method_id; end
237
+
238
+ # Returns the value of attribute method_signature.
239
+ #
240
+ # source://cache_method//lib/cache_method/generation.rb#12
241
+ def method_signature; end
242
+
243
+ # Returns the value of attribute obj.
244
+ #
245
+ # source://cache_method//lib/cache_method/generation.rb#10
246
+ def obj; end
247
+
248
+ private
249
+
250
+ # source://cache_method//lib/cache_method/generation.rb#30
251
+ def cache_key; end
252
+
253
+ # source://cache_method//lib/cache_method/generation.rb#38
254
+ def get; end
255
+
256
+ # source://cache_method//lib/cache_method/generation.rb#42
257
+ def set; end
258
+ end
259
+
260
+ # All Objects, including instances and Classes, get the <tt>#cache_method_clear</tt> method.
261
+ #
262
+ # source://cache_method//lib/cache_method.rb#60
263
+ module CacheMethod::InstanceMethods
264
+ # @return [Boolean]
265
+ #
266
+ # source://cache_method//lib/cache_method.rb#75
267
+ def cache_method_cached?(method_id, *args); end
268
+
269
+ # Clear the cache for a particular method.
270
+ #
271
+ # Note: Remember to define <tt>#as_cache_key</tt> on any object whose instance methods might get cached.
272
+ #
273
+ # Example:
274
+ # my_blog.cache_method_clear :get_latest_entries
275
+ #
276
+ # source://cache_method//lib/cache_method.rb#67
277
+ def cache_method_clear(method_id); end
278
+ end
279
+
280
+ # source://cache_method//lib/cache_method.rb#9
281
+ CacheMethod::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
282
+
283
+ class Class < ::Module; end
284
+
285
+ class Module
286
+ include ::CacheMethod::ClassMethods
287
+ end
288
+
289
+ class Object < ::BasicObject
290
+ include ::Kernel
291
+ include ::PP::ObjectMixin
292
+ include ::CacheMethod::InstanceMethods
293
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `chef-utils` gem.
5
+ # Please instead update this file by running `bin/tapioca gem chef-utils`.
6
+
7
+
8
+ # THIS IS AN EMPTY RBI FILE.
9
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem