checkoff 0.219.0 → 0.221.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +3 -4
  3. data/.overcommit.yml +2 -0
  4. data/.rubocop.yml +4 -0
  5. data/.rubocop_todo.yml +2 -1
  6. data/Gemfile +1 -0
  7. data/Gemfile.lock +42 -8
  8. data/Makefile +13 -7
  9. data/bin/tapioca +1 -1
  10. data/checkoff.gemspec +1 -0
  11. data/fix.sh +1 -0
  12. data/lib/checkoff/tasks.rb +8 -2
  13. data/lib/checkoff/version.rb +1 -1
  14. data/sorbet/rbi/gems/{activesupport@7.1.3.rbi → activesupport@7.1.5.rbi} +157 -160
  15. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +222 -0
  16. data/sorbet/rbi/gems/{i18n@1.14.1.rbi → i18n@1.14.6.rbi} +135 -102
  17. data/sorbet/rbi/gems/{logger@1.6.1.rbi → logger@1.6.2.rbi} +4 -1
  18. data/sorbet/rbi/gems/{mutex_m@0.2.0.rbi → mutex_m@0.3.0.rbi} +15 -12
  19. data/sorbet/rbi/gems/{nokogiri@1.16.7.rbi → nokogiri@1.17.0.rbi} +1693 -803
  20. data/sorbet/rbi/gems/{racc@1.7.3.rbi → racc@1.8.1.rbi} +33 -33
  21. data/sorbet/rbi/gems/{rack@3.0.8.rbi → rack@3.1.8.rbi} +697 -985
  22. data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.3.9.rbi} +354 -278
  23. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +7546 -0
  24. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +75 -0
  25. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +320 -0
  26. data/sorbet/rbi/gems/{tapioca@0.16.4.rbi → tapioca@0.16.5.rbi} +89 -76
  27. data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +429 -270
  28. metadata +33 -16
  29. data/sorbet/rbi/gems/ostruct@0.6.1.rbi +0 -354
  30. /data/sorbet/rbi/gems/{drb@2.2.0.rbi → drb@2.2.1.rbi} +0 -0
  31. /data/sorbet/rbi/gems/{gli@2.21.1.rbi → gli@2.22.0.rbi} +0 -0
  32. /data/sorbet/rbi/gems/{overcommit@0.64.0.rbi → overcommit@0.64.1.rbi} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7da0b9ca0d23eef9a6e173b31d4816cc7e3d101213f27822609163ae5e0d5057
4
- data.tar.gz: a5f7a9d1a9887cb4f4b8f888d26d9254340f0dd5aa5b8be65f791a06c233e5c4
3
+ metadata.gz: 852a3ff26e52a45c94de5254c46b9295965f1f666ce46079710ef8dc122f9e41
4
+ data.tar.gz: 77522c0a820d2f619f70cfabbe59965c1aa5a125c99ed398a56fca62413fb97a
5
5
  SHA512:
6
- metadata.gz: c2f23a332f26cc9f5f9b00f221ee311a6e247966c60e49cd5811d29c6e6317975c1314f335da8f80326330f2cd774759ac86bcdcf01d10cefc8a315efd2070bd
7
- data.tar.gz: fa89c8a3d37d82ff1fb7e0ecccbf22efd3869eef58cd72f9485030782e8c31d93c8cbc6424863e64ecd55bf8f12e7fcea6f927dc630a376f0902ffa4318e66e6
6
+ metadata.gz: 57d780efb0d8189698a948695daf6d3f014331b3133b6f487619d024baa18f5318ce0cf11ee78cdffbd528367093830e48b553bcccd29cfba45ed8679f8325d6
7
+ data.tar.gz: 54c25e37cb80b3015c1b92e99740e4b7d00ebad595cb6fa74add99d6d2eff06ffc36933a3b4ae4d207efef96df4cd988a0ca9e1c3fcdea24850e43bb777b655f
data/.circleci/config.yml CHANGED
@@ -48,9 +48,8 @@ commands:
48
48
  done
49
49
  - restore_cache:
50
50
  keys:
51
- - rbenv-v4-{{ checksum "Gemfile.lock" }}-
52
- - rbenv-v4-
53
- - rbenv-
51
+ - rbenv-v5-{{ checksum "Gemfile.lock" }}-
52
+ - rbenv-v5-
54
53
  - restore_cache:
55
54
  keys:
56
55
  - pyenv-v2-{{ checksum "requirements_dev.txt" }}-
@@ -218,7 +217,7 @@ jobs:
218
217
  # label: Typecheck
219
218
  # command: make citypecheck citypecoverage
220
219
  - save_cache:
221
- key: rbenv-v4-{{ checksum "Gemfile.lock" }}-{{ checksum ".ruby-version" }}
220
+ key: rbenv-v5-{{ checksum "Gemfile.lock" }}-{{ checksum ".ruby-version" }}
222
221
  paths:
223
222
  - "Gemfile.lock.installed"
224
223
  - "types.installed"
data/.overcommit.yml CHANGED
@@ -83,6 +83,8 @@ PreCommit:
83
83
  - test/**/*
84
84
  - ".bundle/**/*"
85
85
  - ".markdownlint_style.rb"
86
+ Sorbet:
87
+ enabled: true
86
88
  Punchlist:
87
89
  command: ['bundle', 'exec', 'punchlist']
88
90
  enabled: true
data/.rubocop.yml CHANGED
@@ -42,6 +42,10 @@ Metrics/ParameterLists:
42
42
  Minitest/TestMethodName:
43
43
  Enabled: false
44
44
 
45
+ Naming/FileName:
46
+ Exclude:
47
+ - 'lib/checkoff.rb'
48
+
45
49
  Naming/HeredocDelimiterNaming:
46
50
  Enabled: false
47
51
 
data/.rubocop_todo.yml CHANGED
@@ -6,12 +6,13 @@
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 20
9
+ # Offense count: 21
10
10
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
11
11
  Metrics/AbcSize:
12
12
  Exclude:
13
13
  - 'lib/checkoff/internal/asana_event_filter.rb'
14
14
  - 'lib/checkoff/task_searches.rb'
15
+ - 'lib/checkoff/tasks.rb'
15
16
  - 'lib/checkoff/timelines.rb'
16
17
  - 'test/unit/test_portfolios.rb'
17
18
  - 'test/unit/test_task_selectors.rb'
data/Gemfile CHANGED
@@ -17,6 +17,7 @@ group :development, :test do
17
17
  # ensure version with branch coverage
18
18
  gem 'simplecov', ['>=0.18.0']
19
19
  gem 'simplecov-lcov'
20
+ gem 'tapioca', require: false
20
21
  gem 'undercover'
21
22
  gem 'webmock'
22
23
  end
data/Gemfile.lock CHANGED
@@ -43,12 +43,13 @@ GIT
43
43
  PATH
44
44
  remote: .
45
45
  specs:
46
- checkoff (0.219.0)
46
+ checkoff (0.221.0)
47
47
  activesupport
48
48
  asana (> 0.10.0)
49
49
  cache_method
50
50
  gli
51
51
  mime-types
52
+ sorbet-runtime
52
53
 
53
54
  GEM
54
55
  remote: https://rubygems.org/
@@ -94,6 +95,7 @@ GEM
94
95
  docile (1.4.0)
95
96
  drb (2.2.1)
96
97
  e2mmap (0.1.0)
98
+ erubi (1.13.0)
97
99
  faraday (1.10.3)
98
100
  faraday-em_http (~> 1.0)
99
101
  faraday-em_synchrony (~> 1.0)
@@ -167,16 +169,17 @@ GEM
167
169
  multi_xml (0.6.0)
168
170
  multipart-post (2.3.0)
169
171
  mutex_m (0.3.0)
170
- nokogiri (1.16.8)
172
+ netrc (0.11.0)
173
+ nokogiri (1.17.0)
171
174
  mini_portile2 (~> 2.8.2)
172
175
  racc (~> 1.4)
173
- nokogiri (1.16.8-aarch64-linux)
176
+ nokogiri (1.17.0-aarch64-linux)
174
177
  racc (~> 1.4)
175
- nokogiri (1.16.8-arm64-darwin)
178
+ nokogiri (1.17.0-arm64-darwin)
176
179
  racc (~> 1.4)
177
- nokogiri (1.16.8-x86_64-darwin)
180
+ nokogiri (1.17.0-x86_64-darwin)
178
181
  racc (~> 1.4)
179
- nokogiri (1.16.8-x86_64-linux)
182
+ nokogiri (1.17.0-x86_64-linux)
180
183
  racc (~> 1.4)
181
184
  oauth2 (1.4.11)
182
185
  faraday (>= 0.17.3, < 3.0)
@@ -192,6 +195,7 @@ GEM
192
195
  parser (3.2.2.4)
193
196
  ast (~> 2.4.1)
194
197
  racc
198
+ prism (1.2.0)
195
199
  pry (0.14.2)
196
200
  coderay (~> 1.1)
197
201
  method_source (~> 1.0)
@@ -199,9 +203,12 @@ GEM
199
203
  punchlist (1.3.2)
200
204
  source_finder (>= 2)
201
205
  racc (1.8.1)
202
- rack (3.0.8)
206
+ rack (3.1.8)
203
207
  rainbow (3.1.1)
204
208
  rake (13.1.0)
209
+ rbi (0.2.1)
210
+ prism (~> 1.0)
211
+ sorbet-runtime (>= 0.5.9204)
205
212
  rbs (2.8.4)
206
213
  regexp_parser (2.8.3)
207
214
  reverse_markdown (2.1.1)
@@ -241,7 +248,30 @@ GEM
241
248
  simplecov-html (0.12.3)
242
249
  simplecov-lcov (0.8.0)
243
250
  simplecov_json_formatter (0.1.4)
251
+ sorbet (0.5.11690)
252
+ sorbet-static (= 0.5.11690)
253
+ sorbet-runtime (0.5.11690)
254
+ sorbet-static (0.5.11690-aarch64-linux)
255
+ sorbet-static (0.5.11690-universal-darwin)
256
+ sorbet-static (0.5.11690-x86_64-linux)
257
+ sorbet-static-and-runtime (0.5.11690)
258
+ sorbet (= 0.5.11690)
259
+ sorbet-runtime (= 0.5.11690)
244
260
  source_finder (3.2.1)
261
+ spoom (1.5.0)
262
+ erubi (>= 1.10.0)
263
+ prism (>= 0.28.0)
264
+ sorbet-static-and-runtime (>= 0.5.10187)
265
+ thor (>= 0.19.2)
266
+ tapioca (0.16.5)
267
+ bundler (>= 2.2.25)
268
+ netrc (>= 0.11.0)
269
+ parallel (>= 1.21.0)
270
+ rbi (~> 0.2)
271
+ sorbet-static-and-runtime (>= 0.5.11087)
272
+ spoom (>= 1.2.0)
273
+ thor (>= 1.2.0)
274
+ yard-sorbet
245
275
  thor (1.3.2)
246
276
  tilt (2.4.0)
247
277
  tomlrb (2.0.3)
@@ -257,7 +287,10 @@ GEM
257
287
  addressable (>= 2.8.0)
258
288
  crack (>= 0.3.2)
259
289
  hashdiff (>= 0.4.0, < 2.0.0)
260
- yard (0.9.34)
290
+ yard (0.9.37)
291
+ yard-sorbet (0.9.0)
292
+ sorbet-runtime
293
+ yard
261
294
 
262
295
  PLATFORMS
263
296
  aarch64-linux
@@ -294,6 +327,7 @@ DEPENDENCIES
294
327
  simplecov-lcov
295
328
  solargraph!
296
329
  solargraph-rails!
330
+ tapioca
297
331
  undercover
298
332
  webmock
299
333
  yard
data/Makefile CHANGED
@@ -15,13 +15,16 @@ export PRINT_HELP_PYSCRIPT
15
15
  help:
16
16
  @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17
17
 
18
- default: clean-coverage test coverage clean-typecoverage typecheck typecoverage quality ## run default typechecking, tests and quality
18
+ default: clean-typecoverage typecheck typecoverage clean-coverage test coverage quality ## run default typechecking, tests and quality
19
19
 
20
- build-typecheck: types.installed ## Fetch information that type checking depends on
20
+ build-typecheck: Gemfile.lock.installed types.installed ## Fetch information that type checking depends on
21
21
 
22
22
  types.installed: Gemfile.lock Gemfile.lock.installed ## Install Ruby dependencies
23
23
  bundle exec yard gems 2>&1 || bundle exec yard gems --safe 2>&1 || bundle exec yard gems 2>&1
24
24
  # bundle exec solargraph scan 2>&1
25
+ bin/tapioca gems
26
+ bin/tapioca annotations
27
+ bin/tapioca dsl
25
28
  touch types.installed
26
29
 
27
30
  clean-typecheck: ## Refresh information that type checking depends on
@@ -29,10 +32,13 @@ clean-typecheck: ## Refresh information that type checking depends on
29
32
  rm -fr .yardoc/
30
33
  echo all clear
31
34
 
32
- typecheck: ## validate types in code and configuration
33
- bundle exec solargraph typecheck --level strong
35
+ typecheck: build-typecheck ## validate types in code and configuration
36
+ bin/tapioca dsl --verify
37
+ bundle exec srb tc
38
+ bin/overcommit_branch # ideally this would just run solargraph
34
39
 
35
40
  citypecheck: typecheck ## Run type check from CircleCI
41
+ bundle exec solargraph typecheck --level strong
36
42
 
37
43
  typecoverage: typecheck ## Run type checking and then ratchet coverage in metrics/
38
44
 
@@ -46,9 +52,8 @@ requirements_dev.txt.installed: requirements_dev.txt
46
52
 
47
53
  pip_install: requirements_dev.txt.installed ## Install Python dependencies
48
54
 
49
- # bundle install doesn't get run here so that we can catch it below in
50
- # fresh-checkout and fresh-rbenv cases
51
55
  Gemfile.lock: Gemfile checkoff.gemspec
56
+ bundle install
52
57
 
53
58
  # Ensure any Gemfile.lock changes ensure a bundle is installed.
54
59
  Gemfile.lock.installed: Gemfile.lock
@@ -65,7 +70,7 @@ clean: clear_metrics ## remove all built artifacts
65
70
  citest: test ## Run unit tests from CircleCI
66
71
 
67
72
  overcommit: ## run precommit quality checks
68
- bundle exec overcommit --run
73
+ bin/overcommit_branch
69
74
 
70
75
  quality: overcommit ## run precommit quality checks
71
76
 
@@ -104,6 +109,7 @@ update_from_cookiecutter: ## Bring in changes from template project used to crea
104
109
  git checkout --ours Gemfile.lock || true
105
110
  # update frequently security-flagged gems while we're here
106
111
  bundle update --conservative nokogiri rack rexml yard || true
112
+ make build-typecheck
107
113
  git add Gemfile.lock || true
108
114
  bundle install || true
109
115
  bundle exec overcommit --install || true
data/bin/tapioca CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/checkoff.gemspec CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_runtime_dependency 'cache_method'
30
30
  spec.add_runtime_dependency 'gli'
31
31
  spec.add_runtime_dependency 'mime-types'
32
+ spec.add_runtime_dependency 'sorbet-runtime'
32
33
 
33
34
  spec.metadata = {
34
35
  'rubygems_mfa_required' => 'false',
data/fix.sh CHANGED
@@ -263,6 +263,7 @@ ensure_bundle() {
263
263
  bundle lock --add-platform "${platform}"
264
264
  fi
265
265
  done
266
+ ls -l
266
267
  make bundle_install
267
268
  }
268
269
 
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # typed: true
4
+
3
5
  # frozen_string_literal: true
4
6
 
5
7
  require_relative 'sections'
@@ -11,6 +13,7 @@ require_relative 'internal/task_hashes'
11
13
  require_relative 'internal/logging'
12
14
  require_relative 'internal/thread_local'
13
15
  require 'asana'
16
+ require 'sorbet-runtime'
14
17
 
15
18
  module Checkoff
16
19
  # Pull tasks from Asana
@@ -18,6 +21,8 @@ module Checkoff
18
21
  # @!parse
19
22
  # extend CacheMethod::ClassMethods
20
23
 
24
+ extend T::Sig
25
+
21
26
  include Logging
22
27
 
23
28
  MINUTE = 60
@@ -227,7 +232,8 @@ module Checkoff
227
232
  #
228
233
  # @return [Array<Hash>]
229
234
  def all_dependent_tasks(task, extra_task_fields: [])
230
- dependent_tasks = []
235
+ # @type [Array<Hash>]
236
+ dependent_tasks = T.let([], T::Array[Hash])
231
237
  # See note above - same applies as does in @dependencies
232
238
  #
233
239
  # @type [Array<Hash>]
@@ -305,7 +311,7 @@ module Checkoff
305
311
  workspace_name: @workspaces.default_workspace.name)
306
312
  portfolio_projects = @portfolios.projects_in_portfolio(workspace_name, portfolio_name)
307
313
  portfolio_project_gids = portfolio_projects.map(&:gid)
308
- seen = false
314
+ seen = T.let(false, T::Boolean)
309
315
  task.memberships.each do |membership|
310
316
  project_gid = membership.fetch('project').fetch('gid')
311
317
  next unless portfolio_project_gids.include?(project_gid)
@@ -3,5 +3,5 @@
3
3
  # Command-line and gem client for Asana (unofficial)
4
4
  module Checkoff
5
5
  # Version of library
6
- VERSION = '0.219.0'
6
+ VERSION = '0.221.0'
7
7
  end