[ Gemspec ]

This commit is contained in:
Mateus Cezário Barreto 2025-11-06 14:29:33 -03:00
commit 8dfb642c84
6 changed files with 52 additions and 3 deletions

35
bin/tonton-web Normal file
View file

@ -0,0 +1,35 @@
#! /usr/bin/ruby
require 'sod'
class New < Sod::Action
on "--new", argument: "NAME"
def call(name)
destination_root = Pathname.new name
destination_root.mkdir
(destination_root+'modules').mkdir
gem_root = Pathname.new(__FILE__).parent + '..'
for source in gem_root.glob('{example/*,*.md}')
destination = destination_root + source.basename
`cp #{source} #{destination}`
end
(destination_root+'views').mkdir
`cp -r #{gem_root+'views'} #{destination_root}`
end
end
cli = Sod.new(banner: "TonTon Web 0.0.0: TonTon utilitary for web apps") do
on(New)
on Sod::Prefabs::Actions::Help, self
end
cli.call