lib/siren/cli.rb in altaire-siren-0.1.0 vs lib/siren/cli.rb in altaire-siren-0.1.2
- old
+ new
@@ -3,10 +3,24 @@
require 'siren'
module Siren
module CLI
+ class ComposeCommand < Clamp::Command
+
+ subcommand %w(c conv convert), "Convert compose file to resources" do
+ parameter "COMPOSE", "the compose file", default: "docker-compose.yml"
+ def execute
+ song = Siren::Compose.load(compose)
+ # open(compose.gsub(/[^.]+$/, 'k8s.yaml'), "w") do |io|
+ puts song.to_stack.to_yaml
+ # end
+ end
+ end
+
+ end
+
class SongfileCommand < Clamp::Command
subcommand %w(c conv convert), "Convert songfile to resources" do
parameter "SONGFILE", "the Songfile"
def execute
@@ -68,10 +82,11 @@
puts "siren #{Siren::VERSION}"
exit(0)
end
end
- subcommand %w(c crypto cryptography), "Cryptography (JOSE) commands", CryptoCommand
+ # subcommand %w(c crypto cryptography), "Cryptography (JOSE) commands", CryptoCommand
+ subcommand %w(c compose docker-compose), "Docker compose file commands", ComposeCommand
subcommand %w(s song songs songfile), "Songfile commands", SongfileCommand
end
def self.start