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
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "activerecord", "7.1.3.4" | |
gem "sqlite3" | |
gem "benchmark-ips" | |
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
source "https://rubygems.org" | |
ruby "3.2.0" | |
gem "debug" |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(false) do | |
source 'https://rubygems.org' |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(false) do | |
source 'https://rubygems.org' |
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
class Comment < ActiveRecord::Base | |
belongs_to :post, counter_cache: true | |
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
# config/deploy.rb | |
# … | |
# Puma tasks are in lib/capistrano/tasks/puma.rake | |
after 'deploy:finished', 'puma:restart' | |
# Sidekiq tasks are in lib/capistrano/tasks/sidekiq.rake | |
after 'deploy:starting', 'sidekiq:quiet' | |
after 'deploy:updated', 'sidekiq:stop' |
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
#!/usr/bin/env ruby | |
puts ARGV[0] |
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
def some_method | |
some_variable = 42 | |
yield some_variable | |
end | |
some_method do |that_variable| | |
puts that_variable | |
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
$ bundle exec ruby spec.rb 1 ↵ | |
Fetching gem metadata from https://rubygems.org/.......... | |
Resolving dependencies... | |
Using bundler 1.17.3 | |
Using diff-lcs 1.3 | |
Using rspec-support 3.8.0 | |
Using rspec-core 3.8.0 | |
Using rspec-expectations 3.8.2 | |
Using rspec-mocks 3.8.0 |
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
# app/controllers/owner/reservations_controller.rb | |
class Owner::ReservationsController < ApplicationController | |
def create | |
# … | |
end | |
end |
NewerOlder