-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meet new Core rewritten from scratch! Featuring new schema declaration syntax, type-safe querying, spec splitting and overall code reduction! Removed functionality: - Validations have been removed. Use external shards instead if needed. Closes #46 - Repository `#insert`, `#update`, `#delete` and all query other than `#query` methods are removed in favour of type safety, thus closing #47 and closing #61 and also closing #33 - Converters concept has been liquidated, types now rely on `#to_db` and `#from_rs` methods via monkey patching, which closes #60 New schema declaration syntax closes #58 and closes #52. Rewritten Query resolves #48. The overhaul itself closes #55 as well Hope you guys enjoy it!
- Loading branch information
Showing
120 changed files
with
3,631 additions
and
4,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
root = true | ||
|
||
[*.cr] | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "./bench/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require "benchmark" | ||
require "colorize" | ||
require "../spec/models" | ||
|
||
COLORS = { | ||
header: :yellow, | ||
subheader: :blue, | ||
success: :green, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require "./bench_helper" | ||
|
||
puts "\nRunning Core::Logger benchmarks...\n".colorize(COLORS["header"]) | ||
|
||
def devnull | ||
File.open(File::DEVNULL, mode: "w") | ||
end | ||
|
||
logger = Logger.new(devnull, Logger::DEBUG) | ||
|
||
elapsed = Time.measure do | ||
Benchmark.ips do |x| | ||
io = Core::Logger::IO.new(devnull) | ||
|
||
x.report "io w/ colors" do | ||
io.wrap("foo") { nil } | ||
end | ||
|
||
io = Core::Logger::IO.new(devnull, false) | ||
|
||
x.report "io w/o colors" do | ||
io.wrap("foo") { nil } | ||
end | ||
|
||
std_logger = Core::Logger::Standard.new(logger, Logger::Severity::INFO) | ||
|
||
x.report "logger w/ colors" do | ||
std_logger.wrap("foo") { nil } | ||
end | ||
|
||
std_logger = Core::Logger::Standard.new(logger, Logger::Severity::INFO, false) | ||
|
||
x.report "logger w/o colors" do | ||
std_logger.wrap("foo") { nil } | ||
end | ||
end | ||
end | ||
|
||
puts "\nCompleted in #{TimeFormat.auto(elapsed)} ✔️".colorize(COLORS["success"]) |
Oops, something went wrong.