Skip to content

Commit

Permalink
Merge pull request #40 from vinicinbgs/feat/#39
Browse files Browse the repository at this point in the history
feat: #39 update document api
  • Loading branch information
vinicinbgs authored Dec 25, 2023
2 parents 94703c5 + 1658859 commit 339bd10
Show file tree
Hide file tree
Showing 21 changed files with 563 additions and 229 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ package-lock.json
/tests/Bootstrap.php
phpunit.xml
.phpunit.result.cache
coverage/
coverage/
.phpdoc
Gemfile.lock
_site
.jekyll-cache
phpDocumentor.phar
phpdoc/
52 changes: 19 additions & 33 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"pathMappings": {
"${workspaceFolder}/tests/": "${workspaceFolder}/tests"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"pathMappings": {
"${workspaceFolder}/tests/": "${workspaceFolder}/tests"
},
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-dxdebug.client_port=9003"
]
}
]
}
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source "https://rubygems.org"

gem "jekyll"

group :jekyll_plugins do
gem "jekyll-feed"
gem "jekyll-seo-tag"
gem "jekyll-theme-cayman"
end
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: phpdoc-install
phpdoc-install:
@echo "Installing phpDocumentor..."
curl -Lo phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar

.PHONY: phpdoc-generate
phpdoc-generate:
rm -Rf .phpdoc
@echo "Generating phpDocumentor documentation..."
php phpDocumentor.phar run -d ./src -t phpdoc --setting=graphs.enabled=true
@echo "phpdoc/index.html"

.PHONY: ruby-install
ruby-install:
@echo "Installing Ruby dependencies..."
bundle install

.PHONY: jekyll-serve
jekyll-serve:
@echo "Building Jekyll site..."
bundle exec jekyll serve -s ./docs/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ composer require vinicinbgs/autentique-v2

# Tests
The tests are _**integrated directly with Autentique API**_, so you need to set your `.env` file based on `.env.example` Make sure you have set the `AUTENTIQUE_TOKEN`, `AUTENTIQUE_URL` and `AUTENTIQUE_DEV_MODE` to `true` for `SANDBOX MODE` or `false` to `PRODUCTION MODE`.

```bash
composer test
composer test -- --filter ApiTest
```

7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
],
"scripts": {
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit tests --coverage-text",
"test-filter": "XDEBUG_CONFIG=\"idekey=VSCODE\" vendor/bin/phpunit --filter",
"test-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html coverage/",
"load": "composer dumpautoload"
"load": "composer dumpautoload",
"phpdoc": "php phpDocumentor.phar run -d ./src -t phpdoc --setting=graphs.enabled=true"
},
"homepage": "https://github.com/vinicinbgs/autentique-v2",
"license": "MIT",
Expand All @@ -29,7 +31,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"vlucas/phpdotenv": "^5.4.1"
"vlucas/phpdotenv": "^5.4.1",
"mockery/mockery": "2.0.x-dev"
},
"autoload": {
"classmap": [
Expand Down
Loading

0 comments on commit 339bd10

Please sign in to comment.