checkoff 0.222.0 → 0.225.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/attachments.rb +1 -0
  4. data/lib/checkoff/cli.rb +1 -1
  5. data/lib/checkoff/clients.rb +2 -1
  6. data/lib/checkoff/custom_fields.rb +2 -1
  7. data/lib/checkoff/events.rb +2 -1
  8. data/lib/checkoff/internal/asana_event_enrichment.rb +1 -0
  9. data/lib/checkoff/internal/asana_event_filter.rb +1 -0
  10. data/lib/checkoff/internal/config_loader.rb +2 -2
  11. data/lib/checkoff/internal/logging.rb +6 -5
  12. data/lib/checkoff/internal/project_hashes.rb +1 -0
  13. data/lib/checkoff/internal/project_selector_evaluator.rb +2 -1
  14. data/lib/checkoff/internal/project_timing.rb +1 -0
  15. data/lib/checkoff/internal/search_url/custom_field_param_converter.rb +1 -0
  16. data/lib/checkoff/internal/search_url/custom_field_variant.rb +1 -0
  17. data/lib/checkoff/internal/search_url/date_param_converter.rb +1 -0
  18. data/lib/checkoff/internal/search_url/parser.rb +1 -0
  19. data/lib/checkoff/internal/search_url/results_merger.rb +1 -0
  20. data/lib/checkoff/internal/search_url/simple_param_converter.rb +1 -0
  21. data/lib/checkoff/internal/search_url.rb +1 -0
  22. data/lib/checkoff/internal/section_selector_evaluator.rb +2 -1
  23. data/lib/checkoff/internal/selector_classes/common/function_evaluator.rb +1 -0
  24. data/lib/checkoff/internal/selector_classes/common.rb +1 -0
  25. data/lib/checkoff/internal/selector_classes/function_evaluator.rb +1 -0
  26. data/lib/checkoff/internal/selector_classes/project/function_evaluator.rb +1 -0
  27. data/lib/checkoff/internal/selector_classes/project.rb +1 -0
  28. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -1
  29. data/lib/checkoff/internal/selector_classes/section.rb +1 -0
  30. data/lib/checkoff/internal/selector_classes/task/function_evaluator.rb +1 -0
  31. data/lib/checkoff/internal/selector_classes/task.rb +1 -0
  32. data/lib/checkoff/internal/selector_evaluator.rb +5 -4
  33. data/lib/checkoff/internal/task_hashes.rb +1 -0
  34. data/lib/checkoff/internal/task_selector_evaluator.rb +2 -1
  35. data/lib/checkoff/internal/task_timing.rb +1 -0
  36. data/lib/checkoff/internal/thread_local.rb +1 -0
  37. data/lib/checkoff/monkeypatches/resource_marshalling.rb +1 -0
  38. data/lib/checkoff/my_tasks.rb +2 -1
  39. data/lib/checkoff/portfolios.rb +12 -9
  40. data/lib/checkoff/project_selectors.rb +1 -0
  41. data/lib/checkoff/projects.rb +3 -1
  42. data/lib/checkoff/resources.rb +1 -0
  43. data/lib/checkoff/section_selectors.rb +1 -0
  44. data/lib/checkoff/sections.rb +4 -4
  45. data/lib/checkoff/subtasks.rb +1 -0
  46. data/lib/checkoff/tags.rb +67 -17
  47. data/lib/checkoff/task_searches.rb +1 -0
  48. data/lib/checkoff/task_selectors.rb +1 -0
  49. data/lib/checkoff/tasks.rb +2 -2
  50. data/lib/checkoff/timelines.rb +1 -0
  51. data/lib/checkoff/timing.rb +1 -0
  52. data/lib/checkoff/version.rb +2 -1
  53. data/lib/checkoff/workspaces.rb +2 -1
  54. data/lib/checkoff.rb +1 -0
  55. data/rbi/checkoff.rbi +4529 -0
  56. data/sig/checkoff.rbs +3749 -0
  57. metadata +4 -205
  58. data/.circleci/config.yml +0 -291
  59. data/.envrc +0 -9
  60. data/.git-hooks/pre_commit/circle_ci.rb +0 -25
  61. data/.git-hooks/pre_commit/punchlist.rb +0 -51
  62. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -76
  63. data/.gitattributes +0 -6
  64. data/.gitignore +0 -61
  65. data/.markdownlint_style.rb +0 -3
  66. data/.mdlrc +0 -1
  67. data/.overcommit.yml +0 -114
  68. data/.rubocop.yml +0 -143
  69. data/.rubocop_todo.yml +0 -90
  70. data/.solargraph.yml +0 -35
  71. data/.yamllint.yml +0 -8
  72. data/CODE_OF_CONDUCT.md +0 -133
  73. data/CONTRIBUTING.rst +0 -75
  74. data/DEVELOPMENT.md +0 -69
  75. data/GLOSSARY.md +0 -16
  76. data/Gemfile +0 -66
  77. data/Gemfile.lock +0 -336
  78. data/LICENSE +0 -21
  79. data/Makefile +0 -121
  80. data/bin/brakeman +0 -27
  81. data/bin/bump +0 -29
  82. data/bin/checkoff +0 -29
  83. data/bin/console +0 -15
  84. data/bin/overcommit +0 -29
  85. data/bin/overcommit_branch +0 -114
  86. data/bin/rake +0 -29
  87. data/bin/rubocop +0 -27
  88. data/bin/setup +0 -8
  89. data/bin/solargraph +0 -27
  90. data/bin/sord +0 -27
  91. data/bin/spoom +0 -27
  92. data/bin/srb +0 -27
  93. data/bin/srb-rbi +0 -27
  94. data/bin/tapioca +0 -27
  95. data/bin/yard +0 -27
  96. data/config/annotations_asana.rb +0 -254
  97. data/config/annotations_misc.rb +0 -68
  98. data/config/env.1p +0 -2
  99. data/docs/.gitignore +0 -3
  100. data/docs/cookiecutter_input.json +0 -17
  101. data/docs/example_project.png +0 -0
  102. data/fix.sh +0 -534
  103. data/metrics/bigfiles_high_water_mark +0 -1
  104. data/metrics/brakeman_high_water_mark +0 -1
  105. data/metrics/bundle-audit_high_water_mark +0 -1
  106. data/metrics/cane_high_water_mark +0 -1
  107. data/metrics/eslint_high_water_mark +0 -1
  108. data/metrics/flake8_high_water_mark +0 -1
  109. data/metrics/flay_high_water_mark +0 -1
  110. data/metrics/flog_high_water_mark +0 -1
  111. data/metrics/jscs_high_water_mark +0 -1
  112. data/metrics/mdl_high_water_mark +0 -1
  113. data/metrics/pep8_high_water_mark +0 -1
  114. data/metrics/punchlist_high_water_mark +0 -1
  115. data/metrics/pycodestyle_high_water_mark +0 -1
  116. data/metrics/rails_best_practices_high_water_mark +0 -1
  117. data/metrics/rubocop_high_water_mark +0 -1
  118. data/metrics/scalastyle_high_water_mark +0 -1
  119. data/metrics/shellcheck_high_water_mark +0 -1
  120. data/package.json +0 -9
  121. data/rakelib/citest.rake +0 -4
  122. data/rakelib/clear_metrics.rake +0 -9
  123. data/rakelib/console.rake +0 -15
  124. data/rakelib/default.rake +0 -4
  125. data/rakelib/doc.rake +0 -6
  126. data/rakelib/gem_tasks.rake +0 -3
  127. data/rakelib/localtest.rake +0 -4
  128. data/rakelib/overcommit.rake +0 -6
  129. data/rakelib/quality.rake +0 -4
  130. data/rakelib/repl.rake +0 -4
  131. data/rakelib/test.rake +0 -10
  132. data/rakelib/trigger_next_builds.rake +0 -7
  133. data/rakelib/undercover.rake +0 -8
  134. data/requirements_dev.txt +0 -2
  135. data/sorbet/config +0 -4
  136. data/sorbet/rbi/annotations/.gitattributes +0 -1
  137. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  138. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  139. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  140. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  141. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  142. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  143. data/sorbet/rbi/dsl/.gitattributes +0 -1
  144. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  145. data/sorbet/rbi/gems/.gitattributes +0 -1
  146. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  147. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  148. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  149. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  150. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  151. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  152. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  153. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  154. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  155. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  156. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  157. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  158. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  159. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  160. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  161. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  162. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  163. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  164. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  165. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  166. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  167. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  168. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  169. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  170. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  171. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  172. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  173. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  174. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  175. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  176. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  177. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  178. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  179. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  180. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  181. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  182. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  183. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  184. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  185. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  186. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  187. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  188. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  189. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  190. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  191. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  192. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  193. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  194. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  195. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  196. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  197. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  198. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  199. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  200. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  201. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  202. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  203. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  204. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  205. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  206. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  207. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  208. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  209. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  210. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  211. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  212. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  213. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  214. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  215. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  216. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  217. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  218. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  219. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  220. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  221. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  222. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  223. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  224. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  225. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  226. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  227. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  228. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  229. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  230. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7061
  231. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  232. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  233. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  234. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  235. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  236. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  237. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  238. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  239. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  240. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  241. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  242. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  243. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  244. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  245. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  246. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  247. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  248. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  249. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  250. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  251. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  252. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  253. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  254. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  255. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  256. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  257. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  258. data/sorbet/rbi/todo.rbi +0 -11
  259. data/sorbet/tapioca/config.yml +0 -13
  260. data/sorbet/tapioca/require.rb +0 -4
data/fix.sh DELETED
@@ -1,534 +0,0 @@
1
- #!/bin/bash -eu
2
-
3
- if [ -n "${FIX_SH_TIMING_LOG+x}" ]; then
4
- rm -f "${FIX_SH_TIMING_LOG}"
5
- if ! type gdate >/dev/null 2>&1; then sudo ln -sf /bin/date /bin/gdate; fi
6
- fi
7
-
8
- debug_timing() {
9
- if [ -n "${FIX_SH_TIMING_LOG+x}" ]; then
10
- # shellcheck disable=SC2034
11
- _lastcmd=$(gdate +%s%3N)
12
- last_command='start'
13
- # shellcheck disable=SC2154
14
- trap '_now=$(gdate +%s%3N); duration=$((_now - _lastcmd)); echo ${duration} ms: $last_command >> '"${FIX_SH_TIMING_LOG}"'; last_command="$BASH_COMMAND" >> '"${FIX_SH_TIMING_LOG}"'; _lastcmd=$_now' DEBUG
15
- fi
16
- }
17
-
18
- # copy this into any function you want to debug further
19
- debug_timing
20
-
21
- set -o pipefail
22
-
23
- apt_upgraded=0
24
-
25
- update_apt() {
26
- if [ "${apt_upgraded}" = 0 ]
27
- then
28
- sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
29
- apt_upgraded=1
30
- fi
31
- }
32
-
33
- install_rbenv() {
34
- if [ "$(uname)" == "Darwin" ]
35
- then
36
- HOMEBREW_NO_AUTO_UPDATE=1 brew install rbenv || true
37
- if ! type rbenv 2>/dev/null
38
- then
39
- # https://github.com/pyenv/pyenv-installer/blob/master/bin/pyenv-installer
40
- >&2 cat <<EOF
41
- WARNING: seems you still have not added 'rbenv' to the load path.
42
-
43
- # Load rbenv automatically by adding
44
- # the following to ~/.bashrc:
45
-
46
- export PATH="$HOME/.rbenv/bin:$PATH"
47
- eval "$(rbenv init -)"
48
- EOF
49
- fi
50
- else
51
- git clone https://github.com/rbenv/rbenv.git ~/.rbenv
52
- fi
53
- }
54
-
55
- set_rbenv_env_variables() {
56
- export PATH="${HOME}/.rbenv/bin:$PATH"
57
- eval "$(rbenv init -)"
58
- }
59
-
60
- install_ruby_build() {
61
- if [ "$(uname)" == "Darwin" ]
62
- then
63
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ruby-build || true
64
- else
65
- mkdir -p "$(rbenv root)"/plugins
66
- git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
67
- fi
68
- }
69
-
70
- ensure_ruby_build() {
71
- if ! type ruby-build >/dev/null 2>&1 && ! [ -d "${HOME}/.rbenv/plugins/ruby-build" ]
72
- then
73
- install_ruby_build
74
- fi
75
- }
76
-
77
- ensure_rbenv() {
78
- if ! type rbenv >/dev/null 2>&1 && ! [ -f "${HOME}/.rbenv/bin/rbenv" ]
79
- then
80
- install_rbenv
81
- fi
82
-
83
- set_rbenv_env_variables
84
-
85
- ensure_ruby_build
86
- }
87
-
88
- latest_ruby_version() {
89
- major_minor=${1}
90
-
91
- # Double check that this command doesn't error out under -e
92
- rbenv install --list >/dev/null 2>&1
93
-
94
- # not sure why, but 'rbenv install --list' below exits with error code
95
- # 1...after providing the same output the previous line gave when it
96
- # exited with error code 0.
97
- #
98
- # https://github.com/rbenv/rbenv/issues/1441
99
- set +e
100
- rbenv install --list 2>/dev/null | cat | grep "^${major_minor}."
101
- set -e
102
- }
103
-
104
- ensure_dev_library() {
105
- header_file_name=${1:?header file name}
106
- homebrew_package=${2:?homebrew package}
107
- apt_package=${3:-${homebrew_package}}
108
- if ! [ -f /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/"${header_file_name}" ] && \
109
- ! [ -f /opt/homebrew/include/"${header_file_name}" ] && \
110
- ! [ -f /usr/include/"${header_file_name}" ] && \
111
- ! [ -f /usr/include/x86_64-linux-gnu/"${header_file_name}" ] && \
112
- ! [ -f /usr/local/include/"${header_file_name}" ] && \
113
- ! [ -f /usr/local/opt/"${homebrew_package}"/include/"${header_file_name}" ]
114
- then
115
- install_package "${homebrew_package}" "${apt_package}"
116
- fi
117
- }
118
-
119
- ensure_binary_library() {
120
- library_base_name=${1:?library base name - like libfoo}
121
- homebrew_package=${2:?homebrew package}
122
- apt_package=${3:-${homebrew_package}}
123
- if ! [ -f /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/"${library_base_name}*.dylib" ] && \
124
- ! [ -f /opt/homebrew/lib/"${library_base_name}*.dylib" ] && \
125
- ! [ -f /usr/lib/"${library_base_name}.so" ] && \
126
- ! [ -f /usr/lib/x86_64-linux-gnu/"${library_base_name}.so" ] && \
127
- ! [ -f /usr/local/lib/"${library_base_name}.so" ] && \
128
- ! [ -f /usr/local/opt/"${homebrew_package}/lib/${library_base_name}*.dylib" ]
129
- then
130
- if ! compgen -G "/opt/homebrew/Cellar/${homebrew_package}"*/*/"lib/${library_base_name}"*.dylib >/dev/null 2>&1
131
- then
132
- install_package "${homebrew_package}" "${apt_package}"
133
- fi
134
- fi
135
- }
136
-
137
- ensure_ruby_build_requirements() {
138
- ensure_dev_library readline/readline.h readline libreadline-dev
139
- ensure_dev_library zlib.h zlib zlib1g-dev
140
- ensure_dev_library openssl/ssl.h openssl libssl-dev
141
- ensure_dev_library yaml.h libyaml libyaml-dev
142
- }
143
-
144
- ensure_latest_ruby_build_definitions() {
145
- ensure_rbenv
146
-
147
- # last_pulled_unix_epoch="$(stat -f '%m' "$(rbenv root)"/plugins/ruby-build/.git/FETCH_HEAD)"
148
- # # if not pulled in last 24 hours
149
- # if [ $(( $(date +%s) - last_pulled_unix_epoch )) -gt $(( 24 * 60 * 60 )) ]
150
- # then
151
- git -C "$HOME"/.rbenv/plugins/ruby-build pull
152
- # fi
153
- }
154
-
155
- # https://stackoverflow.com/questions/2829613/how-do-you-tell-if-a-string-contains-another-string-in-posix-sh
156
- contains() {
157
- string="$1"
158
- substring="$2"
159
- if [ "${string#*"$substring"}" != "$string" ]; then
160
- return 0 # $substring is in $string
161
- else
162
- return 1 # $substring is not in $string
163
- fi
164
- }
165
-
166
- # You can find out which feature versions are still supported / have
167
- # been release here: https://www.ruby-lang.org/en/downloads/
168
- ensure_ruby_versions() {
169
- ensure_latest_ruby_build_definitions
170
-
171
- # You can find out which feature versions are still supported / have
172
- # been release here: https://www.ruby-lang.org/en/downloads/
173
- ruby_versions="$(latest_ruby_version 3.1)"
174
-
175
- installed_ruby_versions="$(rbenv versions --bare --skip-aliases)"
176
-
177
- echo "Latest Ruby versions: ${ruby_versions}"
178
-
179
- for ver in $ruby_versions
180
- do
181
- if ! contains "${installed_ruby_versions}"$'\n' "${ver}"$'\n'; then
182
- echo "Installing Ruby version $ver - existing versions: $installed_ruby_versions"
183
- ensure_ruby_build_requirements
184
-
185
- rbenv install -s "${ver}"
186
- hash -r # ensure we are seeing latest bundler etc
187
- else
188
- echo "Found Ruby version $ver already installed"
189
- fi
190
- done
191
- }
192
-
193
- ensure_bundle() {
194
- # Not sure why this is needed a second time, but it seems to be?
195
- #
196
- # https://app.circleci.com/pipelines/github/apiology/source_finder/21/workflows/88db659f-a4f4-4751-abc0-46f5929d8e58/jobs/107
197
- set_rbenv_env_variables
198
-
199
- bundler_version=$(ruby -e 'require "rubygems/bundler_version_finder"; puts Gem::BundlerVersionFinder.bundler_version')
200
- # if bundler_version is empty
201
- if [ -z "${bundler_version}" ]
202
- then
203
- bundler_version=$(bundle --version | cut -d ' ' -f 3)
204
- fi
205
- # if bundler_version is still empty
206
- if [ -z "${bundler_version}" ]
207
- then
208
- gem install bundler
209
- bundler_version=$(bundle --version | cut -d ' ' -f 3)
210
- fi
211
- echo "Bundler version: ${bundler_version}"
212
- bundler_version_major=$(cut -d. -f1 <<< "${bundler_version}")
213
- bundler_version_minor=$(cut -d. -f2 <<< "${bundler_version}")
214
- bundler_version_patch=$(cut -d. -f3 <<< "${bundler_version}")
215
- #
216
- # Version 2.5.5 fixed an issue in 2.2.22 with the 'bump' gem:
217
- #
218
- # https://app.circleci.com/pipelines/github/apiology/checkoff/1281/workflows/f667f909-c3fc-4ae2-8593-dde2b588a7a7/jobs/2491
219
- need_better_bundler=false
220
- if [ "${bundler_version_major}" -lt 2 ]
221
- then
222
- need_better_bundler=true
223
- elif [ "${bundler_version_major}" -eq 2 ]
224
- then
225
- if [ "${bundler_version_minor}" -lt 5 ]
226
- then
227
- need_better_bundler=true
228
- elif [ "${bundler_version_minor}" -eq 5 ]
229
- then
230
- if [ "${bundler_version_patch}" -lt 5 ]
231
- then
232
- need_better_bundler=true
233
- fi
234
- fi
235
- fi
236
- if [ "${need_better_bundler}" = true ]
237
- then
238
- >&2 echo "Original bundler version: ${bundler_version}"
239
- # need to do this first before 'bundle update --bundler' will work
240
- make bundle_install
241
- bundle update --bundler
242
- gem install bundler:2.5.5
243
- >&2 echo "Updated bundler version: $(bundle --version)"
244
- # ensure next step installs fresh bundle
245
- rm -f Gemfile.lock.installed
246
- fi
247
- # https://bundler.io/v2.0/bundle_lock.html#SUPPORTING-OTHER-PLATFORMS
248
- #
249
- # "If you want your bundle to support platforms other than the one
250
- # you're running locally, you can run bundle lock --add-platform
251
- # PLATFORM to add PLATFORM to the lockfile, force bundler to
252
- # re-resolve and consider the new platform when picking gems, all
253
- # without needing to have a machine that matches PLATFORM handy to
254
- # install those platform-specific gems on.'
255
- #
256
- # This affects nokogiri, which will try to reinstall itself in
257
- # Docker builds where it's already installed if this is not run.
258
- PLATFORMS="ruby arm64-darwin-23 x86_64-darwin-23 x86_64-linux x86_64-linux-musl aarch64-linux arm64-linux"
259
- for platform in ${PLATFORMS}
260
- do
261
- if ! grep -q "^ ${platform}$" Gemfile.lock
262
- then
263
- bundle lock --add-platform "${platform}"
264
- fi
265
- done
266
- ls -l
267
- make bundle_install
268
- }
269
-
270
- set_ruby_local_version() {
271
- latest_ruby_version="$(cut -d' ' -f1 <<< "${ruby_versions}")"
272
- echo "${latest_ruby_version}" > .ruby-version
273
- }
274
-
275
- latest_python_version() {
276
- major_minor=${1}
277
- # https://stackoverflow.com/questions/369758/how-to-trim-whitespace-from-a-bash-variable
278
- pyenv install --list | grep "^ ${major_minor}." | grep -v -- -dev | tail -1 | xargs
279
- }
280
-
281
- install_pyenv() {
282
- if [ "$(uname)" == "Darwin" ]
283
- then
284
- HOMEBREW_NO_AUTO_UPDATE=1 brew install pyenv || true
285
- if ! type pyenv 2>/dev/null
286
- then
287
- # https://github.com/pyenv/pyenv-installer/blob/master/bin/pyenv-installer
288
- >&2 cat <<EOF
289
- WARNING: seems you still have not added 'pyenv' to the load path.
290
-
291
- # Load pyenv automatically by adding
292
- # the following to ~/.bashrc:
293
-
294
- export PYENV_ROOT="${HOME}/.pyenv"
295
- export PATH="${PYENV_ROOT}/bin:$PATH"
296
- eval "$(pyenv init --path)"
297
- eval "$(pyenv virtualenv-init -)"
298
- EOF
299
- fi
300
- else
301
- curl https://pyenv.run | bash
302
- fi
303
- }
304
-
305
- set_pyenv_env_variables() {
306
- # looks like pyenv scripts aren't -u clean:
307
- #
308
- # https://app.circleci.com/pipelines/github/apiology/cookiecutter-pypackage/15/workflows/10506069-7662-46bd-b915-2992db3f795b/jobs/15
309
- set +u
310
- export PYENV_ROOT="${HOME}/.pyenv"
311
- export PATH="${PYENV_ROOT}/bin:$PATH"
312
- eval "$(pyenv init --path)"
313
- eval "$(pyenv virtualenv-init -)"
314
- set -u
315
- }
316
-
317
- ensure_pyenv() {
318
- if ! type pyenv >/dev/null 2>&1 && ! [ -f "${HOME}/.pyenv/bin/pyenv" ]
319
- then
320
- install_pyenv
321
- fi
322
-
323
- if ! type pyenv >/dev/null 2>&1
324
- then
325
- set_pyenv_env_variables
326
- fi
327
- }
328
-
329
- ensure_package() {
330
- homebrew_package=${1:?homebrew package}
331
- apt_package=${2:-${homebrew_package}}
332
- binary=${3:-${homebrew_package}}
333
- if ! [ -f /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/bin/"${binary}" ] && \
334
- ! [ -f /opt/homebrew/bin/"${binary}" ] && \
335
- ! [ -f /usr/bin/"${binary}" ] && \
336
- ! [ -f /usr/local/bin/"${binary}" ] && \
337
- ! [ -f /usr/local/opt/"${homebrew_package}"/bin/"${binary}" ]
338
- then
339
- install_package "${homebrew_package}" "${apt_package}"
340
- fi
341
- }
342
-
343
- install_package() {
344
- homebrew_package=${1:?homebrew package}
345
- apt_package=${2:-${homebrew_package}}
346
- if [ "$(uname)" == "Darwin" ]
347
- then
348
- HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_UPGRADE=1 brew install "${homebrew_package}"
349
- elif type apt-get >/dev/null 2>&1
350
- then
351
- if ! dpkg -s "${apt_package}" >/dev/null
352
- then
353
- update_apt
354
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${apt_package}"
355
- fi
356
- else
357
- >&2 echo "Teach me how to install packages on this plaform"
358
- exit 1
359
- fi
360
- }
361
-
362
- update_package() {
363
- homebrew_package=${1:?homebrew package}
364
- apt_package=${2:-${homebrew_package}}
365
- if [ "$(uname)" == "Darwin" ]
366
- then
367
- brew install "${homebrew_package}"
368
- elif type apt-get >/dev/null 2>&1
369
- then
370
- update_apt
371
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${apt_package}"
372
- else
373
- >&2 echo "Teach me how to install packages on this plaform"
374
- exit 1
375
- fi
376
- }
377
-
378
- ensure_python_build_requirements() {
379
- ensure_dev_library zlib.h zlib zlib1g-dev
380
- ensure_dev_library bzlib.h bzip2 libbz2-dev
381
- ensure_dev_library openssl/ssl.h openssl libssl-dev
382
- ensure_dev_library ffi/ffi.h libffi libffi-dev
383
- ensure_dev_library sqlite3.h sqlite3 libsqlite3-dev
384
- ensure_dev_library lzma.h xz liblzma-dev
385
- ensure_dev_library readline/readline.h readline libreadline-dev
386
- }
387
-
388
- # You can find out which feature versions are still supported / have
389
- # been release here: https://www.python.org/downloads/
390
- ensure_python_versions() {
391
- # You can find out which feature versions are still supported / have
392
- # been release here: https://www.python.org/downloads/
393
- python_versions="$(latest_python_version 3.12)"
394
-
395
- echo "Latest Python versions: ${python_versions}"
396
-
397
- installed_python_versions="$(pyenv versions --skip-envs --skip-aliases --bare)"
398
-
399
- for ver in $python_versions
400
- do
401
- if ! contains "${installed_python_versions}"$'\n' "${ver}"$'\n'; then
402
- echo "Installing Python version $ver - existing versions: $installed_python_versions"
403
- ensure_python_build_requirements
404
-
405
- if [ "$(uname)" == Darwin ]
406
- then
407
- if [ -z "${HOMEBREW_OPENSSL_PREFIX:-}" ]
408
- then
409
- HOMEBREW_OPENSSL_PREFIX="$(brew --prefix openssl)"
410
- fi
411
- pyenv_install() {
412
- CFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include -I${HOMEBREW_OPENSSL_PREFIX}/include" LDFLAGS="-L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib -L${HOMEBREW_OPENSSL_PREFIX}/lib" pyenv install --skip-existing "$@"
413
- }
414
-
415
- major_minor="$(cut -d. -f1-2 <<<"${ver}")"
416
- pyenv_install "${ver}"
417
- else
418
- pyenv install -s "${ver}"
419
- fi
420
- hash -r
421
- else
422
- echo "Found Python version $ver already installed"
423
- fi
424
- done
425
- }
426
-
427
- ensure_pyenv_virtualenvs() {
428
- latest_python_version="$(cut -d' ' -f1 <<< "${python_versions}")"
429
- virtualenv_name="checkoff-${latest_python_version}"
430
- if ! [ -d ~/".pyenv/versions/${virtualenv_name}" ]
431
- then
432
- pyenv virtualenv "${latest_python_version}" "${virtualenv_name}" || true
433
- fi
434
- # You can use this for your global stuff!
435
- if ! [ -d ~/".pyenv/versions/mylibs" ]
436
- then
437
- pyenv virtualenv "${latest_python_version}" mylibs || true
438
- fi
439
- # shellcheck disable=SC2086
440
- pyenv local "${virtualenv_name}" ${python_versions} mylibs
441
- }
442
-
443
- ensure_pip_and_wheel() {
444
- # https://cve.mitre.org/cgi-bin/cvename.cgi?name=2023-5752
445
- pip_version=$(python -c "import pip; print(pip.__version__)" | cut -d' ' -f2)
446
- major_pip_version=$(cut -d '.' -f 1 <<< "${pip_version}")
447
- minor_pip_version=$(cut -d '.' -f 2 <<< "${pip_version}")
448
- if [[ major_pip_version -lt 23 ]]
449
- then
450
- pip install 'pip>=23.3'
451
- elif [[ major_pip_version -eq 23 ]] && [[ minor_pip_version -lt 3 ]]
452
- then
453
- pip install 'pip>=23.3'
454
- fi
455
- # wheel is helpful for being able to cache long package builds
456
- type wheel >/dev/null 2>&1 || pip install wheel
457
- }
458
-
459
- ensure_python_requirements() {
460
- make pip_install
461
- }
462
-
463
- ensure_shellcheck() {
464
- if ! type shellcheck >/dev/null 2>&1
465
- then
466
- install_package shellcheck
467
- fi
468
- }
469
-
470
- ensure_overcommit() {
471
- # don't run if we're in the middle of a cookiecutter child project
472
- # test, or otherwise don't have a Git repo to install hooks into...
473
- if [ -d .git ]
474
- then
475
- bundle exec overcommit --install
476
- bundle exec overcommit --sign
477
- bundle exec overcommit --sign pre-commit
478
- else
479
- >&2 echo 'Not in a git repo; not installing git hooks'
480
- fi
481
- }
482
-
483
- ensure_rugged_packages_installed() {
484
- # only needed if we don't already have rugged installed
485
- if ! ls vendor/bundle/ruby/*/gems/rugged-* &>/dev/null
486
- then
487
- echo "Current directory"
488
- pwd
489
- echo "Vendor dir"
490
- ls -l vendor || true
491
- echo "List of vendor/bundle/gems:"
492
- ls vendor/bundle/gems || true
493
- echo "Did not find rugged gem installed; installing packages needed for rugged"
494
- echo "Installed gems:"
495
- gem list
496
- echo "Gem environment:"
497
- gem environment
498
- echo "Bundle list:"
499
- bundle list || true
500
- ensure_binary_library libicuio icu4c libicu-dev # needed by rugged, needed by undercover
501
- ensure_package pkg-config # needed by rugged, needed by undercover
502
- ensure_package cmake # needed by rugged, needed by undercover
503
- fi
504
- }
505
-
506
- ensure_rbenv
507
-
508
- ensure_types_built() {
509
- make build-typecheck
510
- }
511
-
512
- ensure_ruby_versions
513
-
514
- set_ruby_local_version
515
-
516
- ensure_rugged_packages_installed
517
-
518
- ensure_bundle
519
-
520
- ensure_pyenv
521
-
522
- ensure_python_versions
523
-
524
- ensure_pyenv_virtualenvs
525
-
526
- ensure_pip_and_wheel
527
-
528
- ensure_python_requirements
529
-
530
- ensure_shellcheck
531
-
532
- ensure_types_built
533
-
534
- ensure_overcommit
@@ -1 +0,0 @@
1
- 488
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 7
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 3
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 6
@@ -1 +0,0 @@
1
- 0
@@ -1 +0,0 @@
1
- 0
data/package.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "remarkConfig": {
3
- "settings": {
4
- "bullet": "*",
5
- "listItemIndent": "one"
6
- },
7
- "plugins": []
8
- }
9
- }
data/rakelib/citest.rake DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Run tasks to be done during a continuous integration (CI) build'
4
- task citest: %i[clear_metrics test undercover]
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Ensure that any locally ratcheted coverage metrics are cleared back ' \
4
- 'to git baseline'
5
- task :clear_metrics do |_t|
6
- # Without this old lines which are removed are still counted,
7
- # leading to inconsistent coverage percentages between runs.
8
- raise unless system('rm -fr coverage/')
9
- end
data/rakelib/console.rake DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Load up checkoff in pry'
4
- task :console do |_t|
5
- puts 'Example:'
6
- puts
7
- puts '# https://www.rubydoc.info/github/Asana/ruby-asana/master'
8
- puts '> client = Checkoff::Clients.new.client'
9
- puts '# https://developers.asana.com/docs/input-output-options'
10
- puts '> workspace_gid = ENV.fetch("ASANA__DEFAULT_WORKSPACE_GID")'
11
- puts "> task = client.tasks.find_by_id('1199961990964812', options: { fields: ['dependencies'] })"
12
- puts '# Asana.md#ruby-asana / API shows how to manually call endpoints with a client'
13
- puts
14
- exec 'pry -I lib -r checkoff'
15
- end
data/rakelib/default.rake DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Standard build'
4
- task default: :localtest
data/rakelib/doc.rake DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Push documentation updates to Dropbox'
4
- task :doc do
5
- sh 'yard -p yard_templates -o docs/ --no-private'
6
- end
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Standard build when running on a workstation'
4
- task localtest: %i[clear_metrics test undercover quality]
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Run overcommit on current code'
4
- task :overcommit do
5
- sh 'overcommit --run'
6
- end
data/rakelib/quality.rake DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Run quality checks'
4
- task quality: :overcommit
data/rakelib/repl.rake DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Load up checkoff in pry'
4
- task repl: [:console]