Sha256: f2b22dc15f7c17201600844a58b1ba6f7d3a615ac0201095d56ae1b7fa752617
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
# encoding: utf-8 require 'commander/import' class Simon def rename puts "rename called" end def msg(msg) puts "---> #{msg}" end def complete() puts "\n( ͡° ͜ʖ ͡°) --thank you" end def setup name_space = ask("Namespace [a-zA-Z0-9_] : ") { |q| q.echo = true } @nms = Regexp.escape(name_space) # escape any special characters # javascript cmd = "find . -type f -name '*.js' -exec sed -i '' s/CHANGE_ME/#{@nms}/ {} +" Kernel::system(cmd) # php cmd = "find . -type f -name '*.php' -exec sed -i '' s/CHANGE_ME/#{@nms}/ {} +" Kernel::system(cmd) # html cmd = "find . -type f -name '*.html' -exec sed -i '' s/CHANGE_ME/#{@nms}/ {} +" Kernel::system(cmd) # tpl cmd = "find . -type f -name '*.tpl' -exec sed -i '' s/CHANGE_ME/#{@nms}/ {} +" Kernel::system(cmd) # simon_controller.find_and_replace './app'ateasub01@ choice = choose("Setup Local DB?", :yes, :now) if choice === :yes self.msg 'setting up Local DB' end self.msg 'Setup complete!' self.complete end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my-simon-0.1.6 | lib/simon.rb |