checkoff 0.187.0 → 0.189.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: 662bb742d6b627b5b1e95d376e0565392ecc56ea54d4dea8f76c5e5198093d6d
4
- data.tar.gz: '01859381f83d92867afc1319a0d43fc860a6505970cce641c76565b5a99e5d13'
3
+ metadata.gz: 8e562428009e8c37b4e304fe73f38f4e71a4e4ff43435a691bec319730388b16
4
+ data.tar.gz: 899236a75661128f5f0bc7c8ce3324e0f02ab2cddda8bab1e75aa9571252fc80
5
5
  SHA512:
6
- metadata.gz: 5f6a49cf14421028d42869e8436b5cc917e584aee545b0645487efc64fcda10ee35db189890970c9fb71349ad8498d4fe7ad548b177f140c4feb82edf3bc1df3
7
- data.tar.gz: 26763f804929cbbcfb4af6faaed2ff14d01dd9736b465c830a5e9e9479c8428c8d14114e12b7fa6fda9e7cc9aa3fb6896d043fcea099b1678d60849b12b6420f
6
+ metadata.gz: 16220a87ff43bcd3b701d82848a8d86ec7fbce2333ab9e78ab4c9ddf77f8e2d0c5177311db77682c3fcc13a562f06496d6bb59426f974f4f89679af08fd11d87
7
+ data.tar.gz: e71b11aafa507a6ba8be9c3330191696f9c0c52671f7395d582bfada4531eee674b97aae7034671e1e9e93cc2d946bccf0cfa3a3e384b54b5750d40e4a218705
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.189.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
 
@@ -76,7 +76,7 @@ module Checkoff
76
76
  raw_task_search(api_params, workspace_gid: workspace.gid, task_selector: task_selector,
77
77
  extra_fields: extra_fields)
78
78
  end
79
- cache_method :task_search, LONG_CACHE_TIME
79
+ cache_method :task_search, SHORT_CACHE_TIME
80
80
 
81
81
  # Perform a search using the Asana Task Search API:
82
82
  #
@@ -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.189.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.189.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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport