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
data/Gemfile.lock CHANGED
@@ -9,10 +9,32 @@ GIT
9
9
  faraday_middleware-multi_json (~> 0.0)
10
10
  oauth2 (~> 1.4)
11
11
 
12
+ GIT
13
+ remote: https://github.com/apiology/solargraph
14
+ revision: 904b9304770a59fac393c5cc3cad481e5bdf0fd8
15
+ branch: master
16
+ specs:
17
+ solargraph (0.50.1)
18
+ backport (~> 1.2)
19
+ benchmark
20
+ bundler (~> 2.0)
21
+ diff-lcs (~> 1.4)
22
+ e2mmap
23
+ jaro_winkler (~> 1.5)
24
+ kramdown (~> 2.3)
25
+ kramdown-parser-gfm (~> 1.1)
26
+ parser (~> 3.0)
27
+ rbs (~> 2.0)
28
+ reverse_markdown (~> 2.0)
29
+ rubocop (~> 1.38)
30
+ thor (~> 1.0)
31
+ tilt (~> 2.0)
32
+ yard (~> 0.9, >= 0.9.24)
33
+
12
34
  PATH
13
35
  remote: .
14
36
  specs:
15
- checkoff (0.200.0)
37
+ checkoff (0.203.0)
16
38
  activesupport
17
39
  asana (> 0.10.0)
18
40
  cache_method
@@ -22,15 +44,18 @@ PATH
22
44
  GEM
23
45
  remote: https://rubygems.org/
24
46
  specs:
25
- activesupport (7.1.3)
47
+ activesupport (7.1.5)
26
48
  base64
49
+ benchmark (>= 0.3)
27
50
  bigdecimal
28
51
  concurrent-ruby (~> 1.0, >= 1.0.2)
29
52
  connection_pool (>= 2.2.5)
30
53
  drb
31
54
  i18n (>= 1.6, < 2)
55
+ logger (>= 1.4.2)
32
56
  minitest (>= 5.1)
33
57
  mutex_m
58
+ securerandom (>= 0.3)
34
59
  tzinfo (~> 2.0)
35
60
  addressable (2.8.6)
36
61
  public_suffix (>= 2.0.2, < 6.0)
@@ -38,8 +63,10 @@ GEM
38
63
  ast (2.4.2)
39
64
  backport (1.2.0)
40
65
  base64 (0.2.0)
41
- benchmark (0.3.0)
66
+ benchmark (0.4.0)
42
67
  bigdecimal (3.1.5)
68
+ brakeman (6.2.2)
69
+ racc
43
70
  builder (3.2.4)
44
71
  bump (0.10.0)
45
72
  cache (0.4.1)
@@ -47,18 +74,17 @@ GEM
47
74
  cache (>= 0.2.1)
48
75
  chef-utils (18.3.0)
49
76
  concurrent-ruby
50
- childprocess (4.1.0)
77
+ childprocess (5.1.0)
78
+ logger (~> 1.5)
51
79
  coderay (1.1.3)
52
80
  concurrent-ruby (1.2.3)
53
81
  connection_pool (2.4.1)
54
82
  crack (0.4.5)
55
83
  rexml
56
- diff-lcs (1.5.0)
84
+ diff-lcs (1.5.1)
57
85
  docile (1.4.0)
58
- drb (2.2.0)
59
- ruby2_keywords
86
+ drb (2.2.1)
60
87
  e2mmap (0.1.0)
61
- fakeweb (1.3.0)
62
88
  faraday (1.10.3)
63
89
  faraday-em_http (~> 1.0)
64
90
  faraday-em_synchrony (~> 1.0)
@@ -87,14 +113,14 @@ GEM
87
113
  faraday_middleware-multi_json (0.0.6)
88
114
  faraday_middleware
89
115
  multi_json
90
- gli (2.21.1)
116
+ gli (2.22.0)
91
117
  hashdiff (1.0.1)
92
- i18n (1.14.1)
118
+ i18n (1.14.6)
93
119
  concurrent-ruby (~> 1.0)
94
120
  imagen (0.1.8)
95
121
  parser (>= 2.5, != 2.5.1.1)
96
122
  iniparse (1.5.0)
97
- jaro_winkler (1.5.6)
123
+ jaro_winkler (1.6.0)
98
124
  json (2.7.1)
99
125
  jwt (2.7.1)
100
126
  kramdown (2.4.0)
@@ -102,6 +128,7 @@ GEM
102
128
  kramdown-parser-gfm (1.1.0)
103
129
  kramdown (~> 2.0)
104
130
  language_server-protocol (3.17.0.3)
131
+ logger (1.6.1)
105
132
  mdl (0.13.0)
106
133
  kramdown (~> 2.3)
107
134
  kramdown-parser-gfm (~> 1.1)
@@ -129,12 +156,16 @@ GEM
129
156
  multi_json (1.15.0)
130
157
  multi_xml (0.6.0)
131
158
  multipart-post (2.3.0)
132
- mutex_m (0.2.0)
133
- nokogiri (1.16.2-arm64-darwin)
159
+ mutex_m (0.3.0)
160
+ nokogiri (1.16.7-aarch64-linux)
134
161
  racc (~> 1.4)
135
- nokogiri (1.16.2-x86_64-darwin)
162
+ nokogiri (1.16.7-arm-linux)
136
163
  racc (~> 1.4)
137
- nokogiri (1.16.2-x86_64-linux)
164
+ nokogiri (1.16.7-arm64-darwin)
165
+ racc (~> 1.4)
166
+ nokogiri (1.16.7-x86_64-darwin)
167
+ racc (~> 1.4)
168
+ nokogiri (1.16.7-x86_64-linux)
138
169
  racc (~> 1.4)
139
170
  oauth2 (1.4.11)
140
171
  faraday (>= 0.17.3, < 3.0)
@@ -142,8 +173,9 @@ GEM
142
173
  multi_json (~> 1.3)
143
174
  multi_xml (~> 0.5)
144
175
  rack (>= 1.2, < 4)
145
- overcommit (0.60.0)
146
- childprocess (>= 0.6.3, < 5)
176
+ ostruct (0.6.1)
177
+ overcommit (0.64.0)
178
+ childprocess (>= 0.6.3, < 6)
147
179
  iniparse (~> 1.4)
148
180
  rexml (~> 3.2)
149
181
  parallel (1.23.0)
@@ -154,7 +186,7 @@ GEM
154
186
  coderay (~> 1.1)
155
187
  method_source (~> 1.0)
156
188
  public_suffix (5.0.4)
157
- punchlist (1.3.0)
189
+ punchlist (1.3.2)
158
190
  source_finder (>= 2)
159
191
  racc (1.7.3)
160
192
  rack (3.0.8)
@@ -181,11 +213,15 @@ GEM
181
213
  rubocop-minitest (0.34.5)
182
214
  rubocop (>= 1.39, < 2.0)
183
215
  rubocop-ast (>= 1.30.0, < 2.0)
216
+ rubocop-performance (1.20.2)
217
+ rubocop (>= 1.48.1, < 2.0)
218
+ rubocop-ast (>= 1.30.0, < 2.0)
184
219
  rubocop-rake (0.6.0)
185
220
  rubocop (~> 1.0)
186
221
  ruby-progressbar (1.13.0)
187
222
  ruby2_keywords (0.0.5)
188
223
  rugged (1.6.3)
224
+ securerandom (0.3.2)
189
225
  simplecov (0.22.0)
190
226
  docile (~> 1.1)
191
227
  simplecov-html (~> 0.11)
@@ -193,25 +229,9 @@ GEM
193
229
  simplecov-html (0.12.3)
194
230
  simplecov-lcov (0.8.0)
195
231
  simplecov_json_formatter (0.1.4)
196
- solargraph (0.50.0)
197
- backport (~> 1.2)
198
- benchmark
199
- bundler (~> 2.0)
200
- diff-lcs (~> 1.4)
201
- e2mmap
202
- jaro_winkler (~> 1.5)
203
- kramdown (~> 2.3)
204
- kramdown-parser-gfm (~> 1.1)
205
- parser (~> 3.0)
206
- rbs (~> 2.0)
207
- reverse_markdown (~> 2.0)
208
- rubocop (~> 1.38)
209
- thor (~> 1.0)
210
- tilt (~> 2.0)
211
- yard (~> 0.9, >= 0.9.24)
212
232
  source_finder (3.2.1)
213
- thor (1.3.0)
214
- tilt (2.3.0)
233
+ thor (1.3.2)
234
+ tilt (2.4.0)
215
235
  tomlrb (2.0.3)
216
236
  tzinfo (2.0.6)
217
237
  concurrent-ruby (~> 1.0)
@@ -228,36 +248,40 @@ GEM
228
248
  yard (0.9.34)
229
249
 
230
250
  PLATFORMS
251
+ aarch64-linux
231
252
  arm64-darwin-23
253
+ arm64-linux
232
254
  x86_64-darwin-23
233
255
  x86_64-linux
234
256
  x86_64-linux-musl
235
257
 
236
258
  DEPENDENCIES
237
259
  asana!
260
+ brakeman
238
261
  bump
239
262
  bundler
240
263
  checkoff!
241
- fakeweb
242
264
  mdl
243
265
  mime-types (= 3.5.1)
244
266
  minitest-profile
245
267
  minitest-reporters
246
268
  mocha (>= 2)
247
- overcommit (>= 0.60.0, < 0.61.0)
269
+ ostruct
270
+ overcommit (>= 0.64.0, < 0.65.0)
248
271
  pry
249
- punchlist
250
- rake (~> 13.0)
272
+ punchlist (>= 1.3.1)
273
+ rake
251
274
  rbs
252
275
  rubocop (~> 1.52)
253
276
  rubocop-minitest
277
+ rubocop-performance
254
278
  rubocop-rake
255
279
  simplecov (>= 0.18.0)
256
280
  simplecov-lcov
257
- solargraph (>= 0.50.0)
281
+ solargraph!
258
282
  undercover
259
283
  webmock
260
284
  yard
261
285
 
262
286
  BUNDLED WITH
263
- 2.5.5
287
+ 2.3.27
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2016-2023, Vince Broz
3
+ Copyright (c) 2016-2024, Vince Broz
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/Makefile CHANGED
@@ -1,4 +1,4 @@
1
- .PHONY: clean test help quality localtest
1
+ .PHONY: build-typecheck bundle_install cicoverage citypecheck citest citypecoverage clean clean-coverage clean-typecheck clean-typecoverage coverage default help localtest overcommit quality repl report-coverage report-coverage-to-codecov rubocop test typecheck typecoverage update_from_cookiecutter
2
2
  .DEFAULT_GOAL := default
3
3
 
4
4
  define PRINT_HELP_PYSCRIPT
@@ -17,7 +17,17 @@ help:
17
17
 
18
18
  default: clean-coverage test coverage clean-typecoverage typecheck typecoverage quality ## run default typechecking, tests and quality
19
19
 
20
+ build-typecheck: bundle_install ## Fetch information that type checking depends on
21
+ bundle exec yard gems 2>&1; bundle exec yard gems --safe 2>&1; bundle exec yard gems 2>&1
22
+ # bundle exec solargraph scan 2>&1
23
+
24
+ clean-typecheck: ## Refresh information that type checking depends on
25
+ bundle exec solargraph clear
26
+ rm -fr .yardoc/
27
+ echo all clear
28
+
20
29
  typecheck: ## validate types in code and configuration
30
+ bundle exec solargraph typecheck --level strong
21
31
 
22
32
  citypecheck: typecheck ## Run type check from CircleCI
23
33
 
@@ -68,14 +78,6 @@ repl: ## Load up checkoff in pry
68
78
  clean-coverage:
69
79
  @bundle exec rake clear_metrics
70
80
 
71
- clean-typecheck: ## Refresh information that type checking depends on
72
- bundle install
73
- bundle exec solargraph clear
74
- rm -fr .yardoc/
75
- bundle exec yard gems
76
- bundle exec solargraph scan
77
- echo all clear
78
-
79
81
  coverage: test report-coverage ## check code coverage
80
82
  @bundle exec rake undercover
81
83
 
@@ -87,10 +89,10 @@ update_from_cookiecutter: ## Bring in changes from template project used to crea
87
89
  bundle exec overcommit --uninstall
88
90
  cookiecutter_project_upgrader --help >/dev/null
89
91
  IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
90
- git checkout cookiecutter-template && git push && git checkout main
91
- git checkout main && git pull && git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M)
92
+ git checkout cookiecutter-template && git push --no-verify
93
+ git checkout main; overcommit --sign && overcommit --sign pre-commit && git checkout main && git pull && git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M)
92
94
  git merge cookiecutter-template || true
93
- bundle exec overcommit --install
95
+ bundle exec overcommit --install || true
94
96
  @echo
95
97
  @echo "Please resolve any merge conflicts below and push up a PR with:"
96
98
  @echo
data/bin/brakeman ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'brakeman' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("brakeman", "brakeman")
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require 'overcommit'
6
+ require 'optparse'
7
+
8
+ # frozen_string_literal: true
9
+
10
+ require 'set'
11
+
12
+ module Overcommit::HookContext
13
+ # Simulates a pre-commit context representing all commits on the
14
+ # current feature branch, useful for automated CI scripts in large
15
+ # projects where not all unchanged files are assumed to pass.
16
+ class FeatureBranch < Base
17
+ # @return [Array<String>]
18
+ def modified_files
19
+ # use git cli to get the list of files changed on this feature branch
20
+ # @sg-ignore
21
+ # @type [Array<String>]
22
+ @modified_files ||= begin
23
+ # @sg-ignore
24
+ # @type [Array<String>]
25
+ relative_filenames = `git diff --name-only origin/main...HEAD`.split("\n")
26
+ absolute_filenames = relative_filenames.map { |f| File.expand_path(f) }
27
+ absolute_filenames.select { |f| File.exist?(f) }
28
+ end
29
+ end
30
+
31
+ # @param file [String]
32
+ #
33
+ # @return [Set]
34
+ def modified_lines_in_file(file)
35
+ modified_lines = Set.new
36
+
37
+ # use git cli to get the list of lines changed in this file on this feature branch
38
+ # @sg-ignore
39
+ # @type [Array<String>]
40
+ lines = `git diff -U0 origin/main...HEAD -- #{file}`.split("\n")
41
+
42
+ lines.each do |line|
43
+ if line =~ /^@@ -\d+,\d+ \+(\d+),(\d+)/
44
+ first_line = Regexp.last_match(1).to_i
45
+ last_line = first_line + Regexp.last_match(2).to_i - 1
46
+ # add each line # to modified_lines
47
+ (first_line..last_line).each do |line_number|
48
+ modified_lines << line_number
49
+ end
50
+ end
51
+ end
52
+
53
+ modified_lines
54
+ end
55
+
56
+ def hook_class_name
57
+ 'PreCommit'
58
+ end
59
+
60
+ def hook_type_name
61
+ 'pre_commit'
62
+ end
63
+
64
+ def hook_script_name
65
+ 'pre-commit'
66
+ end
67
+
68
+ def initial_commit?
69
+ return @initial_commit unless @initial_commit.nil?
70
+
71
+ @initial_commit = Overcommit::GitRepo.initial_commit?
72
+ end
73
+
74
+ private
75
+
76
+ # @param file [IO]
77
+ #
78
+ # @return [Integer]
79
+ def count_lines(file)
80
+ File.foreach(file).count
81
+ end
82
+ end
83
+ end
84
+
85
+ # Returns the configuration for this repository.
86
+
87
+ # Used for ease of stubbing in tests
88
+ # @param status [Integer] The exit status to return
89
+ # @return [void]
90
+ def halt(status = 0)
91
+ exit status
92
+ end
93
+
94
+ # @return [Overcommit::Logger]
95
+ def log
96
+ # @sg-ignore
97
+ @log ||= Overcommit::Logger.new(STDOUT)
98
+ end
99
+
100
+ # @param options [Hash]
101
+ #
102
+ # @return [Overcommit::Configuration]
103
+ def config(options = {})
104
+ @config ||= Overcommit::ConfigurationLoader.new(log, options).load_repo_config
105
+ end
106
+
107
+ empty_stdin = File.open(File::NULL) # pre-commit hooks don't take input
108
+ context = Overcommit::HookContext::FeatureBranch.new(config, [], empty_stdin)
109
+ config.apply_environment!(context, ENV)
110
+
111
+ printer = Overcommit::Printer.new(config, log, context)
112
+ # @sg-ignore
113
+ runner = Overcommit::HookRunner.new(config, log, context, printer)
114
+
115
+ status = runner.run
116
+
117
+ halt(status ? 0 : 65)
data/bin/spoom ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'spoom' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("spoom", "spoom")
data/bin/srb ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'srb' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("sorbet", "srb")
data/bin/srb-rbi ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'srb-rbi' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("sorbet", "srb-rbi")
data/bin/tapioca ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'tapioca' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("tapioca", "tapioca")
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # https://gist.github.com/castwide/28b349566a223dfb439a337aea29713e
4
+ #
5
+ # The following comments fill some of the gaps in Solargraph's
6
+ # understanding of types. Since they're all in YARD, they get mapped
7
+ # in Solargraph but ignored at runtime.
8
+ #
9
+ # You can put this file anywhere in the project, as long as it gets included in
10
+ # the workspace maps. It's recommended that you keep it in a standalone file
11
+ # instead of pasting it into an existing one.
12
+ #
13
+ # @!override Hash<[String,Symbol],String>#fetch
14
+ # @return [String>]
15
+ #
16
+ # @!parse
17
+ # class ENV
18
+ # # @param key [String]
19
+ # # @param default [Object]
20
+ # #
21
+ # # @return [String,Symbol<:none>,nil]
22
+ # def self.fetch(key, default = :none); end
23
+ # # @param key [String]
24
+ # #
25
+ # # @return [Object,nil]
26
+ # def self.[](key); end
27
+ # end
28
+ # module Bundler
29
+ # class << self
30
+ # # @param groups [Array<Symbol>]
31
+ # #
32
+ # # @return [void]
33
+ # def require(*groups); end
34
+ # end
35
+ # end
@@ -12,5 +12,6 @@
12
12
  "project_short_description": "Command-line and gem client for Asana (unofficial)",
13
13
  "project_slug": "checkoff",
14
14
  "type_of_github_repo": "public",
15
+ "use_checkoff": "No",
15
16
  "version": "0.8.0"
16
17
  }
data/fix.sh CHANGED
@@ -87,10 +87,12 @@ ensure_dev_library() {
87
87
  header_file_name=${1:?header file name}
88
88
  homebrew_package=${2:?homebrew package}
89
89
  apt_package=${3:-${homebrew_package}}
90
- if ! [ -f /usr/include/"${header_file_name}" ] && \
90
+ if ! [ -f /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/"${header_file_name}" ] && \
91
+ ! [ -f /opt/homebrew/include/"${header_file_name}" ] && \
92
+ ! [ -f /usr/include/"${header_file_name}" ] && \
91
93
  ! [ -f /usr/include/x86_64-linux-gnu/"${header_file_name}" ] && \
92
94
  ! [ -f /usr/local/include/"${header_file_name}" ] && \
93
- ! [ -f /usr/local/opt/"${homebrew_package}"/include/"${header_file_name}" ]
95
+ ! [ -f /usr/local/opt/"${homebrew_package}"/include/"${header_file_name}" ]
94
96
  then
95
97
  install_package "${homebrew_package}" "${apt_package}"
96
98
  fi
@@ -116,7 +118,7 @@ ensure_ruby_versions() {
116
118
 
117
119
  # You can find out which feature versions are still supported / have
118
120
  # been release here: https://www.ruby-lang.org/en/downloads/
119
- ruby_versions="$(latest_ruby_version 3.0)"
121
+ ruby_versions="$(latest_ruby_version 3.1)"
120
122
 
121
123
  echo "Latest Ruby versions: ${ruby_versions}"
122
124
 
@@ -191,7 +193,7 @@ ensure_bundle() {
191
193
  #
192
194
  # This affects nokogiri, which will try to reinstall itself in
193
195
  # Docker builds where it's already installed if this is not run.
194
- for platform in arm64-darwin-23 x86_64-darwin-23 x86_64-linux x86_64-linux-musl
196
+ for platform in arm64-darwin-23 x86_64-darwin-23 x86_64-linux x86_64-linux-musl aarch64-linux arm64-linux
195
197
  do
196
198
  grep "${platform:?}" Gemfile.lock >/dev/null 2>&1 || bundle lock --add-platform "${platform:?}"
197
199
  done
@@ -264,7 +266,7 @@ install_package() {
264
266
  HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_UPGRADE=1 brew install "${homebrew_package}"
265
267
  elif type apt-get >/dev/null 2>&1
266
268
  then
267
- if ! time dpkg -s "${apt_package}" >/dev/null
269
+ if ! dpkg -s "${apt_package}" >/dev/null
268
270
  then
269
271
  update_apt
270
272
  sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${apt_package}"
@@ -295,7 +297,7 @@ ensure_python_build_requirements() {
295
297
  ensure_dev_library zlib.h zlib zlib1g-dev
296
298
  ensure_dev_library bzlib.h bzip2 libbz2-dev
297
299
  ensure_dev_library openssl/ssl.h openssl libssl-dev
298
- ensure_dev_library ffi.h libffi libffi-dev
300
+ ensure_dev_library ffi/ffi.h libffi libffi-dev
299
301
  ensure_dev_library sqlite3.h sqlite3 libsqlite3-dev
300
302
  ensure_dev_library lzma.h xz liblzma-dev
301
303
  ensure_dev_library readline/readline.h readline libreadline-dev
@@ -388,6 +390,10 @@ ensure_rugged_packages_installed() {
388
390
 
389
391
  ensure_rbenv
390
392
 
393
+ ensure_types_built() {
394
+ make build-typecheck
395
+ }
396
+
391
397
  ensure_ruby_versions
392
398
 
393
399
  set_ruby_local_version
@@ -408,4 +414,6 @@ ensure_python_requirements
408
414
 
409
415
  ensure_shellcheck
410
416
 
417
+ ensure_types_built
418
+
411
419
  ensure_overcommit
@@ -70,6 +70,9 @@ module Checkoff
70
70
  resource_custom_field_enum_values(custom_field).flat_map do |enum_value|
71
71
  find_gids(custom_field, enum_value)
72
72
  end
73
+ rescue StandardError => e
74
+ raise "Could not process custom field with gid #{custom_field_gid} " \
75
+ "in gid #{resource.gid} with custom fields #{resource.custom_fields.inspect}: #{e}"
73
76
  end
74
77
 
75
78
  # @param resource [Asana::Resources::Project,Asana::Resources::Task]
@@ -162,8 +165,6 @@ module Checkoff
162
165
  if enum_value.nil?
163
166
  []
164
167
  else
165
- raise "Unexpected enabled value on custom field: #{custom_field}" if enum_value.fetch('enabled') == false
166
-
167
168
  [enum_value.fetch('gid')]
168
169
  end
169
170
  end