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
[Trace - 04:22:37 PM] Sending notification 'textDocument/didChange'. | |
Params: { | |
"textDocument": { | |
"uri": "file:///Users/fritzmeissner/devprojects/school-api/app/models/school.rb", | |
"version": 1 | |
}, | |
"contentChanges": [ | |
{ | |
"range": { | |
"start": { |
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
namespace :solargraph do | |
task update_model_definitions: :environment do | |
if Rails.env.development? | |
Rails.application.eager_load! | |
def_file = Rails.root.join('config', 'model_definitions.rb') | |
File.open(def_file, 'w') do |file| | |
ApplicationRecord.descendants.each do |model| | |
file << "class #{model.name}\n" | |
klass = model.name.constantize | |
klass.attribute_names.each do |name| |
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
FROM ruby:2.5.5-alpine as base | |
# Configure the main working directory. This is the base | |
# directory used in any further RUN, COPY, and ENTRYPOINT | |
# commands. | |
WORKDIR /app | |
RUN apk update && apk add --no-cache --virtual .run-deps \ | |
bash \ | |
python \ |
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
# frozen_string_literal: true | |
require 'pubbit' | |
module Publisher | |
class Exchange | |
def self.publish(event) | |
new('school_api.updates').publish(event) | |
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
# frozen_string_literal: true | |
require 'pubbit' | |
module Publisher | |
class Exchange | |
def self.publish(event) | |
new('school_api.updates').publish(event) | |
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
class GameState | |
attr_accessor :matrix | |
def initialize(matrix) | |
@matrix = deep_dup(matrix) | |
@next_step = deep_dup(matrix) | |
end | |
def [](y) | |
@matrix[y] |
NewerOlder