Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSRS API functionality #25

Merged
merged 36 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4229047
Adds functions with tests: renew, update, domain (details), suggest, …
wess Feb 22, 2023
3725fdf
Fixes per review
wess Mar 1, 2023
1231502
Review updates
wess Mar 1, 2023
d689fd3
Updates for removing unneeded code
wess Mar 1, 2023
4485388
removes unneeded variable in method signature
wess Mar 1, 2023
03b348e
More review fixes/updates
wess Mar 1, 2023
72dbfc7
Argument types
wess Mar 1, 2023
a718a49
lint fixes
wess Mar 3, 2023
2881d59
Test update
wess Mar 3, 2023
0ad3817
updates composer to match other utopia repos
wess Mar 3, 2023
2311a36
Composer updates
wess Mar 3, 2023
292cc56
Composer/lock updated
wess Mar 3, 2023
31edd1b
Composer/lock updated
wess Mar 3, 2023
d42a04a
Composer/lock updated
wess Mar 3, 2023
d87b3d3
Updates for CI
wess Mar 6, 2023
5190484
Removes unused import
wess Mar 6, 2023
431e927
Fixes style issue for linter
wess Mar 6, 2023
9cd4640
Fixes naming issue with env var
wess Mar 6, 2023
777ae74
PR corrects
wess Mar 8, 2023
6a51b96
Removes unneeded dockerfile
wess Mar 8, 2023
991dea4
Updates docs on Adapter
wess Mar 8, 2023
84209af
Fixed up for lint
wess Mar 8, 2023
21f38d1
fix: set proper preset for pint
TorstenDittmann Mar 9, 2023
d6e70f6
ci. remove psalm
TorstenDittmann Mar 9, 2023
7e9111e
Adds registrar calling class
wess Mar 9, 2023
d845813
Strict equals for Torsten
wess Mar 9, 2023
e24a1c0
strict equals all the things
wess Mar 9, 2023
eb57362
Light refactor for responses and exceptions
wess Mar 9, 2023
33278e4
Linter fixer
wess Mar 9, 2023
3f6450e
Update src/Domains/Registrar/OpenSRS.php
wess Mar 13, 2023
ec5613b
Update src/Domains/Registrar/OpenSRS.php
wess Mar 13, 2023
dcd8e16
Update src/Domains/Registrar/OpenSRS.php
wess Mar 13, 2023
82934a0
Update src/Domains/Registrar/OpenSRS.php
wess Mar 13, 2023
e17816a
Fixes for PR
wess Mar 13, 2023
2acd3f1
Fixes issue where Registrar main class called wrong domain method
wess Mar 13, 2023
5fe84cf
Removes Dockerfile
wess Mar 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 120 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,121 @@
composer.lock
/vendor/
/.idea/
/.idea/
.env

# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,phpunit,direnv,macos,windows,linux
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,phpunit,direnv,macos,windows,linux

### direnv ###
.direnv
.envrc

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### PHPUnit ###
# Covers PHPUnit
# Reference: https://phpunit.de/

# Generated files
.phpunit.result.cache
.phpunit.cache

# PHPUnit
/app/phpunit.xml
/phpunit.xml

# Build data
/build/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,phpunit,direnv,macos,windows,linux
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM phpswoole/swoole:php8.1
wess marked this conversation as resolved.
Show resolved Hide resolved

RUN apt-get update && \
apt-get install -y -q \
apt-utils \
zsh \
nano \
vim \
make \
locales \
g++ \
gcc \
git \
curl \
debianutils \
binutils \
sed \
curl \
wget \
gnupg \
gnupg2 \
direnv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini


RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

ADD . /app

WORKDIR /app

ENV TERM xterm-256color

CMD ["/bin/zsh"]
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export DOCKER_BUILDKIT=0
wess marked this conversation as resolved.
Show resolved Hide resolved
export COMPOSE_DOCKER_CLI_BUILD=0

ROOT_DIR := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_DIR := $(notdir $(patsubst %/,%,$(dir $(ROOT_DIR))))
PROJECT := $(lastword $(PROJECT_DIR))
LC_PROJECT := $(shell echo $(PROJECT) | tr A-Z a-z)
SRC_VOLUME = "${PWD}"
VERSION_FILE = VERSION
VERSION = `cat $(VERSION_FILE)`

default: run

.PHONY: help
help: ## Print all the available commands
@echo "" \
&& echo "${LC_PROJECT} \
&& echo "" \
&& grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' \
&& echo ""

build: ## Build the Alloy environment
@echo \
&& echo "Building environment..." \
&& docker build --rm --tag ${LC_PROJECT}:${VERSION} .

run: build ## Run live environment
@echo \
&& echo "Connecting to environment" \
&& docker run -it --privileged=true --network=host --rm --volume ${SRC_VOLUME}:/app ${LC_PROJECT}:${VERSION}

test:
@./vendor/bin/phpunit --configuration phpunit.xml tests/OpenSRSTest.php

direnv: ## Runs Direnv's hook command
@eval "$(direnv hook zsh)"
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
wess marked this conversation as resolved.
Show resolved Hide resolved
55 changes: 26 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
{
"name": "utopia-php/domains",
"description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.",
"type": "library",
"keywords": ["php","framework", "upf", "utopia", "domains", "tld", "tld extract", "public suffix", "ICANN"],
"license": "MIT",
"authors": [
{
"name": "Eldad Fux",
"email": "[email protected]"
}
],
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint",
"check": "./vendor/bin/phpstan analyse --level max src tests"
},
"autoload": {
"psr-4": {"Utopia\\Domains\\": "src/Domains"}
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1",
"laravel/pint": "^1.2",
"phpstan/phpstan": "1.9.x-dev"
},
"minimum-stability": "dev"
"name": "utopia-php/domains",
"description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.",
"type": "library",
"keywords": ["php","framework", "upf", "utopia", "domains", "tld", "tld extract", "public suffix", "ICANN"],
"license": "MIT",
"authors": [
{
"name": "Eldad Fux",
"email": "[email protected]"
}
],
"scripts": {
"check": "./vendor/bin/phpstan analyse --level max src tests"
wess marked this conversation as resolved.
Show resolved Hide resolved
},
"autoload": {
"psr-4": {"Utopia\\Domains\\": "src/Domains"}
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1",
"phpstan/phpstan": "1.9.x-dev"
},
"minimum-stability": "dev"
}
Loading