checkoff 0.223.0 → 0.226.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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/attachments.rb +1 -1
  4. data/lib/checkoff/cli.rb +1 -1
  5. data/lib/checkoff/clients.rb +1 -1
  6. data/lib/checkoff/custom_fields.rb +1 -1
  7. data/lib/checkoff/events.rb +1 -1
  8. data/lib/checkoff/internal/config_loader.rb +2 -3
  9. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -2
  10. data/lib/checkoff/my_tasks.rb +1 -1
  11. data/lib/checkoff/portfolios.rb +11 -9
  12. data/lib/checkoff/projects.rb +1 -1
  13. data/lib/checkoff/sections.rb +4 -5
  14. data/lib/checkoff/tags.rb +66 -17
  15. data/lib/checkoff/tasks.rb +1 -1
  16. data/lib/checkoff/version.rb +1 -1
  17. data/lib/checkoff/workspaces.rb +1 -1
  18. data/rbi/checkoff.rbi +4529 -0
  19. data/sig/checkoff.rbs +3749 -0
  20. metadata +5 -211
  21. data/.circleci/config.yml +0 -291
  22. data/.envrc +0 -9
  23. data/.git-hooks/pre_commit/circle_ci.rb +0 -26
  24. data/.git-hooks/pre_commit/punchlist.rb +0 -52
  25. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -77
  26. data/.gitattributes +0 -6
  27. data/.gitignore +0 -65
  28. data/.markdownlint_style.rb +0 -4
  29. data/.mdlrc +0 -1
  30. data/.overcommit.yml +0 -115
  31. data/.rubocop.yml +0 -143
  32. data/.rubocop_todo.yml +0 -90
  33. data/.solargraph.yml +0 -35
  34. data/.yamllint.yml +0 -8
  35. data/.yardopts +0 -2
  36. data/CODE_OF_CONDUCT.md +0 -133
  37. data/CONTRIBUTING.rst +0 -75
  38. data/DEVELOPMENT.md +0 -69
  39. data/GLOSSARY.md +0 -16
  40. data/Gemfile +0 -67
  41. data/Gemfile.lock +0 -351
  42. data/LICENSE +0 -21
  43. data/Makefile +0 -139
  44. data/bin/brakeman +0 -27
  45. data/bin/bump +0 -29
  46. data/bin/checkoff +0 -29
  47. data/bin/console +0 -15
  48. data/bin/overcommit +0 -29
  49. data/bin/overcommit_branch +0 -114
  50. data/bin/rake +0 -29
  51. data/bin/rubocop +0 -27
  52. data/bin/setup +0 -8
  53. data/bin/solargraph +0 -27
  54. data/bin/sord +0 -27
  55. data/bin/spoom +0 -27
  56. data/bin/srb +0 -27
  57. data/bin/srb-rbi +0 -27
  58. data/bin/tapioca +0 -27
  59. data/bin/yard +0 -27
  60. data/config/annotations_asana.rb +0 -253
  61. data/config/annotations_misc.rb +0 -68
  62. data/config/env.1p +0 -2
  63. data/docs/.gitignore +0 -3
  64. data/docs/cookiecutter_input.json +0 -17
  65. data/docs/example_project.png +0 -0
  66. data/fix.sh +0 -534
  67. data/metrics/bigfiles_high_water_mark +0 -1
  68. data/metrics/brakeman_high_water_mark +0 -1
  69. data/metrics/bundle-audit_high_water_mark +0 -1
  70. data/metrics/cane_high_water_mark +0 -1
  71. data/metrics/eslint_high_water_mark +0 -1
  72. data/metrics/flake8_high_water_mark +0 -1
  73. data/metrics/flay_high_water_mark +0 -1
  74. data/metrics/flog_high_water_mark +0 -1
  75. data/metrics/jscs_high_water_mark +0 -1
  76. data/metrics/mdl_high_water_mark +0 -1
  77. data/metrics/pep8_high_water_mark +0 -1
  78. data/metrics/punchlist_high_water_mark +0 -1
  79. data/metrics/pycodestyle_high_water_mark +0 -1
  80. data/metrics/rails_best_practices_high_water_mark +0 -1
  81. data/metrics/rubocop_high_water_mark +0 -1
  82. data/metrics/scalastyle_high_water_mark +0 -1
  83. data/metrics/shellcheck_high_water_mark +0 -1
  84. data/package.json +0 -9
  85. data/rakelib/citest.rake +0 -4
  86. data/rakelib/clear_metrics.rake +0 -9
  87. data/rakelib/console.rake +0 -15
  88. data/rakelib/default.rake +0 -4
  89. data/rakelib/doc.rake +0 -6
  90. data/rakelib/gem_tasks.rake +0 -3
  91. data/rakelib/localtest.rake +0 -4
  92. data/rakelib/overcommit.rake +0 -6
  93. data/rakelib/quality.rake +0 -4
  94. data/rakelib/repl.rake +0 -4
  95. data/rakelib/test.rake +0 -10
  96. data/rakelib/trigger_next_builds.rake +0 -7
  97. data/rakelib/undercover.rake +0 -8
  98. data/requirements_dev.txt +0 -2
  99. data/sorbet/config +0 -4
  100. data/sorbet/rbi/annotations/.gitattributes +0 -1
  101. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  102. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  103. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  104. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  105. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  106. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  107. data/sorbet/rbi/dsl/.gitattributes +0 -1
  108. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  109. data/sorbet/rbi/gems/.gitattributes +0 -1
  110. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  111. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  112. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  113. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  114. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  115. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  116. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  117. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  118. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  119. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  120. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  121. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  122. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  123. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  124. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  125. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  126. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  127. data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -9
  128. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  129. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  130. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  131. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  132. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  133. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  134. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  135. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  136. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  137. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  138. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  139. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  140. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  141. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  142. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  143. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  144. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  145. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  146. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  147. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  148. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  149. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  150. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  151. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -9
  152. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  153. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  154. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  155. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  156. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  157. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  158. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  159. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  160. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  161. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  162. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  163. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  164. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  165. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  166. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  167. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  168. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  169. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  170. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  171. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  172. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  173. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  174. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  175. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  176. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  177. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  178. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  179. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  180. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  181. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  182. data/sorbet/rbi/gems/parlour@5.0.0.rbi +0 -3007
  183. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  184. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  185. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  186. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  187. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  188. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  189. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  190. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  191. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  192. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  193. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  194. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  195. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  196. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  197. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7127
  198. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  199. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  200. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  201. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  202. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  203. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  204. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  205. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  206. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  207. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  208. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  209. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  210. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  211. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  212. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  213. data/sorbet/rbi/gems/sord@5.1.0.rbi +0 -820
  214. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  215. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  216. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  217. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  218. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  219. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  220. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  221. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  222. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  223. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  224. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  225. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  226. data/sorbet/rbi/todo.rbi +0 -11
  227. data/sorbet/tapioca/config.yml +0 -13
  228. data/sorbet/tapioca/require.rb +0 -4
data/Makefile DELETED
@@ -1,139 +0,0 @@
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
- .DEFAULT_GOAL := default
3
-
4
- define PRINT_HELP_PYSCRIPT
5
- import re, sys
6
-
7
- for line in sys.stdin:
8
- match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
9
- if match:
10
- target, help = match.groups()
11
- print("%-20s %s" % (target, help))
12
- endef
13
- export PRINT_HELP_PYSCRIPT
14
-
15
- help:
16
- @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17
-
18
- default: clean-typecoverage typecheck typecoverage clean-coverage test coverage quality ## run default typechecking, tests and quality
19
-
20
- config/defs.rbi: .yardoc/complete ## Generate RBS files
21
- rm -f config/defs.rbi
22
- bundle exec sord --replace-errors-with-untyped --no-regenerate config/defs.rbi
23
-
24
- build-typecheck: Gemfile.lock.installed types.installed config/defs.rbi ## Fetch information that type checking depends on
25
-
26
- types.installed: tapioca.installed Gemfile.lock Gemfile.lock.installed ## Install Ruby dependencies
27
- bundle exec yard gems 2>&1 || bundle exec yard gems --safe 2>&1 || bundle exec yard gems 2>&1
28
- # bundle exec solargraph scan 2>&1
29
- touch types.installed
30
-
31
- tapioca.installed: Gemfile.lock.installed ## Install Tapioca-generated type information
32
- bin/tapioca gems
33
- bin/tapioca annotations
34
- bin/tapioca dsl
35
- bin/tapioca todo
36
- touch tapioca.installed
37
-
38
- SOURCE_FILES = $(shell find lib -name '*.rb' -type f)
39
-
40
- .yardoc/complete: $(wildcard config/annotations_*.rb) $(SOURCE_FILES) ## Generate YARD documentation
41
- bin/yard -c
42
-
43
- clean-typecheck: ## Refresh the easily-regenerated information that type checking depends on
44
- bin/solargraph clear
45
- rm -fr .yardoc/ config/defs.rbi types.installed
46
- echo all clear
47
-
48
- realclean-typecheck: clean-typecheck ## Remove all type checking artifacts
49
- rm tapioca.installed
50
-
51
-
52
-
53
- typecheck: build-typecheck ## validate types in code and configuration
54
- bin/tapioca dsl --verify
55
- bundle exec srb tc
56
- bin/overcommit_branch # ideally this would just run solargraph
57
-
58
- citypecheck: typecheck ## Run type check from CircleCI
59
- bundle exec solargraph typecheck --level strong
60
-
61
- typecoverage: typecheck ## Run type checking and then ratchet coverage in metrics/
62
-
63
- clean-typecoverage: ## Clean out type-related coverage previous results to avoid flaky results
64
-
65
- citypecoverage: typecoverage ## Run type checking, ratchet coverage, and then complain if ratchet needs to be committed
66
-
67
- requirements_dev.txt.installed: requirements_dev.txt
68
- pip install -q --disable-pip-version-check -r requirements_dev.txt
69
- touch requirements_dev.txt.installed
70
-
71
- pip_install: requirements_dev.txt.installed ## Install Python dependencies
72
-
73
- Gemfile.lock: Gemfile checkoff.gemspec
74
- bundle install
75
-
76
- # Ensure any Gemfile.lock changes ensure a bundle is installed.
77
- Gemfile.lock.installed: Gemfile.lock
78
- bundle install
79
- touch Gemfile.lock.installed
80
-
81
- bundle_install: Gemfile.lock.installed ## Install Ruby dependencies
82
-
83
- clear_metrics: ## remove or reset result artifacts created by tests and quality tools
84
- bundle exec rake clear_metrics
85
-
86
- clean: clear_metrics ## remove all built artifacts
87
-
88
- citest: test ## Run unit tests from CircleCI
89
-
90
- overcommit: ## run precommit quality checks
91
- bin/overcommit_branch
92
-
93
- quality: overcommit ## run precommit quality checks
94
-
95
- test: ## Run lower-level tests
96
- @bundle exec rake test
97
-
98
- localtest: ## run default local actions
99
- @bundle exec rake localtest
100
-
101
- repl: ## Load up checkoff in pry
102
- @bundle exec rake repl
103
-
104
- clean-coverage:
105
- @bundle exec rake clear_metrics
106
-
107
- coverage: test report-coverage ## check code coverage
108
- @bundle exec rake undercover
109
-
110
- report-coverage: test ## Report summary of coverage to stdout, and generate HTML, XML coverage report
111
-
112
- cicoverage: coverage ## check code coverage
113
-
114
- update_from_cookiecutter: ## Bring in changes from template project used to create this repo
115
- bundle exec overcommit --uninstall
116
- # cookiecutter_project_upgrader does its work in
117
- # .git/cookiecutter/checkoff, but RuboCop wants to inherit
118
- # config from all directories above it - avoid config
119
- # mismatches by moving this out of the way
120
- mv .rubocop.yml .rubocop-renamed.yml || true
121
- cookiecutter_project_upgrader --help >/dev/null
122
- IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
123
- mv .rubocop-renamed.yml .rubocop.yml
124
- git checkout cookiecutter-template && git push --no-verify
125
- 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)
126
- git merge cookiecutter-template || true
127
- git checkout --ours Gemfile.lock || true
128
- # update frequently security-flagged gems while we're here
129
- bundle update --conservative nokogiri rack rexml yard || true
130
- make build-typecheck
131
- git add Gemfile.lock || true
132
- bundle install || true
133
- bundle exec overcommit --install || true
134
- @echo
135
- @echo "Please resolve any merge conflicts below and push up a PR with:"
136
- @echo
137
- @echo ' gh pr create --title "Update from cookiecutter" --body "Automated PR to update from cookiecutter boilerplate"'
138
- @echo
139
- @echo
data/bin/brakeman DELETED
@@ -1,27 +0,0 @@
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")
data/bin/bump DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bump' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("bump", "bump")
data/bin/checkoff DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'checkoff' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("checkoff", "checkoff")
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'checkoff'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start
data/bin/overcommit DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'overcommit' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("overcommit", "overcommit")
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- require 'overcommit'
6
- require 'optparse'
7
- require 'set'
8
-
9
- # frozen_string_literal: true
10
-
11
- module Overcommit
12
- module 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
- # use git cli to get the list of lines changed in this file on this feature branch
36
- # @sg-ignore
37
- # @type [Array<String>]
38
- lines = `git diff -U0 origin/main...HEAD -- #{file}`.split("\n")
39
-
40
- modified_lines = Set.new
41
-
42
- lines.each do |line|
43
- next unless line =~ /^@@ -\d+,\d+ \+(\d+),(\d+)/
44
-
45
- first_line = Regexp.last_match(1).to_i
46
- last_line = first_line + Regexp.last_match(2).to_i - 1
47
- this_file_lines = (first_line..last_line)
48
- modified_lines.merge(this_file_lines)
49
- end
50
-
51
- modified_lines.to_set
52
- end
53
-
54
- def hook_class_name
55
- 'PreCommit'
56
- end
57
-
58
- def hook_type_name
59
- 'pre_commit'
60
- end
61
-
62
- def hook_script_name
63
- 'pre-commit'
64
- end
65
-
66
- def initial_commit?
67
- return @initial_commit unless @initial_commit.nil?
68
-
69
- @initial_commit = Overcommit::GitRepo.initial_commit?
70
- end
71
-
72
- private
73
-
74
- # @param file [IO]
75
- #
76
- # @return [Integer]
77
- def count_lines(file)
78
- File.foreach(file).count
79
- end
80
- end
81
- end
82
- end
83
-
84
- # Used for ease of stubbing in tests
85
- # @param status [Integer] The exit status to return
86
- # @return [void]
87
- def halt(status = 0)
88
- exit status
89
- end
90
-
91
- # @return [Overcommit::Logger]
92
- def log
93
- # @sg-ignore
94
- @log ||= Overcommit::Logger.new($stdout)
95
- end
96
-
97
- # @param options [Hash]
98
- #
99
- # @return [Overcommit::Configuration]
100
- def config(options = {})
101
- @config ||= Overcommit::ConfigurationLoader.new(log, options).load_repo_config
102
- end
103
-
104
- empty_stdin = File.open(File::NULL) # pre-commit hooks don't take input
105
- context = Overcommit::HookContext::FeatureBranch.new(config, [], empty_stdin)
106
- config.apply_environment!(context, ENV)
107
-
108
- printer = Overcommit::Printer.new(config, log, context)
109
- # @sg-ignore
110
- runner = Overcommit::HookRunner.new(config, log, context, printer)
111
-
112
- status = runner.run
113
-
114
- halt(status ? 0 : 65)
data/bin/rake DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rake' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rake", "rake")
data/bin/rubocop DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rubocop' 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("rubocop", "rubocop")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/bin/solargraph DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'solargraph' 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("solargraph", "solargraph")
data/bin/sord DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'sord' 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("sord", "sord")
data/bin/spoom DELETED
@@ -1,27 +0,0 @@
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 DELETED
@@ -1,27 +0,0 @@
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 DELETED
@@ -1,27 +0,0 @@
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 DELETED
@@ -1,27 +0,0 @@
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).include?("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")
data/bin/yard DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'yard' 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("yard", "yard")