Phase 1: warp_engine gem skeleton (path gem, mounted engine)
- libs/ruby/warp_engine: gemspec, WarpEngine::Engine (isolate_namespace with empty table_name_prefix), WarpEngine.configure surface (container paths, update_secret, image_owners), empty engine routes - host Gemfile: path gem; host routes: mount WarpEngine::Engine => "/" as the last entry so host routes always win - docker: api build context moved to repo root so libs/ is visible at bundle-install time; ./libs:/libs runtime mount; root .dockerignore to keep data/ and node_modules out of the build context Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
require "warp_engine/version"
|
||||
require "warp_engine/configuration"
|
||||
|
||||
module WarpEngine
|
||||
# A tábláink prefix nélküliek (softwares, releases, ...) — az isolate_namespace
|
||||
# által generált "warp_engine_" prefixet üresre cseréljük. Az engine.rb require-je
|
||||
# előtt kell definiálva lennie.
|
||||
def self.table_name_prefix
|
||||
""
|
||||
end
|
||||
|
||||
def self.config
|
||||
@config ||= Configuration.new
|
||||
end
|
||||
|
||||
def self.configure
|
||||
yield(config)
|
||||
end
|
||||
end
|
||||
|
||||
require "warp_engine/engine"
|
||||
@@ -0,0 +1,19 @@
|
||||
module WarpEngine
|
||||
class Configuration
|
||||
# Owner kontraktus az image_owners elemeire:
|
||||
# label: String
|
||||
# image_ids: -> { Array<Integer> } — az owner által használt image id-k
|
||||
# usage_label: ->(image) { String vagy nil } — megjelenítendő címke, ha használja
|
||||
attr_accessor :file_container_path,
|
||||
:image_container_path,
|
||||
:update_secret,
|
||||
:image_owners
|
||||
|
||||
def initialize
|
||||
@file_container_path = ENV.fetch("FILE_CONTAINER_PATH", "/softwares")
|
||||
@image_container_path = ENV.fetch("IMAGE_CONTAINER_PATH", "/images")
|
||||
@update_secret = ENV["UPDATE_SECRET"]
|
||||
@image_owners = []
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
module WarpEngine
|
||||
class Engine < ::Rails::Engine
|
||||
isolate_namespace WarpEngine
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
module WarpEngine
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
Reference in New Issue
Block a user