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 Entities | |
end | |
rom = ROM.container(:sql, 'sqlite::memory') do |conf| | |
conf.gateways[:default].use_logger(Logger.new($stdout)) | |
conf.default.create_table(:users) do | |
primary_key :id | |
column :login, String |
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
rom = ROM.container(:sql, 'sqlite::memory') do |conf| | |
conf.gateways[:default].use_logger(Logger.new($stdout)) | |
conf.default.create_table(:users) do | |
primary_key :id | |
column :login, String | |
end | |
conf.default.create_table(:tasks) do | |
primary_key :id |
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
rom = ROM.container(:sql, 'sqlite::memory') do |conf| | |
conf.gateways[:default].use_logger(Logger.new($stdout)) | |
conf.default.create_table(:users) do | |
primary_key :id | |
column :login, String, null: false | |
end | |
conf.default.create_table(:employees) do | |
primary_key :id |
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' | |
require 'dry-types' | |
Bundler.require | |
module Types | |
include Dry::Types.module | |
end | |
rom = ROM.container(:sql, 'sqlite::memory') do |conf| | |
conf.gateways[:default].use_logger(Logger.new($stdout)) |
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 "azure" | |
require 'azure/base_management/management_http_request.rb' | |
require 'azure/core/http/http_request' | |
Azure.configure do |config| | |
config.storage_account_name = "storage_account_name" | |
config.storage_access_key = "storage_access_key" | |
config.management_certificate = "cert.pfx" | |
config.subscription_id = "subscription_id" | |
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
#Signing AWS Requests By Using Signature Version 4 | |
#http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html | |
require 'uri' | |
require 'openssl' | |
require 'net/http' | |
require 'cgi' | |
method = 'GET' | |
service = 'iam' |