-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(idna translator): added dependabot, semantic release, composer …
…and gulp integration
- Loading branch information
1 parent
733eceb
commit 801b790
Showing
14 changed files
with
11,120 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
#PHP PROJECT | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "fix" | ||
prefix-development: "chore" | ||
include: "scope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<ruleset name="super-linter"> | ||
<description>The default coding standard for usage with GitHub Super-Linter. It just includes PSR12.</description> | ||
<!-- Use PSR-12 as a base --> | ||
<rule ref="PSR12"/> | ||
<arg value="s"/> | ||
<arg value="q"/> | ||
<arg value="n"/> | ||
<arg name="colors"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
uses: centralnicgroup-opensource/rtldev-middleware-shareable-workflows/.github/workflows/release.yml@main | ||
secrets: inherit | ||
with: | ||
repository: ${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Dependabot auto-merge & tests | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
tests: | ||
uses: centralnicgroup-opensource/rtldev-middleware-shareable-workflows/.github/workflows/auto-merge-dependabot-pr.yml@main | ||
secrets: inherit | ||
with: | ||
repository: ${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
vendor | ||
/tests/logs/*.txt | ||
/tests/logs/*.log | ||
basic-test.php | ||
vendor | ||
report | ||
docs | ||
node_modules | ||
composer.lock | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "HISTORY.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"successCmd": "gulp publishNotification --update \"${nextRelease.version}\" --type \"${nextRelease.type}\" --notes \"${encodeURIComponent(nextRelease.notes)}\"" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"HISTORY.md", | ||
"@(package?(-lock)|composer).json", | ||
"docs", | ||
"report", | ||
"src" | ||
] | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# ConverterFactory | ||
|
||
The `ConverterFactory` class provides functionality for converting domain strings between Unicode and Punycode formats. | ||
|
||
## Use Cases | ||
|
||
- **Domain Conversion**: Convert domain strings between Unicode and Punycode formats to ensure compatibility and consistency across different systems. | ||
|
||
## Usage | ||
|
||
### 1. Convert a Domain String to Unicode | ||
|
||
```php | ||
<?php | ||
|
||
use CNIC\IDNA\Factory\ConverterFactory; | ||
|
||
// Convert a domain string to Unicode format | ||
$domain = "example.com"; | ||
$unicodeDomain = ConverterFactory::toUnicode($domain); | ||
echo "Unicode Domain: $unicodeDomain\n"; | ||
``` | ||
|
||
### 2. Convert a Domain String to Punycode | ||
|
||
```php | ||
<?php | ||
|
||
use CNIC\IDNA\Factory\ConverterFactory; | ||
|
||
// Convert a domain string to Punycode format | ||
$unicodeDomain = "example.com"; | ||
$punycodeDomain = ConverterFactory::toASCII($unicodeDomain); | ||
echo "Punycode Domain: $ | ||
``` | ||
|
||
### 3. Convert Multiple Domain Strings | ||
|
||
```php | ||
<?php | ||
|
||
use CNIC\IDNA\Factory\ConverterFactory; | ||
|
||
// Convert multiple domain strings to Unicode and Punycode formats | ||
$domains = ["example.com", "münchen.de", "рф.ru"]; | ||
$convertedDomains = ConverterFactory::convert($domains); | ||
foreach ($convertedDomains as $domain) { | ||
echo "Unicode Domain: {$domain['IDN']}, Punycode Domain: {$domain['PUNYCODE']}\n"; | ||
} | ||
``` | ||
|
||
## API Documentation | ||
|
||
```php | ||
### `ConverterFactory::toUnicode($keyword, $options = [])` | ||
|
||
Converts a domain string to Unicode format. | ||
|
||
- **Parameters:** | ||
- `$keyword` (string): The domain string to convert. | ||
- `$options` (array): Additional options for the conversion process (optional). | ||
- **Returns:** The converted domain in Unicode format, or `false` if the keyword is empty. | ||
|
||
### `ConverterFactory::toASCII($keyword, $options = [])` | ||
|
||
Converts a domain string to Punycode format. | ||
|
||
- **Parameters:** | ||
- `$keyword` (string): The domain string to convert. | ||
- `$options` (array): Additional options for the conversion process (optional). | ||
- **Returns:** The converted domain in Punycode format, or `false` if the keyword is empty. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports.publishNotification = require('rtldev-middleware-gulp-release-notification-plugin'); |
Oops, something went wrong.