checkoff 0.20.0 → 0.21.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: ca8acc9a67554659cd34a8a9a60f539e834088bc896ef6e3bb7761e75183ac8a
4
- data.tar.gz: ff10088e95968a73ccb5590b316a4b6e3f9ff49572ab87271f710bc9a02f25b3
3
+ metadata.gz: d7c237ce35c02738d3170942d13d3d47d02d0fc0ed65eb78b836b7c444aed241
4
+ data.tar.gz: 8ab5d779ab9feadeeb66d12294e25f8b2baf0de32d8a917618f3adc26c77a4ea
5
5
  SHA512:
6
- metadata.gz: a80da7607358f742d06fec48be66df5b53d41832ecbc16bdaae3a023c9a929d3cfff0a983ccbbdb381d1079187589c0e3c367ade5b8f7b92fe36fcd5025bfc65
7
- data.tar.gz: dc9126b9a3366626c81f1eef2f32c517f9b978e5ec07052cc2194bf718e2e9c778da2fe2b09b6a1d07213437b7bf3265d636dcd071bb7ca01d822819883d1087
6
+ metadata.gz: '078c32912450408243aea106d973047fabfb4db52c6267f2dd0030894a7f1b898a89acce8115da066e2b1fa2e45560286148a7aa6ccc0632d869797cf4b008aa'
7
+ data.tar.gz: 388f84ed37bc63dc68182e4b484e18fc5ab591625840c9f6a4f60fa385340cf6e7c4386cd56ee146100d3d5e99952f8d7c77e9c12c3ae9e47fbabc6b7e9e773e
data/.gitignore CHANGED
@@ -57,8 +57,4 @@ requirements_dev.txt.installed
57
57
  /pkg/
58
58
  /spec/reports/
59
59
  /tmp/
60
- /coverage/.resultset.json
61
- /coverage/.resultset.json.lock
62
- /coverage/assets/
63
- /coverage/index.html
64
- /coverage/lcov/
60
+ /coverage/
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.20.0)
15
+ checkoff (0.21.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -27,6 +27,8 @@ GEM
27
27
  i18n (>= 1.6, < 2)
28
28
  minitest (>= 5.1)
29
29
  tzinfo (~> 2.0)
30
+ addressable (2.8.1)
31
+ public_suffix (>= 2.0.2, < 6.0)
30
32
  ansi (1.5.0)
31
33
  ast (2.4.2)
32
34
  builder (3.2.4)
@@ -39,7 +41,9 @@ GEM
39
41
  childprocess (4.0.0)
40
42
  coderay (1.1.3)
41
43
  concurrent-ruby (1.1.10)
42
- dalli (3.2.2)
44
+ crack (0.4.5)
45
+ rexml
46
+ dalli (3.2.3)
43
47
  diff-lcs (1.5.0)
44
48
  docile (1.4.0)
45
49
  fakeweb (1.3.0)
@@ -66,6 +70,7 @@ GEM
66
70
  faraday_middleware
67
71
  multi_json
68
72
  gli (2.21.0)
73
+ hashdiff (1.0.1)
69
74
  i18n (1.12.0)
70
75
  concurrent-ruby (~> 1.0)
71
76
  imagen (0.1.8)
@@ -116,6 +121,7 @@ GEM
116
121
  pry (0.14.1)
117
122
  coderay (~> 1.1)
118
123
  method_source (~> 1.0)
124
+ public_suffix (5.0.0)
119
125
  rack (2.2.4)
120
126
  rainbow (3.1.1)
121
127
  rake (13.0.3)
@@ -168,11 +174,16 @@ GEM
168
174
  rainbow (>= 2.1, < 4.0)
169
175
  rugged (>= 0.27, < 1.6)
170
176
  unicode-display_width (2.3.0)
177
+ webmock (3.18.1)
178
+ addressable (>= 2.8.0)
179
+ crack (>= 0.3.2)
180
+ hashdiff (>= 0.4.0, < 2.0.0)
171
181
 
172
182
  PLATFORMS
173
183
  ruby
174
184
  x86_64-darwin-19
175
185
  x86_64-darwin-20
186
+ x86_64-darwin-21
176
187
  x86_64-linux
177
188
 
178
189
  DEPENDENCIES
@@ -195,6 +206,7 @@ DEPENDENCIES
195
206
  simplecov (>= 0.18.0)
196
207
  simplecov-lcov
197
208
  undercover
209
+ webmock
198
210
 
199
211
  BUNDLED WITH
200
- 2.3.23
212
+ 2.3.26
data/Makefile CHANGED
@@ -15,7 +15,17 @@ export PRINT_HELP_PYSCRIPT
15
15
  help:
16
16
  @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17
17
 
18
- default: clean-coverage test coverage quality ## run default typechecking, tests and quality
18
+ default: clean-coverage test coverage clean-typecoverage typecheck typecoverage quality ## run default typechecking, tests and quality
19
+
20
+ typecheck: ## validate types in code and configuration
21
+
22
+ citypecheck: typecheck ## Run type check from CircleCI
23
+
24
+ typecoverage: typecheck ## Run type checking and then ratchet coverage in metrics/
25
+
26
+ clean-typecoverage: ## Clean out type-related coverage previous results to avoid flaky results
27
+
28
+ citypecoverage: typecoverage ## Run type checking, ratchet coverage, and then complain if ratchet needs to be committed
19
29
 
20
30
  requirements_dev.txt.installed: requirements_dev.txt
21
31
  pip install -q --disable-pip-version-check -r requirements_dev.txt
@@ -42,8 +52,6 @@ clean: clear_metrics ## remove all built artifacts
42
52
 
43
53
  citest: test ## Run unit tests from CircleCI
44
54
 
45
- typecheck: ## validate types in code and configuration
46
-
47
55
  overcommit: ## run precommit quality checks
48
56
  bundle exec overcommit --run
49
57
 
@@ -66,17 +74,7 @@ coverage: test report-coverage ## check code coverage
66
74
 
67
75
  report-coverage: test ## Report summary of coverage to stdout, and generate HTML, XML coverage report
68
76
 
69
- report-coverage-to-codecov: report-coverage ## use codecov.io for PR-scoped code coverage reports
70
- @curl -Os https://uploader.codecov.io/latest/linux/codecov
71
- @chmod +x codecov
72
- @./codecov --file coverage/lcov/checkoff.lcov --nonZero
73
-
74
- # https://github.com/bluelabsio/records-mover/blob/master/Makefile#L25
75
- cicoverage: report-coverage-to-codecov ## check code coverage, then report to codecov
76
- @echo "Looking for un-checked-in unit test coverage metrics..."
77
- @git status --porcelain coverage/.last_run.json
78
- @git diff coverage/.last_run.json
79
- @test -z "$(git status --porcelain coverage/.last_run.json)"
77
+ cicoverage: coverage ## check code coverage
80
78
 
81
79
  update_from_cookiecutter: ## Bring in changes from template project used to create this repo
82
80
  bundle exec overcommit --uninstall
data/checkoff.gemspec CHANGED
@@ -51,6 +51,7 @@ Gem::Specification.new do |spec|
51
51
  spec.add_development_dependency 'simplecov', ['>=0.18.0']
52
52
  spec.add_development_dependency 'simplecov-lcov'
53
53
  spec.add_development_dependency 'undercover'
54
+ spec.add_development_dependency 'webmock'
54
55
  spec.metadata = {
55
56
  'rubygems_mfa_required' => 'true',
56
57
  }
data/fix.sh CHANGED
@@ -188,7 +188,7 @@ ensure_bundle() {
188
188
  #
189
189
  # This affects nokogiri, which will try to reinstall itself in
190
190
  # Docker builds where it's already installed if this is not run.
191
- for platform in x86_64-darwin-20 x86_64-linux
191
+ for platform in x86_64-darwin-21 x86_64-linux
192
192
  do
193
193
  grep "${platform:?}" Gemfile.lock >/dev/null 2>&1 || bundle lock --add-platform "${platform:?}"
194
194
  done
@@ -18,7 +18,7 @@ module Checkoff
18
18
  config_value = @config[key]
19
19
  return config_value unless config_value.nil?
20
20
 
21
- ENV[envvar_name(key)]
21
+ ENV.fetch(envvar_name(key), nil)
22
22
  end
23
23
 
24
24
  def fetch(key)
@@ -11,7 +11,9 @@ module Checkoff
11
11
  # Parse Asana search URLs into parameters suitable to pass into
12
12
  # the /workspaces/{workspace_gid}/tasks/search endpoint
13
13
  class Parser
14
- def initialize(_deps = {}); end
14
+ def initialize(_deps = {})
15
+ # allow dependencies to be passed in by tests
16
+ end
15
17
 
16
18
  def convert_params(url)
17
19
  url_params = CGI.parse(URI.parse(url).query)
@@ -110,7 +110,8 @@ module Checkoff
110
110
  raise "Could not find task in project_gid #{project_gid}: #{task}" if membership.nil?
111
111
 
112
112
  current_section = membership['section']['name']
113
- current_section = nil if ['(no section)', 'Untitled section'].include?(current_section)
113
+ inbox_section_names = ['(no section)', 'Untitled section', 'Inbox']
114
+ current_section = nil if inbox_section_names.include?(current_section)
114
115
  by_section[current_section] ||= []
115
116
  by_section[current_section] << task
116
117
  end
@@ -3,5 +3,5 @@
3
3
  # Command-line and gem client for Asana (unofficial)
4
4
  module Checkoff
5
5
  # Version of library
6
- VERSION = '0.20.0'
6
+ VERSION = '0.21.0'
7
7
  end
@@ -3,15 +3,7 @@
3
3
  desc 'Ensure that any locally ratcheted coverage metrics are cleared back ' \
4
4
  'to git baseline'
5
5
  task :clear_metrics do |_t|
6
- ret =
7
- system('git checkout coverage/.last_run.json')
8
- raise unless ret
9
-
10
6
  # Without this old lines which are removed are still counted,
11
7
  # leading to inconsistent coverage percentages between runs.
12
- #
13
- # need to save coverage/.last_run.json
14
- ret =
15
- system('rm -fr coverage/assets coverage/.*.json.lock coverage/lcov/* coverage/index.html coverage/.resultset.json')
16
- raise unless ret
8
+ raise unless system('rm -fr coverage/')
17
9
  end
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.20.0
4
+ version: 0.21.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: 2022-10-19 00:00:00.000000000 Z
11
+ date: 2022-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -318,6 +318,20 @@ dependencies:
318
318
  - - ">="
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
+ - !ruby/object:Gem::Dependency
322
+ name: webmock
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ">="
333
+ - !ruby/object:Gem::Version
334
+ version: '0'
321
335
  description:
322
336
  email:
323
337
  - vince@broz.cc
@@ -352,7 +366,6 @@ files:
352
366
  - bin/rake
353
367
  - bin/setup
354
368
  - checkoff.gemspec
355
- - coverage/.last_run.json
356
369
  - docs/cookiecutter_input.json
357
370
  - docs/example_project.png
358
371
  - exe/checkoff
@@ -429,7 +442,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
429
442
  - !ruby/object:Gem::Version
430
443
  version: '0'
431
444
  requirements: []
432
- rubygems_version: 3.2.33
445
+ rubygems_version: 3.1.6
433
446
  signing_key:
434
447
  specification_version: 4
435
448
  summary: Command-line and gem client for Asana (unofficial)
@@ -1,6 +0,0 @@
1
- {
2
- "result": {
3
- "line": 99.62,
4
- "branch": 86.42
5
- }
6
- }