checkoff 0.162.0 → 0.163.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: 79b74e311c0a9146b3dd2d501940eee17ff14519bdf422ae031808cdd64afef9
4
- data.tar.gz: 2b464f0fc470ac543a24683dc6d58f2b7131cf6094ab8a9f84813dbae0726d04
3
+ metadata.gz: 4e069f1f67cf8145e42254912651cb575323ca8c5ec0b2e94e8929b6c2e1cb33
4
+ data.tar.gz: 6e0f8039d9e956c0918b03807cc04cf65853232e4b3a97f7d6d5cca72b38b593
5
5
  SHA512:
6
- metadata.gz: cc73effc84d1d49b688a494ff729b07507d94b29bb8647a96f207cde22d72a39006d9e756e6a35bc218eb603d2736de578914c90871fef595f4301fad193a0ed
7
- data.tar.gz: 9825765f922b7ceac77884761cef8e937eb39313ff8daf9daed4d478c3a6b63ea497eb0aa9e3f9727483c6657307d85317c03e22d08e36b71d5dd971f6487916
6
+ metadata.gz: 9f696c01862a1febb0f973bf90a39ce8afbc3be48d0b7df2a57494f9333c8894c2b17a0b3c2c4954fd2014c572d8e6bc78fdbb128e197f9714809e64e5207d45
7
+ data.tar.gz: 0d2d8a45685bf264c00dee9e7fedfbfb7974c0a0e3dcd580618dafb99e936ef52d621411fa462a9a75bc4a54a0290c143cea459b549305131d8c8de02a36c253
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.162.0)
15
+ checkoff (0.163.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -3,7 +3,6 @@
3
3
  # frozen_string_literal: true
4
4
 
5
5
  require 'faraday'
6
- require 'faraday/multipart'
7
6
  require 'forwardable'
8
7
  require 'cache_method'
9
8
  require 'mime/types'
@@ -69,6 +68,8 @@ module Checkoff
69
68
  end
70
69
  end
71
70
 
71
+ private
72
+
72
73
  # Writes contents of URL to a temporary file with the same
73
74
  # extension as the URL using Net::HTTP, raising an exception if
74
75
  # not succesful
@@ -78,6 +79,7 @@ module Checkoff
78
79
  # @return [Object]
79
80
  # @sg-ignore
80
81
  def download_uri(uri, &block)
82
+ out = nil
81
83
  Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
82
84
  # @sg-ignore
83
85
  request = Net::HTTP::Get.new(uri)
@@ -86,10 +88,11 @@ module Checkoff
86
88
  raise("Unexpected response code: #{response.code}") unless response.code == '200'
87
89
 
88
90
  write_tempfile_from_response(response) do |tempfile|
89
- block.yield tempfile
91
+ out = block.yield tempfile
90
92
  end
91
93
  end
92
94
  end
95
+ out
93
96
  end
94
97
 
95
98
  # @sg-ignore
@@ -128,8 +131,6 @@ module Checkoff
128
131
  end
129
132
  end
130
133
 
131
- private
132
-
133
134
  # @param url [String]
134
135
  # @param resource [Asana::Resources::Resource]
135
136
  # @param attachment_name [String,nil]
@@ -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.162.0'
6
+ VERSION = '0.163.0'
7
7
  end
data/lib/checkoff.rb CHANGED
@@ -17,3 +17,4 @@ require 'checkoff/task_selectors'
17
17
  require 'checkoff/project_selectors'
18
18
  require 'checkoff/section_selectors'
19
19
  require 'checkoff/task_searches'
20
+ require 'checkoff/attachments'
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.162.0
4
+ version: 0.163.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: 2023-12-26 00:00:00.000000000 Z
11
+ date: 2023-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport