checkoff 0.5.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +119 -12
  3. data/.envrc +2 -0
  4. data/.git-hooks/pre_commit/circle_ci.rb +21 -0
  5. data/.gitignore +50 -1
  6. data/.overcommit.yml +53 -0
  7. data/.rubocop.yml +64 -168
  8. data/.yamllint.yml +8 -0
  9. data/CODE_OF_CONDUCT.md +120 -36
  10. data/DEVELOPMENT.md +28 -0
  11. data/Gemfile.lock +130 -0
  12. data/{LICENSE.txt → LICENSE} +7 -6
  13. data/Makefile +48 -18
  14. data/README.md +15 -2
  15. data/Rakefile +2 -9
  16. data/bin/bump +29 -0
  17. data/bin/checkoff +29 -0
  18. data/bin/overcommit +29 -0
  19. data/bin/rake +29 -0
  20. data/checkoff.gemspec +9 -5
  21. data/coverage/.last_run.json +2 -1
  22. data/docs/cookiecutter_input.json +13 -0
  23. data/fix.sh +299 -0
  24. data/lib/checkoff/cli.rb +9 -1
  25. data/lib/checkoff/config_loader.rb +43 -3
  26. data/lib/checkoff/projects.rb +5 -5
  27. data/lib/checkoff/sections.rb +48 -11
  28. data/lib/checkoff/tasks.rb +1 -1
  29. data/lib/checkoff/version.rb +1 -1
  30. data/lib/checkoff/workspaces.rb +4 -3
  31. data/metrics/bigfiles_high_water_mark +1 -1
  32. data/metrics/rubocop_high_water_mark +1 -1
  33. data/{lib/tasks → rakelib}/ci.rake +0 -0
  34. data/{lib/tasks → rakelib}/clear_metrics.rake +1 -1
  35. data/{lib/tasks → rakelib}/default.rake +0 -0
  36. data/rakelib/gem_tasks.rake +3 -0
  37. data/{lib/tasks → rakelib}/localtest.rake +1 -1
  38. data/rakelib/overcommit.rake +6 -0
  39. data/rakelib/quality.rake +4 -0
  40. data/{lib/tasks → rakelib}/test.rake +0 -0
  41. data/rakelib/undercover.rake +8 -0
  42. data/requirements_dev.txt +2 -0
  43. metadata +93 -25
  44. data/.ruby-version +0 -1
  45. data/.travis.yml +0 -22
  46. data/lib/tasks/feature.rake +0 -9
  47. data/lib/tasks/quality.rake +0 -9
  48. data/lib/tasks/spec.rake +0 -9
data/.yamllint.yml ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ # https://yamllint.readthedocs.io/en/stable/configuration.html
3
+ extends: default
4
+
5
+ rules:
6
+ comments: disable
7
+ line-length:
8
+ max: 120
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,49 +1,133 @@
1
- # Contributor Code of Conduct
2
1
 
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
2
+ # Contributor Covenant Code of Conduct
7
3
 
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
4
+ ## Our Pledge
12
5
 
13
- Examples of unacceptable behavior by participants include:
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual identity
11
+ and orientation.
14
12
 
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the
27
+ overall community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or
32
+ advances of any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
18
34
  * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
35
+ * Publishing others' private information, such as a physical or email
36
+ address, without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
22
46
 
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
28
51
 
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
52
+ ## Scope
33
53
 
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
36
61
 
37
62
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at vince@broz.cc. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
63
+ reported to the community leaders responsible for enforcement at
64
+ [INSERT CONTACT METHOD].
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
115
+
116
+ ## Attribution
43
117
 
44
118
  This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
119
+ version 2.0, available at
120
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
+ at [https://www.contributor-covenant.org/translations][translations].
47
128
 
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
data/DEVELOPMENT.md ADDED
@@ -0,0 +1,28 @@
1
+ # Development
2
+
3
+ ## fix.sh
4
+
5
+ If you want to use rbenv/pyenv/etc to manage versions of tools,
6
+ there's a `fix.sh` script which may be what you'd like to install
7
+ dependencies.
8
+
9
+ ## Overcommit
10
+
11
+ This project uses [overcommit](https://github.com/sds/overcommit) for
12
+ quality checks. `bundle exec overcommit --install` will install it.
13
+
14
+ ## direnv
15
+
16
+ This project uses direnv to manage environment variables used during
17
+ development. See the `.envrc` file for detail.
18
+
19
+ ## Publishing
20
+
21
+ To publish new version as a maintainer:
22
+
23
+ ```sh
24
+ git log "v$(bump current)..."
25
+ # Set type_of_bump to patch, minor, or major
26
+ bump --tag --tag-prefix=v ${type_of_bump:?}
27
+ rake release
28
+ ```
data/Gemfile.lock ADDED
@@ -0,0 +1,130 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ checkoff (0.10.0)
5
+ activesupport
6
+ asana (> 0.10.0)
7
+ cache_method
8
+ dalli
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activesupport (6.1.3.2)
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ zeitwerk (~> 2.3)
19
+ asana (0.10.3)
20
+ faraday (~> 1.0)
21
+ faraday_middleware (~> 1.0)
22
+ faraday_middleware-multi_json (~> 0.0)
23
+ oauth2 (~> 1.4)
24
+ ast (2.4.2)
25
+ bump (0.10.0)
26
+ cache (0.4.1)
27
+ cache_method (0.2.7)
28
+ cache (>= 0.2.1)
29
+ childprocess (4.0.0)
30
+ concurrent-ruby (1.1.8)
31
+ dalli (2.7.11)
32
+ docile (1.3.4)
33
+ faraday (1.4.1)
34
+ faraday-excon (~> 1.1)
35
+ faraday-net_http (~> 1.0)
36
+ faraday-net_http_persistent (~> 1.1)
37
+ multipart-post (>= 1.2, < 3)
38
+ ruby2_keywords (>= 0.0.4)
39
+ faraday-excon (1.1.0)
40
+ faraday-net_http (1.0.1)
41
+ faraday-net_http_persistent (1.1.0)
42
+ faraday_middleware (1.0.0)
43
+ faraday (~> 1.0)
44
+ faraday_middleware-multi_json (0.0.6)
45
+ faraday_middleware
46
+ multi_json
47
+ i18n (1.8.10)
48
+ concurrent-ruby (~> 1.0)
49
+ imagen (0.1.8)
50
+ parser (>= 2.5, != 2.5.1.1)
51
+ iniparse (1.5.0)
52
+ jwt (2.2.3)
53
+ minitest (5.14.4)
54
+ minitest-profile (0.0.2)
55
+ mocha (1.12.0)
56
+ multi_json (1.15.0)
57
+ multi_xml (0.6.0)
58
+ multipart-post (2.1.1)
59
+ oauth2 (1.4.7)
60
+ faraday (>= 0.8, < 2.0)
61
+ jwt (>= 1.0, < 3.0)
62
+ multi_json (~> 1.3)
63
+ multi_xml (~> 0.5)
64
+ rack (>= 1.2, < 3)
65
+ overcommit (0.57.0)
66
+ childprocess (>= 0.6.3, < 5)
67
+ iniparse (~> 1.4)
68
+ parallel (1.20.1)
69
+ parser (3.0.1.1)
70
+ ast (~> 2.4.1)
71
+ rack (2.2.3)
72
+ rainbow (3.0.0)
73
+ rake (13.0.3)
74
+ regexp_parser (2.1.1)
75
+ rexml (3.2.5)
76
+ rubocop (1.14.0)
77
+ parallel (~> 1.10)
78
+ parser (>= 3.0.0.0)
79
+ rainbow (>= 2.2.2, < 4.0)
80
+ regexp_parser (>= 1.8, < 3.0)
81
+ rexml
82
+ rubocop-ast (>= 1.5.0, < 2.0)
83
+ ruby-progressbar (~> 1.7)
84
+ unicode-display_width (>= 1.4.0, < 3.0)
85
+ rubocop-ast (1.5.0)
86
+ parser (>= 3.0.1.1)
87
+ rubocop-minitest (0.12.1)
88
+ rubocop (>= 0.90, < 2.0)
89
+ rubocop-rake (0.5.1)
90
+ rubocop
91
+ ruby-progressbar (1.11.0)
92
+ ruby2_keywords (0.0.4)
93
+ rugged (1.1.0)
94
+ simplecov (0.21.2)
95
+ docile (~> 1.1)
96
+ simplecov-html (~> 0.11)
97
+ simplecov_json_formatter (~> 0.1)
98
+ simplecov-html (0.12.3)
99
+ simplecov_json_formatter (0.1.3)
100
+ tzinfo (2.0.4)
101
+ concurrent-ruby (~> 1.0)
102
+ undercover (0.4.3)
103
+ imagen (>= 0.1.8)
104
+ rainbow (>= 2.1, < 4.0)
105
+ rugged (>= 0.27, < 1.2)
106
+ unicode-display_width (2.0.0)
107
+ zeitwerk (2.4.2)
108
+
109
+ PLATFORMS
110
+ ruby
111
+ x86_64-darwin-19
112
+ x86_64-darwin-20
113
+ x86_64-linux
114
+
115
+ DEPENDENCIES
116
+ bump
117
+ bundler
118
+ checkoff!
119
+ minitest-profile
120
+ mocha
121
+ overcommit
122
+ rake (~> 13.0)
123
+ rubocop
124
+ rubocop-minitest
125
+ rubocop-rake
126
+ simplecov
127
+ undercover
128
+
129
+ BUNDLED WITH
130
+ 2.2.11
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2016 Vince Broz
3
+ Copyright (c) 2021, 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
@@ -9,13 +9,14 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/Makefile CHANGED
@@ -1,27 +1,57 @@
1
- .PHONY: spec feature
1
+ .PHONY: clean test help quality localtest spec feature
2
+ .DEFAULT_GOAL := default
2
3
 
3
- all: localtest
4
+ define PRINT_HELP_PYSCRIPT
5
+ import re, sys
4
6
 
5
- localtest:
6
- @bundle exec rake localtest
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
7
14
 
8
- feature:
9
- @bundle exec rake feature
15
+ help:
16
+ @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
10
17
 
11
- spec:
12
- @bundle exec rake spec
18
+ default: localtest ## run default typechecking and tests
13
19
 
14
- rubocop:
15
- @bundle exec rake rubocop
20
+ requirements_dev.txt.installed: requirements_dev.txt
21
+ pip install -q --disable-pip-version-check -r requirements_dev.txt
22
+ touch requirements_dev.txt.installed
16
23
 
17
- punchlist:
18
- @bundle exec rake punchlist
24
+ pip_install: requirements_dev.txt.installed ## Install Python dependencies
19
25
 
20
- pronto:
21
- @bundle exec rake pronto
26
+ Gemfile.lock:
27
+ bundle install
22
28
 
23
- bigfiles:
24
- @bundle exec rake bigfiles
29
+ Gemfile.lock.installed: Gemfile.lock
30
+ bundle install
31
+ touch Gemfile.lock.installed
25
32
 
26
- quality:
27
- @bundle exec rake quality
33
+ bundle_install: Gemfile.lock.installed ## Install Ruby dependencies
34
+
35
+ clean: ## remove all built artifacts
36
+
37
+ quality: ## run precommit quality checks
38
+ bundle exec overcommit --run
39
+
40
+ test: ## Run lower-level tests
41
+ @bundle exec rake test
42
+
43
+ localtest: test quality feature ## run default local actions
44
+
45
+ update_from_cookiecutter: ## Bring in changes from template project used to create this repo
46
+ bundle exec overcommit --uninstall
47
+ IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
48
+ git checkout cookiecutter-template && git push && git checkout main
49
+ git checkout main && git pull && git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M)
50
+ git merge cookiecutter-template || true
51
+ bundle exec overcommit --install
52
+ @echo
53
+ @echo "Please resolve any merge conflicts below and push up a PR with:"
54
+ @echo
55
+ @echo ' gh pr create --title "Update from cookiecutter" --body "Automated PR to update from cookiecutter boilerplate"'
56
+ @echo
57
+ @echo
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  Command-line and gem client for Asana (unofficial)
2
2
 
3
3
  [![Circle CI](https://circleci.com/gh/apiology/checkoff.svg?style=svg)](https://circleci.com/gh/apiology/checkoff)
4
- [![Travis CI](https://travis-ci.org/apiology/checkoff.svg?branch=master)](https://travis-ci.org/apiology/checkoff)
4
+ [![Travis CI](https://travis-ci.org/apiology/checkoff.svg?branch=main)](https://travis-ci.org/apiology/checkoff)
5
+
6
+ Command-line and gem client for Asana (unofficial)
5
7
 
6
8
  ## Using
7
9
 
@@ -15,7 +17,7 @@ View tasks:
15
17
 
16
18
  Let's say we have a project like this:
17
19
 
18
- ![project screenshot from asana.com](https://github.com/apiology/checkoff/raw/master/docs/example_project.png "Example project")
20
+ ![project screenshot from asana.com](https://github.com/apiology/checkoff/raw/main/docs/example_project.png "Example project")
19
21
 
20
22
  Checkoff outputs things in JSON. 'jq' is a great tool to use in combination:
21
23
 
@@ -126,9 +128,20 @@ my_tasks:
126
128
  personal_access_token: 'some_big_long_string_from_asana.com_here'
127
129
  ```
128
130
 
131
+ Alternately you can set environment variables to match - e.g., `ASANA__PERSONAL_ACCESS_TOKEN`
132
+
129
133
  ## Developing
130
134
 
131
135
  ```bash
132
136
  bundle install
133
137
  bundle exec exe/checkoff --help
134
138
  ```
139
+
140
+ To publish new version as a maintainer:
141
+
142
+ ```sh
143
+ git log "v$(bump current)..."
144
+ # Set type_of_bump to patch, minor, or major
145
+ bump --tag --tag-prefix=v ${type_of_bump:?}
146
+ rake release
147
+ ```