Skip to content

Commit

Permalink
Merge pull request #58 from ddev/feat/rework
Browse files Browse the repository at this point in the history
Standardization and improvements
  • Loading branch information
seebeen authored Aug 5, 2024
2 parents 6261d52 + 1c1368c commit 9c93fa5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 74 deletions.
56 changes: 30 additions & 26 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Contributor Covenant Code of Conduct
# Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -22,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not only for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Expand All @@ -52,15 +52,15 @@ decisions when appropriate.

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
support@oblak.studio.
`support`(at)`ddev.com`.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand All @@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

Expand All @@ -106,23 +106,27 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
13 changes: 6 additions & 7 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ load "${TEST_BREW_PREFIX}/lib/bats-assert/load.bash"
setup() {
set -eu -o pipefail

export ADDON_DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
export ADDON_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")" >/dev/null 2>&1 && pwd)/.."
export PROJECT=testproj
export TEST_DIR="$HOME/tmp/$PROJECT"
export DDEV_NON_INTERACTIVE=true

mkdir -p $TEST_DIR && cd "$TEST_DIR" || ( printf "unable to cd to $TEST_DIR\n" && exit 1 )
mkdir -p $TEST_DIR && cd "$TEST_DIR" || (printf "unable to cd to $TEST_DIR\n" && exit 1)

ddev delete -Oy $PROJECT >/dev/null 2>&1 || true
ddev config --project-name=$PROJECT --omit-containers=db --disable-upload-dirs-warning
Expand Down Expand Up @@ -40,7 +40,7 @@ health_checks() {

teardown() {
set -eu -o pipefail
cd "$TEST_DIR" || ( printf "unable to cd to $TEST_DIR\n" && exit 1 )
cd "$TEST_DIR" || (printf "unable to cd to $TEST_DIR\n" && exit 1)
ddev stop
ddev delete -Oy "$PROJECT" >/dev/null 2>&1
[ "$TEST_DIR" != "" ] && rm -rf "$TEST_DIR"
Expand All @@ -57,8 +57,7 @@ teardown() {
# bats test_tags=release
@test "install from release" {
set -eu -o pipefail
cd ${TEST_DIR} || ( printf "unable to cd to ${TEST_DIR}\n" && exit 1 )
echo "# ddev get oblakstudio/ddev-ioncube with project ${PROJECT} in ${TEST_DIR} ($(pwd))" >&3
health_checks "oblakstudio/ddev-ioncube"
cd ${TEST_DIR} || (printf "unable to cd to ${TEST_DIR}\n" && exit 1)
echo "# ddev get ddev/ddev-ioncube with project ${PROJECT} in ${TEST_DIR} ($(pwd))" >&3
health_checks "ddev/ddev-ioncube"
}

44 changes: 3 additions & 41 deletions web-build/ioncube/modify-dockerfile.sh
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
#!/usr/bin/env bash
#ddev-generated

remove_directives() {
local FILE_PATH="$1"
TMP_FILE="$(mktemp)"

between_markers=false

# Loop through the lines of the file
while IFS= read -r LINE; do

# Check if the line contains the "BEGIN IonCube Install" marker
if [[ $LINE == "# BEGIN IonCube Install" ]]; then
between_markers=true
continue
fi

# Check if the line contains the "END IonCube Install" marker
if [[ $LINE == "# END IonCube Install" ]]; then
between_markers=false
continue
fi

# If we're not between markers, write the line to the temporary file
if [ "$between_markers" == false ]; then
echo "$LINE" >>"$TMP_FILE"
fi

done <"$FILE_PATH"

# Overwrite the original file with the temporary file
mv "$TMP_FILE" "$FILE_PATH"
}

add_directives() {
local FILE_PATH="$1"
local PHP_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.1" "8.2" "8.3")
Expand All @@ -57,15 +25,9 @@ EOF

# Define the file path
DOCKERFILE="web-build/Dockerfile.ioncube"
OLD_PATH="web-build/Dockerfile"

if [ -e "$OLD_PATH" ]; then
remove_directives "$OLD_PATH"
fi

if [ -e "$DOCKERFILE" ]; then
remove_directives "$DOCKERFILE"
add_directives "$DOCKERFILE"
else
add_directives "$DOCKERFILE"
rm -f "$DOCKERFILE" >/dev/null
fi

add_directives "$DOCKERFILE"

0 comments on commit 9c93fa5

Please sign in to comment.