-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup, added Funko object, support funko metadata
- Loading branch information
Showing
9 changed files
with
83 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/bin/ | ||
/.shards/ | ||
*.dwarf | ||
tmp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: hello | ||
runtime: crystal |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require "yaml" | ||
|
||
class Funko | ||
include YAML::Serializable | ||
|
||
# Required, the name of the funko. Must be unique across FaaSO | ||
property name : String | ||
|
||
# if Nil, it has no template whatsoever | ||
property runtime : (String | Nil)? = nil | ||
|
||
# Port of the funko process (optional, default is 3000) | ||
property port : UInt32? = 3000 | ||
|
||
# Extra packages, passed as EXTRA_PACKAGES argument | ||
# to the Dockerfile, use it for installing things in | ||
# the SHIPPED docker image | ||
property extra_packages : Array(String)? | ||
|
||
# Extra packages, passed as DEVEL_PACKAGES argument | ||
# to the Dockerfile, use it for installing things in | ||
# the docker stage used to build the code | ||
property devel_packages : Array(String)? | ||
|
||
# Where this is located in the filesystem | ||
@[YAML::Field(ignore: true)] | ||
property path : String = "" | ||
|
||
def self.from_paths(paths : Array(String | Path)) : Array(Funko) | ||
paths.map { |path| Path.new(path, "funko.yml") } | ||
.select { |path| File.exists?(path) } | ||
.map { |path| | ||
f = Funko.from_yaml(File.read(path.to_s)) | ||
f.path = path.parent.to_s | ||
f | ||
} | ||
end | ||
end |