checkoff 0.187.0 → 0.188.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 662bb742d6b627b5b1e95d376e0565392ecc56ea54d4dea8f76c5e5198093d6d
4
- data.tar.gz: '01859381f83d92867afc1319a0d43fc860a6505970cce641c76565b5a99e5d13'
3
+ metadata.gz: 6adfa7e1e576e5fe7d462404260037f351d1995cfdbcac89f1292b3baf71aa69
4
+ data.tar.gz: a2bd18068eddd8f0844390dc22002710e7338d73c85b33733d3f4f426a223c1b
5
5
  SHA512:
6
- metadata.gz: 5f6a49cf14421028d42869e8436b5cc917e584aee545b0645487efc64fcda10ee35db189890970c9fb71349ad8498d4fe7ad548b177f140c4feb82edf3bc1df3
7
- data.tar.gz: 26763f804929cbbcfb4af6faaed2ff14d01dd9736b465c830a5e9e9479c8428c8d14114e12b7fa6fda9e7cc9aa3fb6896d043fcea099b1678d60849b12b6420f
6
+ metadata.gz: 64c3cb55f53d9fd2904a5e29327f3ae42a3b2e52ee3a891e3730245f1edd32af2815ae1e80bbbb0cb838b21e79dca8f10edf6a0f8594cc00fce492a55276ca47
7
+ data.tar.gz: 830d6ac25e2d4f638eec6258cd6ea8d4ccc40f1d51e05d0f96be7ac831ff7eddf5c76f2da0f6b5dc16d1b4b041623634b1c7450a20513b3041c30140d9bd299e
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.187.0)
15
+ checkoff (0.188.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -2,6 +2,14 @@
2
2
  #
3
3
  # rubocop:disable Layout/LineLength
4
4
  # @!parse
5
+ # module OpenSSL
6
+ # module SSL
7
+ # # @type [Integer]
8
+ # VERIFY_PEER = 1
9
+ # # @type [Integer]
10
+ # VERIFY_NONE = 0
11
+ # end
12
+ # end
5
13
  # class Time
6
14
  # class << self
7
15
  # # @param time [String]
data/fix.sh CHANGED
@@ -146,6 +146,11 @@ ensure_bundle() {
146
146
  # Version <2.2.22 of bundler isn't compatible with Ruby 3.3:
147
147
  #
148
148
  # https://stackoverflow.com/questions/70800753/rails-calling-didyoumeanspell-checkers-mergeerror-name-spell-checker-h
149
+ #
150
+ #
151
+ # Version 2.5.5 fixed an issue in 2.2.22 with the 'bump' gem:
152
+ #
153
+ # https://app.circleci.com/pipelines/github/apiology/checkoff/1281/workflows/f667f909-c3fc-4ae2-8593-dde2b588a7a7/jobs/2491
149
154
  need_better_bundler=false
150
155
  if [ "${bundler_version_major}" -lt 2 ]
151
156
  then
@@ -163,18 +168,14 @@ ensure_bundle() {
163
168
  fi
164
169
  fi
165
170
  fi
166
- echo "Bundler version: ${bundler_version}"
167
- echo "Need better bundler: ${need_better_bundler}"
168
171
  if [ "${need_better_bundler}" = true ]
169
172
  then
173
+ >&2 echo "Original bundler version: ${bundler_version}"
170
174
  # need to do this first before 'bundle update --bundler' will work
171
175
  make bundle_install
172
- set -x
173
176
  bundle update --bundler
174
177
  gem install bundler:2.5.5
175
- set +x
176
- echo "After updating bundler:"
177
- echo "Bundler version: ${bundler_version}"
178
+ >&2 echo "Updated bundler version: $(bundle --version)"
178
179
  # ensure next step installs fresh bundle
179
180
  rm -f Gemfile.lock.installed
180
181
  fi
@@ -9,6 +9,7 @@ require 'mime/types'
9
9
  require 'net/http'
10
10
  require 'net/http/response'
11
11
  require 'net/http/responses'
12
+ require 'openssl'
12
13
  require 'tempfile'
13
14
  require_relative 'internal/config_loader'
14
15
  require_relative 'internal/logging'
@@ -55,16 +56,19 @@ module Checkoff
55
56
  # @param resource [Asana::Resources::Resource]
56
57
  # @param attachment_name [String,nil]
57
58
  # @param just_the_url [Boolean]
59
+ # @param verify_mode [Integer<OpenSSL::SSL::VERIFY_NONE,OpenSSL::SSL::VERIFY_PEER>]
58
60
  #
59
61
  # @return [Asana::Resources::Attachment]
60
62
  def create_attachment_from_url!(url,
61
63
  resource,
62
64
  attachment_name: nil,
65
+ verify_mode: OpenSSL::SSL::VERIFY_PEER,
63
66
  just_the_url: false)
64
67
  if just_the_url
65
68
  create_attachment_from_url_alone!(url, resource, attachment_name: attachment_name)
66
69
  else
67
- create_attachment_from_downloaded_url!(url, resource, attachment_name: attachment_name)
70
+ create_attachment_from_downloaded_url!(url, resource, attachment_name: attachment_name,
71
+ verify_mode: verify_mode)
68
72
  end
69
73
  end
70
74
 
@@ -117,12 +121,14 @@ module Checkoff
117
121
  # @param url [String]
118
122
  # @param resource [Asana::Resources::Resource]
119
123
  # @param attachment_name [String,nil]
124
+ # @param verify_mode [Integer<OpenSSL::SSL::VERIFY_NONE,OpenSSL::SSL::VERIFY_PEER>]
120
125
  #
121
126
  # @return [Asana::Resources::Attachment]
122
- def create_attachment_from_downloaded_url!(url, resource, attachment_name:)
127
+ def create_attachment_from_downloaded_url!(url, resource, attachment_name:,
128
+ verify_mode: OpenSSL::SSL::VERIFY_PEER)
123
129
  uri = URI(url)
124
130
  attachment_name ||= File.basename(uri.path)
125
- download_uri(uri) do |tempfile|
131
+ download_uri(uri, verify_mode: verify_mode) do |tempfile|
126
132
  content_type ||= content_type_from_filename(attachment_name)
127
133
  content_type ||= content_type_from_filename(uri.path)
128
134
 
@@ -242,10 +242,11 @@ module Checkoff
242
242
  only_uncompleted: true,
243
243
  extra_fields: ['dependents'] + extra_task_fields)
244
244
  debug { "#{task.name} has dependent task #{dependent_task.name}" }
245
- unless dependent_task.nil?
246
- dependent_tasks << dependent_task
247
- dependent_tasks += all_dependent_tasks(dependent_task)
248
- end
245
+ next if dependent_task.nil?
246
+
247
+ dependent_tasks << dependent_task
248
+ dependent_tasks += all_dependent_tasks(dependent_task,
249
+ extra_task_fields: extra_task_fields)
249
250
  end
250
251
  dependent_tasks
251
252
  end
@@ -107,6 +107,8 @@ module Checkoff
107
107
  next true unless limit_to_projects.map(&:gid).include? project_gid
108
108
  end
109
109
 
110
+ # do this once, but lazily, so we don't have to do it if all
111
+ # projects are excluded
110
112
  all_dependent_milestones ||=
111
113
  @tasks.all_dependent_tasks(task,
112
114
  extra_task_fields: ['resource_subtype',
@@ -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.187.0'
6
+ VERSION = '0.188.0'
7
7
  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.187.0
4
+ version: 0.188.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: 2024-01-30 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport