card-mod-virtual 0.14.2 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/card/virtual.rb +11 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28cebe544d9a055458d02a57f3c94cfebeb03d6d635b85e8bf598307ef7b8161
|
4
|
+
data.tar.gz: 03f1cb610bac2a0f6eced25a34ffbe2c6fb5fb76fc54a870cdbb4cff7cae948e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300563f4a99d76436a5e021febf1392f3807cb2373e93f32080508c5291a47767727ebae1d0bff0bc75aeebd5cd65e45e019f36f2af82790a18bde67a358353a
|
7
|
+
data.tar.gz: 5de570e918882548ff2f1ae3c6368aa16e64bfee25f5204ed1645beff98ade19e92c72b0d915ed2813a6fe4fb26fdc0f5570989ffa2d9278bfbf4adf33f53bda
|
data/lib/card/virtual.rb
CHANGED
@@ -18,16 +18,25 @@ class Card
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def save card
|
21
|
-
|
22
|
-
virt ? virt.update(card.virtual_content) : create(card)
|
21
|
+
cache.write card.key, create_or_update(card)
|
23
22
|
end
|
24
23
|
|
25
24
|
def delete card
|
25
|
+
cache.delete card.key
|
26
26
|
find_by_card(card)&.delete
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
|
+
def create_or_update card
|
32
|
+
if (virt = find_by_card card)
|
33
|
+
virt.update(card.virtual_content)
|
34
|
+
virt
|
35
|
+
else
|
36
|
+
create(card)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
31
40
|
def cache
|
32
41
|
Card::Cache[Virtual]
|
33
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-virtual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.105.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
28
|
+
version: 1.105.1
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|
@@ -45,6 +45,7 @@ metadata:
|
|
45
45
|
wiki_uri: https://decko.org
|
46
46
|
documentation_url: http://docs.decko.org/
|
47
47
|
card-mod: virtual
|
48
|
+
card-mod-group: gem-defaults
|
48
49
|
post_install_message:
|
49
50
|
rdoc_options: []
|
50
51
|
require_paths:
|
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
61
|
- !ruby/object:Gem::Version
|
61
62
|
version: '0'
|
62
63
|
requirements: []
|
63
|
-
rubygems_version: 3.
|
64
|
+
rubygems_version: 3.3.11
|
64
65
|
signing_key:
|
65
66
|
specification_version: 4
|
66
67
|
summary: virtual
|