Skip to content

Commit

Permalink
#82 - add community standards files (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubKermes authored Aug 19, 2024
1 parent 2386d05 commit f606fe8
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 59 deletions.
33 changes: 33 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased] - 2024-07-19

Here we write upgrading notes for brands. It's a team effort to make them as
straightforward as possible.

### Added
- Initial release of the package to streamline testing Laravel apps with Behat.
- Ready to use code snippets and contexts for testing Laravel applications.
- Tools to write tests faster and more efficiently, reducing boilerplate code.
- Support for various Laravel functionalities:
- Application
- Authentication
- Code blocks
- Console
- Cookies
- Database
- Dispatcher
- Eloquent
- Environment
- Http
- Middleware
- Notification
- Session
- Testing
- Translations
- View
- Integration with additional package: Spatie laravel-permission.
78 changes: 78 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributing to BLT

First off, thank you for considering contributing to our project. Your help is greatly appreciated!

## Table of Contents

1. [How Can I Contribute?](#how-can-i-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Submitting Pull Requests](#submitting-pull-requests)
2. [Style Guides](#style-guides)
- [Git Commit Messages](#git-commit-messages)
- [Code Style](#code-style)
3. [Getting Help](#getting-help)

## How Can I Contribute?

### Reporting Bugs

If you find a bug, please open an issue [here](https://github.com/blumilksoftware/blt/issues) and include as much detail as possible. Before creating a new issue, please check to see if the bug has already been reported.

**A good bug report should include:**
- A clear and descriptive title.
- A detailed description of the problem, including steps to reproduce.
- Any relevant logs, screenshots, or code snippets.

### Suggesting Enhancements

We welcome enhancements and improvements! To suggest an enhancement, please open an issue [here](https://github.com/blumilksoftware/blt/issues) with the following details:

**A good enhancement suggestion should include:**
- A clear and descriptive title.
- A detailed explanation of the enhancement and why it would be useful.
- Any relevant code snippets or examples.

### Submitting Pull Requests

Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:

1. Fork the repository.
2. Create a branch for your feature or bug fix (`git checkout -b "#1-add-functionality"`).
3. Commit your changes (`git commit -m "Add new feature"`).
4. Push to the branch (`git push origin "#1-add-functionality"`).
5. Open a pull request [here](https://github.com/blumilksoftware/blt/pulls).

**Your pull request should:**
- Contain the issue number in the title (e.g., `#1 - Add new functionality`).
- Include a clear description of what your changes do.
- Reference any related issues.
- Follow the project's coding standards.

## Style Guides

### Git Commit Messages

- Use the present tense ("Add feature" not "Added feature").
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
- Limit the first line to 72 characters or less.
- Reference issues and pull requests liberally.

### Code Style

- Keep code styled as in the repository.
- You can use `composer csf` for fixing code style.

## Getting Help

Please don't create issues with questions about using package, refer to documentation or FAQ first.
You can also contact us at

[email protected]

[email protected]

or message [Blumilk](https://www.blumilk.pl/contact) directly.


Thank you for contributing to BLT!
2 changes: 1 addition & 1 deletion docs/elements/cookies.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@
\$cookieValue = \$this->request->cookies->get(\$row['name']);
Assert::assertEquals(\$row['value'], \$cookieValue, 'Cookie {\$row['name']} does not have the expected value {\$row['value']}.');
}
}"></code-snippet>
}"></code-snippet>
2 changes: 1 addition & 1 deletion docs/elements/hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
}
</code-block>

</article-paragraphs>
</article-paragraphs>
7 changes: 7 additions & 0 deletions licence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2024 Blumilk

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
71 changes: 14 additions & 57 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,26 @@ BLT for PHP developers: Behat+Laravel toolbox
> Package is still under development.
### Usage
To start using package if you don't already have Behat initialized in your project:
```
composer require blumilksfotware/blt --dev
php artisan blt:init
```
### Or if you want to do that manually:
Use Composer to get package from the Packagist repository:
```
composer require blumilksfotware/blt --dev
```
Create .env.behat file in your project root directory and set up your environment variables for Behat.
```
cp .env.example .env.behat
```
Initialize Behat in your project:
```
php vendor/bin/behat --init
```
To learn more about Behat visit [Behat documentation](https://docs.behat.org/en/latest/).
### To use in your tests:
Bootstrap BLT in your FeatureContext file:
```
public function __construct()
{
$bootstrapper = new LaravelBootstrapper();
$bootstrapper->boot();
}
Please refer to our [documentation](https://blumilksoftware.github.io/blt/).

### Development

Start and enter into docker container:
```
If you want to include all suite of features, you can use:
make init
make shell
```
use Blumilk\BLT\Features\Toolbox;
class FeatureContext extends Toolbox implements Context
{...}

Now you can use following commands:
for testing package:
```
Or to use selected traits:
composer test
```
use Blumilk\BLT\Features\Traits\Eloquent;
class FeatureContext implements Context
{
use Eloquent;
...
}
for cleaning up code:
```

Example usage in tests is available in the [docs](docs).
### Development
There are scripts available for package codestyle checking and testing:
```shell
composer cs
composer csf
composer test
```

#### Docker
There is also the Docker Compose configuration available:
```shell
docker-compose up -d
docker-compose exec php php -v
docker-compose exec php composer -V
```
### Contributing

Please maintain our project guidelines:
* keep issues well described, labeled and in English,
* add issue number to all your commits,
* add issue number to your branch name,
* squash your commits into one commit with standardized name.
Please refer to our [contributing](contributing.md) guidelines.

0 comments on commit f606fe8

Please sign in to comment.