checkoff 0.129.0 → 0.130.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/checkoff/monkeypatches/resource_marshalling.rb +43 -0
- data/lib/checkoff/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671e124a1d07f8449c10381cdaf97619ae58cd56dda7adcf2672396c8cae1c07
|
4
|
+
data.tar.gz: fd7c3e0b5f1dd48e7a6281a807c92a7f6d7614d8d71e27bdf45895e1f98246d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee30df69be122ddcc9cfe7cfe5a72bab8ab53df71ddc0abbd81cab05767f25cea01047f2da2c6652831c4b5558ca23e126f02a0343c6f9963166c8047b93a634
|
7
|
+
data.tar.gz: 85e37bfc18623f783b70ab4724d1b19e3bfdf27c67c130e9c3a23d8b85faf938bdac54f15210d9b073641ec2d7fdcdca0b0a41630e4b660edb3b973c7c2a75ea
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/checkoff/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.130.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
@@ -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
|