diff --git a/README.md b/README.md index 7e70f37a..77361132 100644 --- a/README.md +++ b/README.md @@ -289,15 +289,15 @@ $ ronin-web new server server.rb Generate a new web app: ```shell -$ ronin-web new webapp app - mkdir app - mkdir app/lib - mkdir app/views - mkdir app/public - erb .ruby-version.erb app/.ruby-version - cp Gemfile app - erb app.rb.erb app/app.rb - cp config.ru app +$ ronin-web new app myapp + mkdir myapp + mkdir myapp/lib + mkdir myapp/views + mkdir myapp/public + erb .ruby-version.erb myapp/.ruby-version + cp Gemfile myapp + erb app.rb.erb myapp/app.rb + cp config.ru myapp ``` Open the Ronin Web Ruby REPL: diff --git a/data/new/webapp/.gitignore b/data/new/app/.gitignore similarity index 100% rename from data/new/webapp/.gitignore rename to data/new/app/.gitignore diff --git a/data/new/webapp/.ruby-version.erb b/data/new/app/.ruby-version.erb similarity index 100% rename from data/new/webapp/.ruby-version.erb rename to data/new/app/.ruby-version.erb diff --git a/data/new/webapp/Dockerfile.erb b/data/new/app/Dockerfile.erb similarity index 100% rename from data/new/webapp/Dockerfile.erb rename to data/new/app/Dockerfile.erb diff --git a/data/new/webapp/Gemfile b/data/new/app/Gemfile similarity index 100% rename from data/new/webapp/Gemfile rename to data/new/app/Gemfile diff --git a/data/new/webapp/app.rb.erb b/data/new/app/app.rb.erb similarity index 100% rename from data/new/webapp/app.rb.erb rename to data/new/app/app.rb.erb diff --git a/data/new/webapp/config.ru b/data/new/app/config.ru similarity index 100% rename from data/new/webapp/config.ru rename to data/new/app/config.ru diff --git a/data/new/webapp/docker-compose.yml.erb b/data/new/app/docker-compose.yml.erb similarity index 100% rename from data/new/webapp/docker-compose.yml.erb rename to data/new/app/docker-compose.yml.erb diff --git a/lib/ronin/web/cli/commands/new.rb b/lib/ronin/web/cli/commands/new.rb index 8bdbc700..50c0756b 100644 --- a/lib/ronin/web/cli/commands/new.rb +++ b/lib/ronin/web/cli/commands/new.rb @@ -28,7 +28,7 @@ module Commands # # ## Usage # - # ronin-web new {nokogiri | server | spider | webapp} + # ronin-web new {nokogiri | server | app | spider} # # ## Options # @@ -42,11 +42,11 @@ module Commands # # ## Commands # + # app # help # nokogiri # server # spider - # webapp # class New < Command diff --git a/lib/ronin/web/cli/commands/new/webapp.rb b/lib/ronin/web/cli/commands/new/app.rb similarity index 90% rename from lib/ronin/web/cli/commands/new/webapp.rb rename to lib/ronin/web/cli/commands/new/app.rb index 7c719926..03e4f309 100644 --- a/lib/ronin/web/cli/commands/new/webapp.rb +++ b/lib/ronin/web/cli/commands/new/app.rb @@ -27,11 +27,11 @@ class CLI module Commands class New < Command # - # Generate a new ronin-web-server based webapp. + # Generate a new ronin-web-server based web app. # # ## Usage # - # ronin-web new webapp [options] DIR + # ronin-web new app [options] DIR # # ## Options # @@ -45,11 +45,11 @@ class New < Command # # DIR The directory to create # - class Webapp < Command + class App < Command include Core::CLI::Generator - template_dir File.join(ROOT,'data','new','webapp') + template_dir File.join(ROOT,'data','new','app') usage '[options] DIR' @@ -75,12 +75,12 @@ class Webapp < Command argument :dir, required: true, desc: 'The directory to create' - description 'Generate a new ronin-web-server based webapp' + description 'Generate a new ronin-web-server based app' - man_page 'ronin-web-new-webapp.1' + man_page 'ronin-web-new-app.1' # - # Runs the `ronin-web new webapp` command. + # Runs the `ronin-web new app` command. # # @param [String] path # The path to the new project directory to create. diff --git a/man/ronin-web-new-webapp.1.md b/man/ronin-web-new-app.1.md similarity index 71% rename from man/ronin-web-new-webapp.1.md rename to man/ronin-web-new-app.1.md index 1fba295b..f8ec3ef1 100644 --- a/man/ronin-web-new-webapp.1.md +++ b/man/ronin-web-new-app.1.md @@ -1,12 +1,12 @@ -# ronin-web-new-webapp 1 "May 2022" Ronin "User Manuals" +# ronin-web-new-app 1 "May 2022" Ronin "User Manuals" ## SYNOPSIS -`ronin-web new webapp` [*options*] [*DIR*] +`ronin-web new app` [*options*] [*DIR*] ## DESCRIPTION -Generates a new `ronin-web-server` based webapp. +Generates a new `ronin-web-server` based web app. ## ARGUMENTS @@ -16,7 +16,7 @@ Generates a new `ronin-web-server` based webapp. ## OPTIONS `--port` *PORT* - The port the webapp will listen on by default. Defaults to `3000`. + The port the app will listen on by default. Defaults to `3000`. `--ruby-version` *VERSION* The desired ruby version for the project Defaults to the current ruby version. diff --git a/man/ronin-web-new-nokogiri.1.md b/man/ronin-web-new-nokogiri.1.md index 9aeba3b9..9d9791ef 100644 --- a/man/ronin-web-new-nokogiri.1.md +++ b/man/ronin-web-new-nokogiri.1.md @@ -27,4 +27,4 @@ Postmodern ## SEE ALSO -ronin-web-new-server(1) ronin-web-new-spider(1) ronin-web-new-webapp(1) +ronin-web-new-server(1) ronin-web-new-spider(1) ronin-web-new-app(1) diff --git a/man/ronin-web-new-server.1.md b/man/ronin-web-new-server.1.md index 10761267..d53a7658 100644 --- a/man/ronin-web-new-server.1.md +++ b/man/ronin-web-new-server.1.md @@ -30,4 +30,4 @@ Postmodern ## SEE ALSO -ronin-web-new-nokogiri(1) ronin-web-new-spider(1) ronin-web-new-webapp(1) +ronin-web-new-nokogiri(1) ronin-web-new-spider(1) ronin-web-new-app(1) diff --git a/man/ronin-web-new-spider.1.md b/man/ronin-web-new-spider.1.md index 16af20f8..9d0dd455 100644 --- a/man/ronin-web-new-spider.1.md +++ b/man/ronin-web-new-spider.1.md @@ -126,4 +126,4 @@ Postmodern ## SEE ALSO -ronin-web-new-nokogiri(1) ronin-web-new-server(1) ronin-web-new-webapp(1) +ronin-web-new-nokogiri(1) ronin-web-new-server(1) ronin-web-new-app(1) diff --git a/man/ronin-web-new.1.md b/man/ronin-web-new.1.md index fba22419..2689055e 100644 --- a/man/ronin-web-new.1.md +++ b/man/ronin-web-new.1.md @@ -26,12 +26,12 @@ Creates a new web server, spider, or nokogiri script. *server* Generates a new `ronin-web-server` Ruby script. +*app* + Generate a new `ronin-web-server` based app. + *spider* Generates a new `ronin-web-spider` Ruby script. -*webapp* - Generate a new `ronin-web-server` based webapp. - *help* Lists available `ronin new` commands. @@ -41,4 +41,4 @@ Postmodern ## SEE ALSO -ronin-web-new-nokogiri(1) ronin-web-new-server(1) ronin-web-new-spider(1) ronin-web-new-webapp(1) +ronin-web-new-nokogiri(1) ronin-web-new-server(1) ronin-web-new-spider(1) ronin-web-new-app(1) diff --git a/spec/cli/commands/new/webapp_spec.rb b/spec/cli/commands/new/app_spec.rb similarity index 50% rename from spec/cli/commands/new/webapp_spec.rb rename to spec/cli/commands/new/app_spec.rb index cc08813e..a2d16f60 100644 --- a/spec/cli/commands/new/webapp_spec.rb +++ b/spec/cli/commands/new/app_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'ronin/web/cli/commands/new/webapp' +require 'ronin/web/cli/commands/new/app' require_relative '../man_page_example' -describe Ronin::Web::CLI::Commands::New::Webapp do +describe Ronin::Web::CLI::Commands::New::App do include_examples "man_page" end