Class: Capsium::Cli::Package
- Inherits:
-
Thor
- Object
- Thor
- Capsium::Cli::Package
- Extended by:
- ThorExt::Start
- Defined in:
- lib/capsium/cli.rb
Instance Method Summary collapse
- #info(path_to_package) ⇒ Object
- #manifest(path_to_package) ⇒ Object
- #metadata(path_to_package) ⇒ Object
- #pack(path_to_package) ⇒ Object
- #routes(path_to_package) ⇒ Object
- #storage(path_to_package) ⇒ Object
Methods included from ThorExt::Start
Instance Method Details
#info(path_to_package) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/capsium/cli.rb', line 19 def info(path_to_package) package = Capsium::Package.new(path_to_package) puts "Package Path: #{package.path}" puts "Routes: #{package.routes.as_json}" puts "Manifest: #{package.manifest.as_json}" end |
#manifest(path_to_package) ⇒ Object
29 30 31 32 |
# File 'lib/capsium/cli.rb', line 29 def manifest(path_to_package) package = Capsium::Package.new(path_to_package) puts JSON.pretty_generate(package.manifest.as_json) end |
#metadata(path_to_package) ⇒ Object
50 51 52 53 |
# File 'lib/capsium/cli.rb', line 50 def (path_to_package) package = Capsium::Package.new(path_to_package) puts JSON.pretty_generate(package..as_json) end |
#pack(path_to_package) ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/capsium/cli.rb', line 58 def pack(path_to_package) package = Capsium::Package.new(path_to_package) packager = Capsium::Packager.new packager.pack(package, ) rescue StandardError => e puts e puts e.inspect puts e.backtrace end |