checkoff 0.129.0 → 0.131.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: 1c9d07ad7181d5b4c1dcf0df6542f92e5468a4ffef70231dc2c4a35f03f9fd45
4
- data.tar.gz: fff0a9a8e7663a71e4c5a257b709fcebe57e712d4536d12b1890834c1dd75be5
3
+ metadata.gz: 102e535f1daa060bc26aba9532eb05657e11048c933d1bb849815ef41d4e3355
4
+ data.tar.gz: 197c678dff93a5d20f3059e257b4d68cba8dae1c0dd0e6d485883f1c3e815416
5
5
  SHA512:
6
- metadata.gz: ddebe33692c02e9798a4ffa65b9ba105c1a3a62c7f6482fccbf9fd2ca4ba9cce443680a26f4b488f40d3a8316baf70b9acfaa811e79cf552bc1fc900d62da48f
7
- data.tar.gz: 1b49aeddc864873a270b08076d2d6ba9b107b25a8113714fd9e7a2e14b19e38ea59d143d33f6d75f6e1be23444230d25fdfcaf10bd0f8d82552f7b333a907a0e
6
+ metadata.gz: 6b70e6882b6ae9d719131d457684eb140b21dc5b69f503eb33c5a93dc20de238f2ad739e5088409261dc4c0fd819d0c9c84aeac7a9f07a21ecd477c863e0f7d3
7
+ data.tar.gz: 4d53aed56eb3f67dcf35dc9c461f85f06b1cc58781bc58401e930b44ca3ac8cb70938ddeec62fe9972d96bc1a1344a38f5ae3b5e5b446cf1757b894fca66ef9b
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.129.0)
15
+ checkoff (0.131.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'asana'
4
+
5
+ # Monkeypatches Asana::Resources::Resource so that Ruby marshalling and
6
+ # unmarshalling works on Asana resource classes. Currently, it will
7
+ # work unless you call an accessor method, which triggers Asana's
8
+ # client library Resource class' method_missing() to "cache" the
9
+ # result by creating a singleton method. Unfortunately, singleton
10
+ # methods break marshalling, which is not smart enough to know that it
11
+ # is not necessary to marshall them as they will simply be recreated
12
+ # when needed.
13
+
14
+ module Asana
15
+ # Monkeypatches:
16
+ #
17
+ # https://github.com/Asana/ruby-asana/blob/master/lib/asana
18
+ module Resources
19
+ # Public: The base resource class which provides some sugar over common
20
+ # resource functionality.
21
+ class Resource
22
+ # @return [Hash]
23
+ def marshal_dump
24
+ { 'data' => @_data }
25
+ end
26
+
27
+ # @param data [Hash]
28
+ #
29
+ # @return [void]
30
+ def marshal_load(data)
31
+ # @sg-ignore
32
+ # @type [Hash]
33
+ @_data = data.fetch('data')
34
+ @_data.each do |k, v|
35
+ if respond_to?(k)
36
+ variable = :"@#{k}"
37
+ instance_variable_set(variable, v)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ 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.129.0'
6
+ VERSION = '0.131.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.129.0
4
+ version: 0.131.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-11-05 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -157,6 +157,7 @@ files:
157
157
  - lib/checkoff/internal/task_hashes.rb
158
158
  - lib/checkoff/internal/task_selector_evaluator.rb
159
159
  - lib/checkoff/internal/task_timing.rb
160
+ - lib/checkoff/monkeypatches/resource_marshalling.rb
160
161
  - lib/checkoff/my_tasks.rb
161
162
  - lib/checkoff/portfolios.rb
162
163
  - lib/checkoff/project_selectors.rb