Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gemspec
32 changes: 16 additions & 16 deletions entity_cache.gemspec
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'evt-entity_cache'
s.version = '2.0.1.4'
s.summary = 'Cache of entities retrieved by an entity-store, with in-memory temporary and on-disk permanent storage options'
s.description = ' '
s.name = "evt-entity_cache"
s.version = "2.0.1.4"
s.summary = "Cache of entities retrieved by an entity-store, with in-memory temporary and on-disk permanent storage options"
s.description = " "

s.authors = ['The Eventide Project']
s.email = '[email protected]'
s.homepage = 'https://github.com/eventide-project/entity-cache'
s.licenses = ['MIT']
s.authors = ["The Eventide Project"]
s.email = "[email protected]"
s.homepage = "https://github.com/eventide-project/entity-cache"
s.licenses = ["MIT"]

s.require_paths = ['lib']
s.files = Dir.glob('{lib}/**/*')
s.require_paths = ["lib"]
s.files = Dir.glob("{lib}/**/*")
s.platform = Gem::Platform::RUBY
s.required_ruby_version = '>= 2.4'
s.required_ruby_version = ">= 2.4"

s.add_runtime_dependency 'evt-configure'
s.add_runtime_dependency 'evt-message_store'
s.add_runtime_dependency 'evt-settings'
s.add_runtime_dependency 'evt-telemetry'
s.add_runtime_dependency "evt-configure"
s.add_runtime_dependency "evt-message_store"
s.add_runtime_dependency "evt-settings"
s.add_runtime_dependency "evt-telemetry"

s.add_development_dependency 'test_bench'
s.add_development_dependency "test_bench"
end
4 changes: 2 additions & 2 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require_relative './load_path'
require_relative "./load_path"

require 'entity_cache'
require "entity_cache"
48 changes: 24 additions & 24 deletions lib/entity_cache.rb
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
require 'configure'
require 'message_store'
require 'settings'
require 'telemetry'
require "configure"
require "message_store"
require "settings"
require "telemetry"

require 'entity_cache/log'
require "entity_cache/log"

require 'entity_cache/defaults'
require "entity_cache/defaults"

require 'entity_cache/subject'
require "entity_cache/subject"

require 'entity_cache/record'
require 'entity_cache/record/destructure'
require 'entity_cache/record/log_text'
require 'entity_cache/record/transformer'
require "entity_cache/record"
require "entity_cache/record/destructure"
require "entity_cache/record/log_text"
require "entity_cache/record/transformer"

require 'entity_cache/store/external'
require 'entity_cache/store/external/null'
require 'entity_cache/store/external/substitute'
require 'entity_cache/store/external/telemetry'
require "entity_cache/store/external"
require "entity_cache/store/external/null"
require "entity_cache/store/external/substitute"
require "entity_cache/store/external/telemetry"

require 'entity_cache/store/internal'
require 'entity_cache/store/internal/build'
require 'entity_cache/store/internal/build/defaults'
require 'entity_cache/store/internal/scope/exclusive'
require 'entity_cache/store/internal/scope/global'
require 'entity_cache/store/internal/scope/thread'
require 'entity_cache/store/internal/substitute'
require "entity_cache/store/internal"
require "entity_cache/store/internal/build"
require "entity_cache/store/internal/build/defaults"
require "entity_cache/store/internal/scope/exclusive"
require "entity_cache/store/internal/scope/global"
require "entity_cache/store/internal/scope/thread"
require "entity_cache/store/internal/substitute"

require 'entity_cache/entity_cache'
require 'entity_cache/substitute'
require "entity_cache/entity_cache"
require "entity_cache/substitute"
36 changes: 18 additions & 18 deletions lib/entity_cache/controls.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
require 'json'
require 'fileutils'
require "json"
require "fileutils"

require 'clock/controls'
require 'identifier/uuid/controls'
require "clock/controls"
require "identifier/uuid/controls"

require 'entity_cache/controls/entity'
require 'entity_cache/controls/id'
require 'entity_cache/controls/record'
require 'entity_cache/controls/subject'
require 'entity_cache/controls/time'
require 'entity_cache/controls/version'
require "entity_cache/controls/entity"
require "entity_cache/controls/id"
require "entity_cache/controls/record"
require "entity_cache/controls/subject"
require "entity_cache/controls/time"
require "entity_cache/controls/version"

require 'entity_cache/controls/specifier'
require "entity_cache/controls/specifier"

require 'entity_cache/controls/persist_interval'
require "entity_cache/controls/persist_interval"

require 'entity_cache/controls/store/external'
require 'entity_cache/controls/store/external/example'
require 'entity_cache/controls/store/external/not_implemented'
require 'entity_cache/controls/store/external/write'
require "entity_cache/controls/store/external"
require "entity_cache/controls/store/external/example"
require "entity_cache/controls/store/external/not_implemented"
require "entity_cache/controls/store/external/write"

require 'entity_cache/controls/store/internal'
require "entity_cache/controls/store/internal"

require 'entity_cache/controls/entity_cache'
require "entity_cache/controls/entity_cache"
4 changes: 2 additions & 2 deletions lib/entity_cache/controls/entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ def self.id
end

def self.some_attr
'some-value'
"some-value"
end

def self.other_attr
'other-value'
"other-value"
end

Example = Struct.new(:id, :some_attr, :other_attr)
Expand Down
2 changes: 1 addition & 1 deletion lib/entity_cache/controls/specifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class EntityCache
module Controls
module Specifier
def self.example(specifier: nil, random: nil)
specifier ||= 'SomeSpecifier'
specifier ||= "SomeSpecifier"
random ||= false

if random
Expand Down
2 changes: 1 addition & 1 deletion lib/entity_cache/controls/store/external/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def path(id)
def self.path(subject, id=nil)
id ||= ID.example

filename = "#{subject.to_s.gsub('/', '-')}-#{id}.yaml"
filename = "#{subject.to_s.gsub("/", "-")}-#{id}.yaml"

full_name = File.join(file_dump_directory, filename)

Expand Down
2 changes: 1 addition & 1 deletion lib/entity_cache/store/internal/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def self.scope_class(scope)
*scopes, final_scope = self.scopes.keys

scope_list = <<~TEXT
#{scopes.map(&:inspect) * ', '} or #{final_scope.inspect}
#{scopes.map(&:inspect) * ", "} or #{final_scope.inspect}
TEXT

error_message = %{Scope #{scope.inspect} is unknown. It must be one of: #{scope_list}}
Expand Down
4 changes: 2 additions & 2 deletions lib/entity_cache/store/internal/build/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def self.get
end

def self.env_var
'ENTITY_CACHE_SCOPE'
"ENTITY_CACHE_SCOPE"
end

def self.default
'thread'
"thread"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/entity_cache/subject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.hash_key(entity_class, specifier=nil)
end

def self.hash_key_separator
'/'
"/"
end
end
end
6 changes: 3 additions & 3 deletions load_path.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bundler_standalone_loader = 'gems/bundler/setup'
bundler_standalone_loader = "gems/bundler/setup"

begin
require_relative bundler_standalone_loader
Expand All @@ -8,10 +8,10 @@
Bundler.require
end

lib_dir = File.expand_path('lib', __dir__)
lib_dir = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)

libraries_dir = ENV['LIBRARIES_HOME']
libraries_dir = ENV["LIBRARIES_HOME"]
unless libraries_dir.nil?
libraries_dir = File.expand_path(libraries_dir)
$LOAD_PATH.unshift libraries_dir unless $LOAD_PATH.include?(libraries_dir)
Expand Down
6 changes: 3 additions & 3 deletions test/automated.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative './test_init'
require_relative "./test_init"

TestBench::Run.(
'test/automated',
exclude: '{_*,*sketch*,*_init,*_tests}.rb'
"test/automated",
exclude: "{_*,*sketch*,*_init,*_tests}.rb"
) or exit(false)
2 changes: 1 addition & 1 deletion test/automated/automated_init.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require_relative '../test_init'
require_relative "../test_init"
2 changes: 1 addition & 1 deletion test/automated/build/build.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Build" do
entity_class = Controls::Entity::Example
Expand Down
2 changes: 1 addition & 1 deletion test/automated/build/clock.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Build" do
context "Clock" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/build/external_store.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Build" do
context "External Store Implementation" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/build/internal_store.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Build" do
context "Internal Store" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/build/persist_interval.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Build" do
context "Persist Interval" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/configure.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "External Store" do
context "Configure" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/entity_class.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "External Store" do
context "Entity Class" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/get/found.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Get" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/get/not_found.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Get" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/get/not_implemented.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Get" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/get/telemetry/found.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../../automated_init'
require_relative "../../../automated_init"

context "External Store" do
context "Get" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/get/telemetry/not_found.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../../automated_init'
require_relative "../../../automated_init"

context "External Store" do
context "Get" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/null/get.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Null" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/null/put.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Substitute" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/put/not_implemented.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Put" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/put/put_and_get.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Put" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/put/telemetry.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Put" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/specifier.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "External Store" do
context "Specifier" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/substitute/get.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Substitute" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/external_store/substitute/put.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../automated_init'
require_relative "../../automated_init"

context "External Store" do
context "Substitute" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/hit.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Get" do
context "Hit" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/miss.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Get" do
context "Miss" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/restore.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Get" do
context "Restore From External Store" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/internal_store/configure_receiver.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Internal Store" do
context "Configure Receiver" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/internal_store/count.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Internal Store" do
context "Count" do
Expand Down
Loading