Compiling with the -d:release
flag will turn
the bounds checks off. This will result in higher performance but less safety.
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
SELECT `applications`.* FROM `applications` LEFT OUTER JOIN `agreements` `agreements_f0` ON `applications`.`id` = `agreements_f0`.`application_id` WHERE ((`applications`.`hidden` = ? OR `applications`.`hidden` IS ?)) AND ((LOWER(`applications`.`client_name`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_email`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_identification_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone2`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone3`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone4`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_vin`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`number`) LIKE LOWER(?)) OR (LOWER(`applications`.`reque |
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
{ | |
"scope spec template": { | |
"prefix": "scope_spec", | |
"body": [ | |
"describe \".SCOPE_NAME\" do", | |
" subject(:collection) { described_class.SCOPE_NAME }", | |
"", | |
" context \"when instantiating actual records\", :slow do", | |
" let!(:match) { create(:FACTORY, :TRAIT) }", | |
" let!(:counter) { create(:FACTORY) }", |
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
{ | |
"workbench.colorTheme": "Solarized Dark", | |
"editor.minimap.enabled": false, | |
"explorer.fontFamily": "DejaVu Sans Mono", | |
"explorer.autoReveal": false, | |
"editor.fontFamily": "DejaVu Sans Mono, 'Courier New', monospace, 'Droid Sans Fallback'", | |
"editor.tabSize": 2, | |
"editor.fontSize": 12.5, | |
"window.zoomLevel": 1, | |
"editor.rulers": [80, 120], |
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
module V1 | |
module Api | |
class TestService | |
# This service TODO | |
def initialize | |
end | |
def call | |
end |
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
# single install | |
gem install pg -v 1.1.4 -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/12/bin/pg_config | |
# permanent config, troublesome | |
bundle config build.pg --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.6/bin/pg_config |
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
{"lastUpload":"2021-06-15T07:37:30.093Z","extensionVersion":"v3.4.3"} |
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
file | line_number | group | time | |
---|---|---|---|---|
./spec/setup_benchmark.rb | 9 | SetupBenchmark::NewVSAllOthersWhenTestingBookVampireTitle::WhenSettingUpWithNew | 0.198 | |
./spec/setup_benchmark.rb | 17 | SetupBenchmark::NewVSAllOthersWhenTestingBookVampireTitle::WhenSettingUpWithInstanceDouble | 0.173 | |
./spec/setup_benchmark.rb | 25 | SetupBenchmark::NewVSAllOthersWhenTestingBookVampireTitle::WhenSettingUpWithFactoryGirlBuildStubbed | 0.396 | |
./spec/setup_benchmark.rb | 33 | SetupBenchmark::NewVSAllOthersWhenTestingBookVampireTitle::WhenSettingUpWithFactoryGirlBuild | 0.916 | |
./spec/setup_benchmark.rb | 41 | SetupBenchmark::NewVSAllOthersWhenTestingBookVampireTitle::WhenSettingUpWithFactoryGirlCreate | 1.155 | |
./spec/setup_benchmark.rb | 55 | SetupBenchmark::InstanceDoubleVSFactoryGirlBuildStubbedFactoryGirlBuildAndFactoryGirlCreate::WhenSettingUpWithInstanceDouble | 0.443 |
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
after_save :do_something | |
private | |
def do_something | |
ApplicationRecord.class | |
end |
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
describe "FactoryGirl.build VS FactoryGirl.create" do | |
subject { book.save! } | |
bout4_number_of = 200 | |
context "when setting up with FactoryGirl.build" do | |
let(:book) { build(:book) } | |
bout4_number_of.times do | |
it "triggers ApplicationRecord.class in callback" do |