This file contains hidden or 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
class Animal | |
field :color, type: String | |
field :mammal, type: Boolean | |
... | |
index({ mammal: 1, color: 1 }, background: true) | |
end |
This file contains hidden or 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
> $LOAD_PATH | |
=> [".rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/rbidl-1.824.0/lib/_idl/generated/ruby", | |
"/opt/homebrew/Cellar/rbenv/1.2.0/rbenv.d/exec/gem-rehash", | |
".rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/bundler-2.4.13/lib", | |
".rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/will_paginate_mongoid-2.0.1/lib", | |
".rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/will_paginate-3.3.1/lib", ...] | |
$ gem install puma | |
Fetching puma-6.4.0.gem | |
Building native extensions. This could take a while... |
This file contains hidden or 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
> s = Date.new(2023, 11, 12) | |
=> #<Date: 2023–11–12> | |
> e = Date.new(2023, 11, 15) | |
=> #<Date: 2023–11–15> | |
> (s..e).map(&:to_s) | |
=> ["2023–11–12", "2023–11–13", "2023–11–14", "2023–11–15"] |
This file contains hidden or 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
Severity | Description | |
---|---|---|
Sev0 | A critical incident with very high impact that prevents majority of user from using product | |
Sev1 | A major incident with significant impac that prevents many users from using product | |
Sev2 | Customer-impacting issues that require immediate attention | |
Sev3 | A minor inconvenience to customers with a workaround available. Can be treated as “just a bug” unless it requires increased visibility. |
This file contains hidden or 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
## Sorbet | |
# typed: true | |
extend T::Sig | |
sig {params(name: String).returns(Integer)} | |
def main(name) | |
puts "Hello, #{name}!" | |
name.length | |
end |
This file contains hidden or 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
## "Pattern matching (for use in case/switch statements) | |
## is a feature allowing deep matching of structured values" | |
# version 2.6.5 | |
> {chicago: :cubs, stlouis: :cardinals, denver: :rockies} => {stlouis:} #=> SyntaxError | |
> 1 in 1 #=> SyntaxError | |
> 0 in 1 #=> SyntaxError | |
# version 3.0.1 | |
> {chicago: :cubs, stlouis: :cardinals, denver: :rockies} => {stlouis:} |
This file contains hidden or 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
FactoryBot.define do | |
factory :account do | |
name 'Checkr test' | |
uri_name 'checkr-test' | |
transient do | |
packages nil | |
test_packages nil | |
end | |
end |
This file contains hidden or 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
PackagesV1Spec::LIST /v1/packages::account with sub-accounts | |
[platform/checkr/spec/api/packages_v1_spec.rb:149] | |
Minitest::Assertion: --- expected | |
+++ actual | |
@@ -1 +1 @@ | |
-["motor_vehicle_973769", "health_screening_511139"] | |
+["health_screening_511139", "motor_vehicle_973769"] |
This file contains hidden or 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
def requires_time_freezing(time = Time.now) | |
before { Timecop.freeze(time) } | |
after { Timecop.return } | |
end |
This file contains hidden or 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
class Account < ActiveRecord::Base | |
regional_replicable | |
... | |
end | |
class Candidate < ActiveRecord::Base | |
... | |
end |
NewerOlder