8000 Strings are double-quoted by aaronjensen · Pull Request #1 · eventide-project/entity-store-postgres-test · GitHub
[go: up one dir, main page]

Skip to content

Strings are double-quoted #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gem 'evt-entity_store'
gem 'evt-messaging-postgres'
gem 'evt-entity_snapshot-postgres'
gem "evt-entity_store"
gem "evt-messaging-postgres"
gem "evt-entity_snapshot-postgres"

gem 'test_bench'
gem "test_bench"
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_store/postgres'
require "entity_store/postgres"
6 changes: 3 additions & 3 deletions lib/entity_store/postgres.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require 'messaging/postgres'
require 'entity_store'
require 'entity_snapshot/postgres'
require "messaging/postgres"
require "entity_store"
require "entity_snapshot/postgres"
26 changes: 13 additions & 13 deletions lib/entity_store/postgres/controls.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require 'entity_store/controls'
require "entity_store/controls"

require 'entity_store/postgres/controls/time'
require 'entity_store/postgres/controls/id'
require 'entity_store/postgres/controls/stream_name'
require 'entity_store/postgres/controls/category'
require 'entity_store/postgres/controls/version'
require 'entity_store/postgres/controls/message'
require 'entity_store/postgres/controls/batch'
require 'entity_store/postgres/controls/entity'
require 'entity_store/postgres/controls/projection'
require 'entity_store/postgres/controls/snapshot'
require 'entity_store/postgres/controls/write'
require 'entity_store/postgres/controls/entity_store'
require "entity_store/postgres/controls/time"
require "entity_store/postgres/controls/id"
require "entity_store/postgres/controls/stream_name"
require "entity_store/postgres/controls/category"
require "entity_store/postgres/controls/version"
require "entity_store/postgres/controls/message"
require "entity_store/postgres/controls/batch"
require "entity_store/post 8000 gres/controls/entity"
require "entity_store/postgres/controls/projection"
require "entity_store/postgres/controls/snapshot"
require "entity_store/postgres/controls/write"
require "entity_store/postgres/controls/entity_store"
4 changes: 2 additions & 2 deletions lib/entity_store/postgres/controls/snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Write
def self.call(category: nil, id: nil, message_data: nil)
message_data ||= MessageData.example

stream_name = Controls::StreamName.example(category: category, id: id, type: 'snapshot')
stream_name = Controls::StreamName.example(category: category, id: id, type: "snapshot")

write = ::MessageStore::Postgres::Write.build

Expand All @@ -34,7 +34,7 @@ def self.example(sum: nil, version: nil, time: nil)
message_data = MessageStore::MessageData::Write.build

message_data.data = data
message_data.type = 'Recorded'
message_data.type = "Recorded"

message_data
end
Expand Down
4 changes: 2 additions & 2 deletions lib/entity_store/postgres/controls/snapshot_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# def self.call(category: nil, id: nil, message_data: nil)
# message_data ||= MessageData.example

# stream_name = Controls::StreamName.example(category: category, id: id, type: 'snapshot')
# stream_name = Controls::StreamName.example(category: category, id: id, type: "snapshot")

# write = ::MessageStore::Postgres::Write.build

Expand All @@ -35,7 +35,7 @@
# message_data = MessageStore::MessageData::Write.build

# message_data.data = data
# message_data.type = 'Recorded'
# message_data.type = "Recorded"

# message_data
# end
Expand Down
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
2 changes: 1 addition & 1 deletion test.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
load './test/automated.rb'
load "./test/automated.rb"
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"
6 changes: 3 additions & 3 deletions test/automated/fetch/fetch.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Fetch" do
context "Entity" do
stream_name = Controls::Write.batch

id = stream_name.partition('-').last
category_name = stream_name.split('-').first
id = stream_name.partition("-").last
category_name = stream_name.split("-").first

store = Controls::EntityStore.example(category: category_name)

Expand Down
6 changes: 3 additions & 3 deletions test/automated/fetch/includes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Fetch" do
context "Includes" do
stream_name = Controls::Write.batch(category: 'testFetchWithIncludes')
stream_name = Controls::Write.batch(category: "testFetchWithIncludes")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand Down Expand Up @@ -39,7 +39,7 @@
permutations = includes.permutation(n).to_a

permutations.each do |includes|
context "#{includes.join(', ')}" do
context "#{includes.join(", ")}" do
results = store.fetch id, include: includes

includes.each_with_index do |include, i|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Fetch" do
context "Includes" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/fetch/stream_does_not_exist.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Fetch" do
context "Stream Does Not Exist" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/entity.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 "Entity" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/entity_compound_id.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 "Entity" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/get_version.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 "Version" do
Expand Down
6 changes: 3 additions & 3 deletions test/automated/get/includes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Get" do
context "Includes" do
stream_name = Controls::Write.batch(category: 'testEntityStoreGet')
stream_name = Controls::Write.batch(category: "testEntityStoreGet")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand Down Expand Up @@ -39,7 +39,7 @@
permutations = includes.permutation(n).to_a

permutations.each do |includes|
context "#{includes.join(', ')}" do
context "#{includes.join(", ")}" do
results = store.get id, include: includes

includes.each_with_index do |include, i|
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/includes_when_stream_does_not_exist.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 "Includes" do
Expand Down
2 changes: 1 addition & 1 deletion test/automated/get/stream_does_not_exist.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 "Stream does not exist" do
Expand Down
4 changes: 2 additions & 2 deletions test/automated/refreshing/entity_is_cached.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Refreshing" do
context "Entity is Cached" do
stream_name = Controls::Write.batch(category: 'testRefreshingEntityCached')
stream_name = Controls::Write.batch(category: "testRefreshingEntityCached")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand Down
4 changes: 2 additions & 2 deletions test/automated/refreshing/entity_is_not_cached.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Refreshing" do
context "Entity is Not Cached" do
stream_name = Controls::Write.batch(category: 'testEntityStoreGet')
stream_name = Controls::Write.batch(category: "testEntityStoreGet")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand Down
4 changes: 2 additions & 2 deletions test/automated/refreshing/probe.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Refreshing" do
context "Entity is Cached" do
stream_name = Controls::Write.batch(category: 'testRefreshingEntityCached')
stream_name = Controls::Write.batch(category: "testRefreshingEntityCached")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand Down
2 changes: 1 addition & 1 deletion test/automated/refreshing/stream_does_not_exist.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Refreshing" do
context "Stream Does Not Exist" do
Expand Down
4 changes: 2 additions & 2 deletions test/automated/snapshot/read_only.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Snapshot" do
context "Rea D96B d Only" do
snapshot_class = EntitySnapshot::Postgres::ReadOnly

category = 'example'
category = "example"
id = Controls::ID::Random.example

batch = Controls::Batch.example
Expand Down
6 changes: 3 additions & 3 deletions test/automated/snapshot/read_write.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require_relative '../automated_init'
require_relative "../automated_init"

context "Snapshot" do
context "Read-Write" do
snapshot_class = EntitySnapshot::Postgres

category = 'example'
specifier = 'SomeSpecifier'
category = "example"
specifier = "SomeSpecifier"
id = Controls::ID::Random.example

batch = Controls::Batch.example
Expand Down
4 changes: 2 additions & 2 deletions test/interactive.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative 'test_init'
require_relative "test_init"

TestBench::Runner.(
'interactive/**/*.rb',
"interactive/**/*.rb",
exclude_pattern: %r{\/_|sketch|(_init\.rb|_tests\.rb)\z}
) or exit 1
6 changes: 3 additions & 3 deletions test/interactive/interactive_init.rb
Original file line number Diff line number Diff line change @@ -1,4 +1,4 @@ require_relative '../test_init' require_relative "../test_init"
ENV['LOG_LEVEL'] ||= '_max' ENV['LOG_TAGS'] ||= 'test' ENV["LOG_LEVEL"] ||= "_max" ENV["LOG_TAGS"] ||= "test"
8 changes: 4 additions & 4 deletions test/interactive/performance.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require_relative 'interactive_init'
require_relative "interactive_init"

iterations = ENV.fetch('ITERATIONS') { '10' }.to_i
iterations = ENV.fetch("ITERATIONS") { "10" }.to_i

stream_name = Controls::Write.batch(category: 'testFetch')
stream_name = Controls::Write.batch(category: "testFetch")

id = Messaging::StreamName.get_id stream_name
category_name = Messaging::StreamName.get_category stream_name
Expand All @@ -18,7 +18,7 @@

finish_time = Time.now

puts "Iterations: #{iterations}, StartTime: #{start_time.strftime '%H:%M:%S.3%N'}, FinishTime: #{finish_time.strftime '%H:%M:%S.%3N'}"
puts "Iterations: #{iterations}, StartTime: #{start_time.strftime "%H:%M:%S.3%N"}, FinishTime: #{finish_time.strftime "%H:%M:%S.%3N"}"

average_time_ms = Rational (finish_time - start_time) * 1000, iterations
ips = Rational iterations, finish_time - start_time
Expand Down
6 changes: 3 additions & 3 deletions test/interactive/reader_batch_size.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ENV['LOG_TAGS'] ||= '_untagged,message_store,-data'
ENV['LOG_LEVEL'] ||= 'debug'
ENV["LOG_TAGS"] ||= "_untagged,message_store,-data"
ENV["LOG_LEVEL"] ||= "debug"

require_relative './interactive_init'
require_relative "./interactive_init"

batch_size = 2

Expand Down
12 changes: 6 additions & 6 deletions test/test_init.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ENV['CONSOLE_DEVICE'] ||= 'stdout'
ENV['LOG_LEVEL'] ||= '_min'
ENV["CONSOLE_DEVICE"] ||= "stdout"
ENV["LOG_LEVEL"] ||= "_min"

puts RUBY_DESCRIPTION

require_relative '../init.rb'
require_relative "../init.rb"

require 'test_bench'; TestBench.activate
require "test_bench"; TestBench.activate

require 'securerandom'
require "securerandom"

require 'entity_store/postgres/controls'
require "entity_store/postgres/controls"
Controls = ::EntityStore::Postgres::Controls
0