Sha256: 6070af7d5f61e86a63ad50c22b7a8b100b9454b7977a17863c6a64ca61b98e32
Contents?: true
Size: 1.6 KB
Versions: 4
Compression:
Stored size: 1.6 KB
Contents
require_relative "souls/version" require "active_support/core_ext/string/inflections" require_relative "souls/init" require_relative "souls/generate" require_relative "souls/gcloud" require "json" require "fileutils" module Souls SOULS_METHODS = [ "model", "query", "mutation", "type", "resolver", "policy", "rspec_factory", "rspec_model", "rspec_query", "rspec_mutation", "rspec_resolver", "rspec_policy" ] class Error < StandardError; end class << self attr_accessor :configuration def run_psql system "docker run --rm -d \ -p 5433:5432 \ -v postgres-tmp:/var/lib/postgresql/data \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_DB=souls_test \ postgres:13-alpine" system "docker ps" end def run_mysql system "docker run --rm -d \ -p 3306:3306 \ -v mysql-tmp:/var/lib/mysqlql/data \ -e MYSQL_USER=mysql \ -e MYSQL_PASSWORD=mysql \ -e MYSQL_DB=souls_test \ mysql:latest" system "docker ps" end def run_awake url app = Souls.configuration.app system "gcloud scheduler jobs create http #{app}-awake --schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET" end end def self.configure self.configuration ||= Configuration.new yield(configuration) end class Configuration attr_accessor :app, :strain, :project_id def initialize @app = nil @project_id = nil @strain = nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
souls-0.22.1 | lib/souls.rb |
souls-0.22.0 | lib/souls.rb |
souls-0.21.9 | lib/souls.rb |
souls-0.21.8 | lib/souls.rb |