pluggaloid 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pluggaloid/mirage.rb +19 -2
- data/lib/pluggaloid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47426a6d55a1f8bb30898b9056766dceff9346b1fdc33561f6c21af9c2c9f98
|
4
|
+
data.tar.gz: c9953550293c3f3be07e5ef429d29f90651717f74b443613cd274b702578c938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ac80a75430f7721d6752698deb760b883fe3f9e0a2cf4cdd5b2866b164c01815064749dd9d0acfcdbe799aad88e91346a03272ad171fdab1df20658d14c0688
|
7
|
+
data.tar.gz: ca65d05402e64b7daa429596275d25d2af72806c66009f7e10321f2a6a1d9c4ec9f1d7c7e6dd29494394262ad26dd13cbb8fe58374bf8a2de28072d380de5960
|
data/lib/pluggaloid/mirage.rb
CHANGED
@@ -14,6 +14,19 @@ module Pluggaloid
|
|
14
14
|
def pluggaloid_mirage_repository
|
15
15
|
@pluggaloid_mirage_repository ||= {}
|
16
16
|
end
|
17
|
+
|
18
|
+
# `Pluggaloid::Mirage` をincludeしたClassのnamespaceを返す。
|
19
|
+
# namespaceはStringで、 `Pluggaloid::Mirage` をincludeしたほかのClassと
|
20
|
+
# 重複しない。
|
21
|
+
# 同じClassであれば、別のPluggaloid host(Pluggaloid::VMやプロセス)でも
|
22
|
+
# 同じ値を返す。
|
23
|
+
def pluggaloid_mirage_namespace
|
24
|
+
-to_s
|
25
|
+
end
|
26
|
+
|
27
|
+
def inherited(klass)
|
28
|
+
Mirage.pluggaloid_mirage_classes[klass.pluggaloid_mirage_namespace] = klass
|
29
|
+
end
|
17
30
|
end
|
18
31
|
|
19
32
|
def self.unwrap(namespace:, id:)
|
@@ -31,7 +44,7 @@ module Pluggaloid
|
|
31
44
|
|
32
45
|
def self.included(klass)
|
33
46
|
klass.extend(Extend)
|
34
|
-
pluggaloid_mirage_classes[klass.
|
47
|
+
pluggaloid_mirage_classes[klass.pluggaloid_mirage_namespace] = klass
|
35
48
|
end
|
36
49
|
|
37
50
|
def self.pluggaloid_mirage_classes
|
@@ -43,10 +56,14 @@ module Pluggaloid
|
|
43
56
|
def pluggaloid_mirage_id
|
44
57
|
generate_pluggaloid_mirage_id.freeze.tap do |id|
|
45
58
|
self.class.pluggaloid_mirage_repository[id] = self
|
46
|
-
Mirage.pluggaloid_mirage_classes[self.class.
|
59
|
+
Mirage.pluggaloid_mirage_classes[self.class.pluggaloid_mirage_namespace] ||= self.class
|
47
60
|
end
|
48
61
|
end
|
49
62
|
|
63
|
+
def pluggaloid_mirage_namespace
|
64
|
+
self.class.pluggaloid_mirage_namespace
|
65
|
+
end
|
66
|
+
|
50
67
|
private
|
51
68
|
|
52
69
|
# このClassのなかで、Pluggaloid::Mirageがインスタンスを同定するためのid(String)を返す。
|
data/lib/pluggaloid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluggaloid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiaki Asai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: delayer
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.2.
|
152
|
+
rubygems_version: 3.2.15
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Extensible plugin system
|