Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

feat: v1 #3

Merged
merged 1 commit into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ language: php
php:
- '5.6'
- '7.0'
- '7.1'

env:
- SYMFONY_VERSION=2.3.*
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=2.8.*
- SYMFONY_VERSION=3.0.*
- SYMFONY_VERSION=3.1.*
- SYMFONY_VERSION=3.2.*
- SYMFONY_VERSION=3.3.*

before_script:
- composer self-update
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file based on the [Keep a Changelog](http://keepachangelog.com/) Standard.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/gbprod/algolia-specification-bundle/compare/v1.0.0...HEAD)

## [v1.0.0](https://github.com/gbprod/algolia-specification-bundle/compare/v0.1.0...v1.0.0)

- Add changelog
- Add contributing file
- Update dependencies to stable
- Drop php5.5
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing

Thank you for taking time to help.

* Code contributions must be done in respect of [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Scrutinizer will validate this.
* All changes must be documented in the [CHANGELOG.md](https://github.com/gbprod/algolia-specification-bundle/blob/master/CHANGELOG.md) in respect of [Keep a Changelog](http://keepachangelog.com/) Standard.
* Please create an issue before creating a pull request.
* All code must be covered by tests.
* Pull requests are made to master. Changes are never pushed directly (without pull request) into master.
* Use a feature branch for every pull request. Don't open a pull request from your master branch.

## Setup

You should have `php >= 7.0` and `composer` installed (Docker contribution is very welcomed).

Setup you're environment:
```bash
make install
```

Run tests:
```bash
make test-unit
```

Coverage:
```bash
make test-coverage
```
47 changes: 12 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
.SILENT:
.PHONY: help
.PHONY: install test-unit test-coverage

## Colors
COLOR_RESET = \033[0m
COLOR_INFO = \033[32m
COLOR_COMMENT = \033[33m
PHP?=php
COMPOSER?=composer

## Help
help:
printf "${COLOR_COMMENT}Usage:${COLOR_RESET}\n"
printf " make <target>\n\n"
printf "${COLOR_COMMENT}Available targets:${COLOR_RESET}\n"
awk '/^[a-zA-Z\-\_0-9\.@]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " ${COLOR_INFO}%-16s${COLOR_RESET} %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
install: vendor

## Install
install:
composer install
test-unit: vendor
$(PHP) vendor/bin/phpunit

## Run tests
test:
vendor/bin/phpunit
test-coverage: vendor
$(PHP) vendor/bin/phpunit --coverage-text

## Loop unit tests
test-loop:
while true; \
do vendor/bin/phpunit; \
read continue; \
done;
vendor: composer.lock
$(COMPOSER) install

## Code coverage
coverage:
vendor/bin/phpunit --coverage-text
composer.lock: composer.json
$(COMPOSER) update
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

This bundle integrates [algolia-specification](git@github.com:gbprod/algolia-specification.git) with Symfony.

![stability-wip](https://img.shields.io/badge/stability-work_in_progress-lightgrey.svg)

[![Build Status](https://travis-ci.org/gbprod/algolia-specification-bundle.svg?branch=master)](https://travis-ci.org/gbprod/algolia-specification-bundle)
[![codecov](https://codecov.io/gh/gbprod/algolia-specification-bundle/branch/master/graph/badge.svg)](https://codecov.io/gh/gbprod/algolia-specification-bundle)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/gbprod/algolia-specification-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/gbprod/algolia-specification-bundle/?branch=master)
[![Dependency Status](https://www.versioneye.com/user/projects/574a9c9ace8d0e004130d337/badge.svg)](https://www.versioneye.com/user/projects/574a9c9ace8d0e004130d337)

[![Latest Stable Version](https://poser.pugx.org/gbprod/algolia-specification-bundle/v/stable)](https://packagist.org/packages/gbprod/algolia-specification)
[![Total Downloads](https://poser.pugx.org/gbprod/algolia-specification-bundle/downloads)](https://packagist.org/packages/gbprod/algolia-specification)
[![Latest Unstable Version](https://poser.pugx.org/gbprod/algolia-specification-bundle/v/unstable)](https://packagist.org/packages/gbprod/algolia-specification)
[![License](https://poser.pugx.org/gbprod/algolia-specification-bundle/license)](https://packagist.org/packages/gbprod/algolia-specification)
[![Latest Stable Version](https://poser.pugx.org/gbprod/algolia-specification-bundle/v/stable)](https://packagist.org/packages/gbprod/algolia-specification-bundle)
[![Total Downloads](https://poser.pugx.org/gbprod/algolia-specification-bundle/downloads)](https://packagist.org/packages/gbprod/algolia-specification-bundle)
[![Latest Unstable Version](https://poser.pugx.org/gbprod/algolia-specification-bundle/v/unstable)](https://packagist.org/packages/gbprod/algolia-specification-bundle)
[![License](https://poser.pugx.org/gbprod/algolia-specification-bundle/license)](https://packagist.org/packages/gbprod/algolia-specification-bundle)

## Installation

Expand Down Expand Up @@ -91,7 +89,7 @@ class IsAvailableFactory implements Factory
### Declare your Factory

```yaml
// src/GBProd/Acme/AcmeBundle/Resource/config/service.yml
# src/GBProd/Acme/AcmeBundle/Resource/config/service.yml

services:
acme.algolia.query_factory.is_available:
Expand All @@ -103,7 +101,7 @@ services:
### Inject handler in your repository class

```yaml
// src/GBProd/Acme/AcmeBundle/Resource/config/service.yml
# src/GBProd/Acme/AcmeBundle/Resource/config/service.yml

services:
acme.product_repository:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"type": "bundle",
"require": {
"php": ">=5.6",
"gbprod/algolia-specification": "^0.1",
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/expression-language": "^2.3|^3.0"
"gbprod/algolia-specification": "^1.0",
"symfony/framework-bundle": "^2.7|^3.0",
"symfony/expression-language": "^2.7|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^5.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ public function testGetConfigTreeBuilder()

$tree = $configuration->getConfigTreeBuilder();

$this->assertInstanceOf(
TreeBuilder::class,
$tree
);
$this->assertInstanceOf(TreeBuilder::class, $tree);

$this->assertEquals(
'algolia_specification_bundle',
Expand Down