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
data = { | |
'mon_1_open': '09:00', | |
'mon_1_close': '13:00', | |
'tue_1_open': '09:00', | |
'tue_1_close': '13:00', | |
'wed_1_open': '16:00', | |
'wed_1_close': '20:00', | |
'thu_1_open': '09:00', | |
'thu_1_close': '13:00', | |
'fri_1_open': '09:00', |
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
version: "2.1" | |
services: | |
web: | |
depends_on: | |
rabbit: | |
condition: service_healthy | |
postgres: | |
condition: service_healthy | |
redis: | |
condition: service_started |
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
# somewhere in lib or services | |
module Encryptable | |
def encrypt_columns(*columns) | |
columns.each do |column| | |
if self.column_names.include?("encrypted_#{column}") | |
self.send(:attr_accessor, column) | |
define_method "#{column}=" do |value| | |
self["encrypted_#{column}"] = self.class.verifier.generate(value) |
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 Mq::RabbitService | |
attr_reader :queue_name | |
def initialize(queue_name) | |
@queue_name = queue_name | |
end | |
def connection | |
@connection ||= Bunny.new(host: '192.168.1.67', port: 5672, user: 'oleg', password: '111111').start | |
end |