checkoff 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57e69538d14498144e6587146af712357df75cbc88c9c6ed5aca9179d8c68ad0
4
- data.tar.gz: a61d58c6cd36f1cab26f8122207f5dfd0744a39bb17429e95b19d8ccd2e65a40
3
+ metadata.gz: 121d92b56f0936e25ff98efd5f601e9fea6cf6a71191f0ba7a2803785bcc1feb
4
+ data.tar.gz: e3b871d18fa8263e0d61df92e22b59a369b5f78e527a8da57ac0fb472db5c34d
5
5
  SHA512:
6
- metadata.gz: 0cfb597bbd0911486b1b4538ada6ecf9aa708bddc88c14722f554581304093b7278fa7a8204ac3ea96ed48b7ff4cc0b67474839556c05d7f097dff01e3b271d9
7
- data.tar.gz: e25f408dd5c067c6663a2eec4832c010f40a9423d35f031233c79d232719355a21a3b3232b31c03b0694a4e15b00ad4f3ce243229e8e8a68b6c19cca9dbd5560
6
+ metadata.gz: '0862ee2cd9aababfb015020a1c55e6f7a5027bc001b2ec6317b661b7407fcb095bb981f7d44ad251a50166edf674bc798f3629b986cece29eb30286f7be09fd0'
7
+ data.tar.gz: ebaed1748125699b93f3804ee79d2c33fdf560aa232e904a69fb1e55ad3520802096b35ea9a921e5b70c67f37a6c78ce3444606333e6ed81ca6f7e4912ae61b6
data/.circleci/config.yml CHANGED
@@ -2,6 +2,33 @@
2
2
  version: 2.1
3
3
 
4
4
  commands:
5
+ run_with_languages:
6
+ description: "Run the given command in an environment that includes relevant langauges in the PATH"
7
+ parameters:
8
+ command:
9
+ type: string
10
+ description: "What command to execute"
11
+ label:
12
+ type: string
13
+ description: "What to label the run"
14
+ default: <<parameters.command>>
15
+ steps:
16
+ - run:
17
+ name: <<parameters.label>>
18
+ command: |
19
+ export PATH="${HOME}/.pyenv/bin:${PATH}"
20
+ export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:${PATH}"
21
+ export PATH="${HOME}/project/node_modules/.bin:${PATH}"
22
+ eval "$(pyenv init -)"
23
+ eval "$(pyenv virtualenv-init -)"
24
+ eval "$(rbenv init -)"
25
+ export BUNDLE_PATH=vendor/bundle
26
+
27
+ <<parameters.command>>
28
+ environment:
29
+ # https://app.circleci.com/pipelines/github/apiology/cookiecutter-pypackage/4/workflows/29074dc8-944c-4600-8aaa-5116575fed90/jobs/4
30
+ "LC_ALL": "C.UTF-8"
31
+ "LANG": "C.UTF-8"
5
32
  set_up_environment:
6
33
  description: "Install source environment"
7
34
  steps:
@@ -11,8 +38,6 @@ commands:
11
38
  Gemfile.lock > Gemfile.lock.deversioned
12
39
  - restore_cache:
13
40
  key: gems-v4-{{ checksum "Gemfile.lock.deversioned" }}
14
- - restore_cache:
15
- key: ruby-and-python-v4-{{ checksum "fix.sh" }}
16
41
  - run:
17
42
  name: Initialize packages
18
43
  command: |
@@ -26,11 +51,6 @@ commands:
26
51
  >&2 echo "Please resolve changes to Gemfile.lock after bundle install to avoid caching difficulties"
27
52
  exit 1
28
53
  fi
29
- - save_cache:
30
- key: ruby-and-python-v4-{{ checksum "fix.sh" }}
31
- paths:
32
- - "/home/circleci/.rbenv"
33
- - "/home/circleci/.pyenv"
34
54
  - save_cache:
35
55
  key: gems-v4-{{ checksum "Gemfile.lock.deversioned" }}
36
56
  paths:
@@ -44,20 +64,9 @@ commands:
44
64
  description: "Run overcommit"
45
65
  steps:
46
66
  - set_up_environment
47
- - run:
48
- name: Download new circleci tool
67
+ - run_with_languages:
68
+ label: Run overcommit
49
69
  command: |
50
- curl -fLSs \
51
- https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo bash
52
- - run:
53
- name: Run overcommit
54
- command: |
55
- export PATH="${HOME}/.pyenv/bin:${PATH}"
56
- export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:${PATH}"
57
- eval "$(pyenv init -)"
58
- eval "$(pyenv virtualenv-init -)"
59
- eval "$(rbenv init -)"
60
- export BUNDLE_PATH=vendor/bundle
61
70
  # Coax overcommit into working
62
71
  git config --global user.email "test@test.test"
63
72
  git config --global user.name "Test Test"
@@ -65,10 +74,6 @@ commands:
65
74
  bundle exec overcommit --sign pre-commit
66
75
 
67
76
  bundle exec overcommit --run
68
- environment:
69
- # https://app.circleci.com/pipelines/github/apiology/cookiecutter-pypackage/4/workflows/29074dc8-944c-4600-8aaa-5116575fed90/jobs/4
70
- "LC_ALL": "C.UTF-8"
71
- "LANG": "C.UTF-8"
72
77
 
73
78
  jobs:
74
79
  overcommit:
@@ -91,16 +96,13 @@ jobs:
91
96
  - image: apiology/circleci:latest
92
97
  steps:
93
98
  - set_up_environment
94
- - run:
99
+ - run_with_languages:
100
+ label: Run tests
95
101
  command: |
96
- export PATH="${HOME}/.pyenv/bin:${PATH}"
97
- export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:${PATH}"
98
- eval "$(pyenv init -)"
99
- eval "$(pyenv virtualenv-init -)"
100
- eval "$(rbenv init -)"
101
- export BUNDLE_PATH=vendor/bundle
102
-
103
102
  make test
103
+ # https://github.com/bluelabsio/records-mover/blob/master/Makefile#L25
104
+ git status --porcelain coverage/.last_run.json
105
+ test -z "$(git status --porcelain coverage/.last_run.json)"
104
106
 
105
107
  workflows:
106
108
  version: 2
File without changes
data/.gitignore CHANGED
@@ -34,8 +34,17 @@ Temporary Items
34
34
  # IDE settings
35
35
  .vscode/
36
36
 
37
+ # Editor temp files
38
+ *~
39
+ \#*\#
40
+
41
+ # Used by Makefile to track what we have and haven't installed
42
+ Gemfile.lock.installed
43
+ requirements_dev.txt.installed
44
+
37
45
  # Installed by fix.sh based on what latest versions are
38
46
  /.python-version
47
+ /.ruby-version
39
48
 
40
49
  # Ruby-related
41
50
  /.bundle/
data/.overcommit.yml CHANGED
@@ -31,6 +31,7 @@ PreCommit:
31
31
  - 'bin/*'
32
32
  PythonFlake8:
33
33
  enabled: true
34
+ on_warn: fail
34
35
  ShellCheck:
35
36
  enabled: true
36
37
  on_warn: fail
data/.rubocop.yml CHANGED
@@ -89,7 +89,7 @@ Style/TrivialAccessors:
89
89
 
90
90
  AllCops:
91
91
  NewCops: enable
92
- TargetRubyVersion: 2.5
92
+ TargetRubyVersion: 2.6
93
93
  Exclude:
94
94
  - 'bin/*'
95
95
 
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,13 +1,133 @@
1
- # Contributor Code of Conduct
2
1
 
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
2
+ # Contributor Covenant Code of Conduct
4
3
 
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
4
+ ## Our Pledge
6
5
 
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
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.
8
12
 
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
10
15
 
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
16
+ ## Our Standards
12
17
 
13
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
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
34
+ * Public or private harassment
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.
46
+
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.
51
+
52
+ ## Scope
53
+
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
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
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
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
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].
128
+
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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- checkoff (0.9.0)
4
+ checkoff (0.10.0)
5
5
  activesupport
6
6
  asana (> 0.10.0)
7
7
  cache_method
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (6.1.3)
13
+ activesupport (6.1.3.2)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 1.6, < 2)
16
16
  minitest (>= 5.1)
@@ -21,7 +21,7 @@ GEM
21
21
  faraday_middleware (~> 1.0)
22
22
  faraday_middleware-multi_json (~> 0.0)
23
23
  oauth2 (~> 1.4)
24
- ast (2.4.1)
24
+ ast (2.4.2)
25
25
  bump (0.10.0)
26
26
  cache (0.4.1)
27
27
  cache_method (0.2.7)
@@ -29,29 +29,34 @@ GEM
29
29
  childprocess (4.0.0)
30
30
  concurrent-ruby (1.1.8)
31
31
  dalli (2.7.11)
32
- diff-lcs (1.4.4)
33
32
  docile (1.3.4)
34
- faraday (1.3.0)
33
+ faraday (1.4.1)
34
+ faraday-excon (~> 1.1)
35
35
  faraday-net_http (~> 1.0)
36
+ faraday-net_http_persistent (~> 1.1)
36
37
  multipart-post (>= 1.2, < 3)
37
- ruby2_keywords
38
+ ruby2_keywords (>= 0.0.4)
39
+ faraday-excon (1.1.0)
38
40
  faraday-net_http (1.0.1)
41
+ faraday-net_http_persistent (1.1.0)
39
42
  faraday_middleware (1.0.0)
40
43
  faraday (~> 1.0)
41
44
  faraday_middleware-multi_json (0.0.6)
42
45
  faraday_middleware
43
46
  multi_json
44
- i18n (1.8.9)
47
+ i18n (1.8.10)
45
48
  concurrent-ruby (~> 1.0)
49
+ imagen (0.1.8)
50
+ parser (>= 2.5, != 2.5.1.1)
46
51
  iniparse (1.5.0)
47
- jwt (2.2.2)
52
+ jwt (2.2.3)
48
53
  minitest (5.14.4)
49
54
  minitest-profile (0.0.2)
50
55
  mocha (1.12.0)
51
56
  multi_json (1.15.0)
52
57
  multi_xml (0.6.0)
53
58
  multipart-post (2.1.1)
54
- oauth2 (1.4.4)
59
+ oauth2 (1.4.7)
55
60
  faraday (>= 0.8, < 2.0)
56
61
  jwt (>= 1.0, < 3.0)
57
62
  multi_json (~> 1.3)
@@ -61,55 +66,48 @@ GEM
61
66
  childprocess (>= 0.6.3, < 5)
62
67
  iniparse (~> 1.4)
63
68
  parallel (1.20.1)
64
- parser (2.7.2.0)
69
+ parser (3.0.1.1)
65
70
  ast (~> 2.4.1)
66
71
  rack (2.2.3)
67
72
  rainbow (3.0.0)
68
73
  rake (13.0.3)
69
- regexp_parser (2.0.3)
70
- rexml (3.2.4)
71
- rspec (3.10.0)
72
- rspec-core (~> 3.10.0)
73
- rspec-expectations (~> 3.10.0)
74
- rspec-mocks (~> 3.10.0)
75
- rspec-core (3.10.1)
76
- rspec-support (~> 3.10.0)
77
- rspec-expectations (3.10.1)
78
- diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.10.0)
80
- rspec-mocks (3.10.1)
81
- diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.10.0)
83
- rspec-support (3.10.1)
84
- rubocop (0.92.0)
74
+ regexp_parser (2.1.1)
75
+ rexml (3.2.5)
76
+ rubocop (1.14.0)
85
77
  parallel (~> 1.10)
86
- parser (>= 2.7.1.5)
78
+ parser (>= 3.0.0.0)
87
79
  rainbow (>= 2.2.2, < 4.0)
88
- regexp_parser (>= 1.7)
80
+ regexp_parser (>= 1.8, < 3.0)
89
81
  rexml
90
- rubocop-ast (>= 0.5.0)
82
+ rubocop-ast (>= 1.5.0, < 2.0)
91
83
  ruby-progressbar (~> 1.7)
92
- unicode-display_width (>= 1.4.0, < 2.0)
93
- rubocop-ast (1.3.0)
94
- parser (>= 2.7.1.5)
95
- rubocop-minitest (0.10.3)
96
- rubocop (>= 0.87, < 2.0)
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)
97
89
  rubocop-rake (0.5.1)
98
90
  rubocop
99
- ruby-progressbar (1.10.1)
91
+ ruby-progressbar (1.11.0)
100
92
  ruby2_keywords (0.0.4)
101
- simplecov (0.20.0)
93
+ rugged (1.1.0)
94
+ simplecov (0.21.2)
102
95
  docile (~> 1.1)
103
96
  simplecov-html (~> 0.11)
104
97
  simplecov_json_formatter (~> 0.1)
105
98
  simplecov-html (0.12.3)
106
- simplecov_json_formatter (0.1.2)
99
+ simplecov_json_formatter (0.1.3)
107
100
  tzinfo (2.0.4)
108
101
  concurrent-ruby (~> 1.0)
109
- unicode-display_width (1.7.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)
110
107
  zeitwerk (2.4.2)
111
108
 
112
109
  PLATFORMS
110
+ ruby
113
111
  x86_64-darwin-19
114
112
  x86_64-darwin-20
115
113
  x86_64-linux
@@ -122,11 +120,11 @@ DEPENDENCIES
122
120
  mocha
123
121
  overcommit
124
122
  rake (~> 13.0)
125
- rspec (>= 3.4)
126
123
  rubocop
127
124
  rubocop-minitest
128
125
  rubocop-rake
129
126
  simplecov
127
+ undercover
130
128
 
131
129
  BUNDLED WITH
132
130
  2.2.11
data/Makefile CHANGED
@@ -17,12 +17,25 @@ help:
17
17
 
18
18
  default: localtest ## run default typechecking and tests
19
19
 
20
- clean: ## remove all built artifacts
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
23
+
24
+ pip_install: requirements_dev.txt.installed ## Install Python dependencies
25
+
26
+ Gemfile.lock:
27
+ bundle install
21
28
 
22
- test: spec ## run tests quickly
29
+ Gemfile.lock.installed: Gemfile.lock
30
+ bundle install
31
+ touch Gemfile.lock.installed
32
+
33
+ bundle_install: Gemfile.lock.installed ## Install Ruby dependencies
34
+
35
+ clean: ## remove all built artifacts
23
36
 
24
- quality: ## run precommit quality checks
25
- @bundle exec overcommit --run
37
+ quality: ## run precommit quality checks
38
+ bundle exec overcommit --run
26
39
 
27
40
  test: ## Run lower-level tests
28
41
  @bundle exec rake test
@@ -30,10 +43,12 @@ test: ## Run lower-level tests
30
43
  localtest: test quality feature ## run default local actions
31
44
 
32
45
  update_from_cookiecutter: ## Bring in changes from template project used to create this repo
46
+ bundle exec overcommit --uninstall
33
47
  IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true
34
- git checkout cookiecutter-template && git push && (git checkout main; bundle exec overcommit --sign)
35
- git checkout main && bundle exec overcommit --sign && git pull && (git checkout -b update-from-cookiecutter-$$(date +%Y-%m-%d-%H%M); bundle exec overcommit --sign)
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)
36
50
  git merge cookiecutter-template || true
51
+ bundle exec overcommit --install
37
52
  @echo
38
53
  @echo "Please resolve any merge conflicts below and push up a PR with:"
39
54
  @echo
data/Rakefile CHANGED
@@ -1,11 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- #
4
- # bundle exec rake release to release a new gem
5
- #
6
- require 'bundler/gem_tasks'
7
-
8
- Dir['lib/tasks/**/*.rake'].each { |t| load t }
9
-
10
- desc 'Default: Run specs and check quality.'
11
- task default: [:localtest]
3
+ # Add your own tasks in files placed in rakelib/ ending in .rake,
4
+ # for example rakelib/capistrano.rake, and they will automatically be available to Rake.
data/bin/overcommit ADDED
@@ -0,0 +1,29 @@
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")
data/checkoff.gemspec CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |spec|
12
12
  spec.email = ['vince@broz.cc']
13
13
  spec.summary = 'Command-line and gem client for Asana (unofficial)'
14
14
  spec.homepage = 'https://github.com/apiology/checkoff'
15
- spec.license = 'MIT'
16
- spec.required_ruby_version = '>= 2.5'
15
+ spec.license = 'MIT license'
16
+ spec.required_ruby_version = '>= 2.6'
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
19
  f.match(%r{^(test|spec|features)/})
@@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'mocha'
34
34
  spec.add_development_dependency 'overcommit'
35
35
  spec.add_development_dependency 'rake', '~> 13.0'
36
- spec.add_development_dependency 'rspec', '>=3.4'
37
36
  spec.add_development_dependency 'rubocop'
38
37
  spec.add_development_dependency 'rubocop-minitest'
39
38
  spec.add_development_dependency 'rubocop-rake'
40
39
  spec.add_development_dependency 'simplecov'
40
+ spec.add_development_dependency 'undercover'
41
41
  end
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "result": {
3
- "covered_percent": 89.61
3
+ "line": 93.15,
4
+ "branch": 61.66
4
5
  }
5
6
  }
data/fix.sh CHANGED
@@ -102,7 +102,7 @@ ensure_bundle() {
102
102
  # https://app.circleci.com/pipelines/github/apiology/source_finder/21/workflows/88db659f-a4f4-4751-abc0-46f5929d8e58/jobs/107
103
103
  set_rbenv_env_variables
104
104
  bundle --version >/dev/null 2>&1 || gem install bundler
105
- bundle install
105
+ make bundle_install
106
106
  # https://bundler.io/v2.0/bundle_lock.html#SUPPORTING-OTHER-PLATFORMS
107
107
  #
108
108
  # "If you want your bundle to support platforms other than the one
@@ -111,7 +111,7 @@ ensure_bundle() {
111
111
  # re-resolve and consider the new platform when picking gems, all
112
112
  # without needing to have a machine that matches PLATFORM handy to
113
113
  # install those platform-specific gems on.'
114
- bundle lock --add-platform x86_64-darwin-20 x86_64-linux
114
+ grep x86_64-darwin-20 Gemfile.lock >/dev/null 2>&1 || bundle lock --add-platform x86_64-darwin-20 x86_64-linux
115
115
  }
116
116
 
117
117
  set_ruby_local_version() {
@@ -239,11 +239,15 @@ ensure_pyenv_virtualenvs() {
239
239
  ensure_pip() {
240
240
  # Make sure we have a pip with the 20.3 resolver, and after the
241
241
  # initial bugfix release
242
- pip install 'pip>=20.3.1'
242
+ major_pip_version=$(pip --version | cut -d' ' -f2 | cut -d '.' -f 1)
243
+ if [[ major_pip_version -lt 21 ]]
244
+ then
245
+ pip install 'pip>=20.3.1'
246
+ fi
243
247
  }
244
248
 
245
249
  ensure_python_requirements() {
246
- pip install -r requirements_dev.txt
250
+ make pip_install
247
251
  }
248
252
 
249
253
  ensure_shellcheck() {
@@ -253,12 +257,31 @@ ensure_shellcheck() {
253
257
  fi
254
258
  }
255
259
 
260
+ ensure_overcommit() {
261
+ # don't run if we're in the middle of a cookiecutter child project
262
+ # test, or otherwise don't have a Git repo to install hooks into...
263
+ if [ -d .git ]
264
+ then
265
+ bundle exec overcommit --install
266
+ else
267
+ >&2 echo 'Not in a git repo; not installing git hooks'
268
+ fi
269
+ }
270
+
271
+ ensure_rugged_packages_installed() {
272
+ install_package icu4c libicu-dev # needed by rugged, needed by undercover
273
+ install_package pkg-config # needed by rugged, needed by undercover
274
+ install_package cmake # needed by rugged, needed by undercover
275
+ }
276
+
256
277
  ensure_rbenv
257
278
 
258
279
  ensure_ruby_versions
259
280
 
260
281
  set_ruby_local_version
261
282
 
283
+ ensure_rugged_packages_installed
284
+
262
285
  ensure_bundle
263
286
 
264
287
  ensure_pyenv
@@ -272,3 +295,5 @@ ensure_pip
272
295
  ensure_python_requirements
273
296
 
274
297
  ensure_shellcheck
298
+
299
+ ensure_overcommit
data/lib/checkoff/cli.rb CHANGED
@@ -117,7 +117,7 @@ module Checkoff
117
117
  stderr.puts 'Please specify a project name'
118
118
  exit(1)
119
119
  end
120
- project_name = project_name[1..-1].to_sym if project_name.start_with? ':'
120
+ project_name = project_name[1..].to_sym if project_name.start_with? ':'
121
121
  if section_name.nil?
122
122
  run_on_project(workspace_name, project_name)
123
123
  else
@@ -120,28 +120,20 @@ module Checkoff
120
120
  end
121
121
  end
122
122
 
123
- # rubocop:disable Metrics/MethodLength
124
123
  def tasks_by_section(workspace_name, project_name)
125
124
  project = project_or_raise(workspace_name, project_name)
126
125
  case project_name
127
- when :my_tasks
128
- user_task_list_by_section(workspace_name, project_name)
129
- when :my_tasks_new
130
- user_task_list_by_section(workspace_name, project_name)
131
- when :my_tasks_today
132
- user_task_list_by_section(workspace_name, project_name)
133
- when :my_tasks_upcoming
126
+ when :my_tasks, :my_tasks_new, :my_tasks_today, :my_tasks_upcoming
134
127
  user_task_list_by_section(workspace_name, project_name)
135
128
  else
136
129
  tasks_by_section_for_project(project)
137
130
  end
138
131
  end
139
132
  cache_method :tasks_by_section, SHORT_CACHE_TIME
140
- # rubocop:enable Metrics/MethodLength
141
133
 
142
134
  # XXX: Rename to section_tasks
143
135
  def tasks(workspace_name, project_name, section_name)
144
- tasks_by_section(workspace_name, project_name)[section_name]
136
+ tasks_by_section(workspace_name, project_name).fetch(section_name, [])
145
137
  end
146
138
  cache_method :tasks, SHORT_CACHE_TIME
147
139
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Checkoff
4
- VERSION = '0.9.0'
4
+ VERSION = '0.10.0'
5
5
  end
File without changes
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Rebaseline quality thresholds to last commit'
4
+ task :clear_metrics do |_t|
5
+ ret =
6
+ system('git checkout coverage/.last_run.json')
7
+ raise unless ret
8
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Standard build when running on a workstation'
4
+ task localtest: %i[clear_metrics test undercover quality]
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Run overcommit on current code'
4
+ task :overcommit do
5
+ sh 'overcommit --run'
6
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Run quality checks'
4
+ task quality: :overcommit
File without changes
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc 'Ensure PR changes are fully covered by tests'
4
+ task :undercover do |_t|
5
+ ret =
6
+ system('undercover --compare origin/main')
7
+ raise unless ret
8
+ end
data/requirements_dev.txt CHANGED
@@ -1 +1,2 @@
1
+ pip==21.0.1
1
2
  yamllint==1.26.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -151,21 +151,21 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '13.0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rspec
154
+ name: rubocop
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: '3.4'
159
+ version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: '3.4'
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: rubocop
168
+ name: rubocop-minitest
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
@@ -179,7 +179,7 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: rubocop-minitest
182
+ name: rubocop-rake
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - ">="
@@ -193,7 +193,7 @@ dependencies:
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: rubocop-rake
196
+ name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
@@ -207,7 +207,7 @@ dependencies:
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
- name: simplecov
210
+ name: undercover
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - ">="
@@ -230,13 +230,13 @@ extra_rdoc_files: []
230
230
  files:
231
231
  - ".circleci/config.yml"
232
232
  - ".envrc"
233
- - ".git-hooks/pre-commit/circle_ci.rb"
233
+ - ".git-hooks/pre_commit/circle_ci.rb"
234
234
  - ".gitignore"
235
235
  - ".overcommit.yml"
236
236
  - ".rubocop.yml"
237
- - ".ruby-version"
238
237
  - ".yamllint.yml"
239
238
  - CODE_OF_CONDUCT.md
239
+ - DEVELOPMENT.md
240
240
  - Gemfile
241
241
  - Gemfile.lock
242
242
  - LICENSE
@@ -246,6 +246,7 @@ files:
246
246
  - bin/bump
247
247
  - bin/checkoff
248
248
  - bin/console
249
+ - bin/overcommit
249
250
  - bin/rake
250
251
  - bin/setup
251
252
  - checkoff.gemspec
@@ -263,11 +264,6 @@ files:
263
264
  - lib/checkoff/tasks.rb
264
265
  - lib/checkoff/version.rb
265
266
  - lib/checkoff/workspaces.rb
266
- - lib/tasks/ci.rake
267
- - lib/tasks/default.rake
268
- - lib/tasks/feature.rake
269
- - lib/tasks/spec.rake
270
- - lib/tasks/test.rake
271
267
  - metrics/bigfiles_high_water_mark
272
268
  - metrics/brakeman_high_water_mark
273
269
  - metrics/bundle-audit_high_water_mark
@@ -285,10 +281,19 @@ files:
285
281
  - metrics/rubocop_high_water_mark
286
282
  - metrics/scalastyle_high_water_mark
287
283
  - metrics/shellcheck_high_water_mark
284
+ - rakelib/ci.rake
285
+ - rakelib/clear_metrics.rake
286
+ - rakelib/default.rake
287
+ - rakelib/gem_tasks.rake
288
+ - rakelib/localtest.rake
289
+ - rakelib/overcommit.rake
290
+ - rakelib/quality.rake
291
+ - rakelib/test.rake
292
+ - rakelib/undercover.rake
288
293
  - requirements_dev.txt
289
294
  homepage: https://github.com/apiology/checkoff
290
295
  licenses:
291
- - MIT
296
+ - MIT license
292
297
  metadata: {}
293
298
  post_install_message:
294
299
  rdoc_options: []
@@ -298,14 +303,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
298
303
  requirements:
299
304
  - - ">="
300
305
  - !ruby/object:Gem::Version
301
- version: '2.5'
306
+ version: '2.6'
302
307
  required_rubygems_version: !ruby/object:Gem::Requirement
303
308
  requirements:
304
309
  - - ">="
305
310
  - !ruby/object:Gem::Version
306
311
  version: '0'
307
312
  requirements: []
308
- rubygems_version: 3.0.3
313
+ rubygems_version: 3.1.2
309
314
  signing_key:
310
315
  specification_version: 4
311
316
  summary: Command-line and gem client for Asana (unofficial)
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.6.6
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rspec/core/rake_task'
4
-
5
- desc 'Run features'
6
- RSpec::Core::RakeTask.new(:feature) do |task|
7
- task.pattern = 'feature/**/*_spec.rb'
8
- task.rspec_opts = '--format doc'
9
- end
data/lib/tasks/spec.rake DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rspec/core/rake_task'
4
-
5
- desc 'Run specs'
6
- RSpec::Core::RakeTask.new(:spec) do |task|
7
- task.pattern = 'spec/**/*_spec.rb'
8
- task.rspec_opts = '--format doc'
9
- end