puzzly_api_plugin 0.1.3 → 0.1.4

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: a8082885784677369a4fca2ac59e71f12657ffa9314b4fe9c1acc04c7cb333e6
4
- data.tar.gz: 79ba78676069453e25743baf5d11aafb18d630be42ad5bb388d2558b594f24d5
3
+ metadata.gz: 5b821f3611700697ed1875b2ce456df23182e6838eb6b0d779e5ff992b8fbfd4
4
+ data.tar.gz: 5cfda4b4833579ddca6e43fcdd623e5d1de173142251b3dc068954165bd4ed15
5
5
  SHA512:
6
- metadata.gz: d0d1890ed66577babf8259f7c617e97417f9e819f9ac3cd8ad0db71d4b05bd7e3fb4fadf66c90818296b2eca72679825f3dc8c76e8547dfa6163095d666a2228
7
- data.tar.gz: 57a447f7b1fa6ca3fcccce27cfe3a82c64e6b587844a2256a1e49d90901e799ff9bf1c1e86ba66c200bf6c8c8a39daa5269ae9d1a38318c15c421efaf2c77f3c
6
+ metadata.gz: 9ae0c24c9c56481baac5e286b065ba7aa367a1f96f6aec77fa407130ff07bce15877d709b50ec9abcab9e3ef7faf141359f53ed31f072063215005532b3c8c0f
7
+ data.tar.gz: 3765a3870d77789c17e69d67522f895812ba73b994a5322966382db5ddad9d86e8c60803a86bee9b4917d109a9cc5879f3c4dc09adde0274470ec846e9196d52
@@ -16,5 +16,9 @@ module PuzzlyApiPlugin
16
16
  def get_by_module(mod)
17
17
  select { |_id, cache| mod.id <=> cache.module_id }
18
18
  end
19
+
20
+ def get_by_schema(schema)
21
+ select { |_id, cache| schema.id <=> cache.schema_id }
22
+ end
19
23
  end
20
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuzzlyApiPlugin
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
@@ -10,7 +10,7 @@ module PuzzlyApiPlugin
10
10
  schema = SchemasCollection.instance.get_by_id cache.schema_id
11
11
  end
12
12
 
13
- CacheView.new(mod.to_identity, schema,
13
+ CacheView.new(mod.to_identity, schema.to_identity,
14
14
  cache)
15
15
  end
16
16
 
@@ -5,19 +5,22 @@ module PuzzlyApiPlugin
5
5
  def self.create(schema)
6
6
  context = ContextsCollection.instance.get_by_id schema.context_id
7
7
 
8
+ caches = CachesCollection.instance.get_by_schema schema
8
9
  topics = TopicsCollection.instance.get_by_schema schema
9
10
 
10
11
  SchemaView.new( context.to_identity,
11
12
  schema,
12
- topics.map { |_id, topic| topic.to_identity })
13
+ topics.map { |_id, topic| topic.to_identity },
14
+ caches.map {|_id, cache| cache.to_identity})
13
15
  end
14
16
 
15
- def initialize(context, schema, topics)
17
+ def initialize(context, schema, topics, caches)
16
18
  schema.copy_to_hash self
17
19
  self.delete MetadataFields::CONTEXT_ID
18
20
 
19
21
  self[MetadataFields::CONTEXT] = context
20
22
  self.topics topics
23
+ self.caches caches
21
24
  end
22
25
  end
23
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puzzly_api_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mr. Braz