diff --git a/Formula/apidoc.rb b/Formula/apidoc.rb deleted file mode 100644 index f7a9bcc..0000000 --- a/Formula/apidoc.rb +++ /dev/null @@ -1,51 +0,0 @@ -require "language/node" - -class Apidoc < Formula - desc "RESTful web API Documentation Generator" - homepage "https://apidocjs.com" - url "https://github.com/apidoc/apidoc/archive/0.24.0.tar.gz" - sha256 "b63797091e9ccd0cc2d65129bb38e54957131067e37029ae137d73eb2e3520d6" - license "MIT" - - bottle do - root_url "https://dl.bintray.com/dawidd6/bottles-tap" - cellar :any_skip_relocation - rebuild 1 - sha256 "582a262d54b0724866a63f806cc21d2115140b6c67de7f74f40ba89fb2e86402" => :catalina - sha256 "4e0f3f125ac7d775dca33d3cdc4f689c1f31914ec2688b9a6ed83de64996d114" => :x86_64_linux - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"api.go").write <<~EOS - /** - * @api {get} /user/:id Request User information - * @apiVersion #{version} - * @apiName GetUser - * @apiGroup User - * - * @apiParam {Number} id User's unique ID. - * - * @apiSuccess {String} firstname Firstname of the User. - * @apiSuccess {String} lastname Lastname of the User. - */ - EOS - (testpath/"apidoc.json").write <<~EOS - { - "name": "example", - "version": "#{version}", - "description": "A basic apiDoc example" - } - EOS - system bin/"apidoc", "-o", "out" - api_data_json = (testpath/"out/api_data.json").read - api_data = JSON.parse api_data_json - assert_equal api_data.first["version"], version - end -end diff --git a/tap_migrations.json b/tap_migrations.json new file mode 100644 index 0000000..2e4deeb --- /dev/null +++ b/tap_migrations.json @@ -0,0 +1,3 @@ +{ + "apidoc": "homebrew/core" +}