From 4cc05f80317dd25af84f2a50dd7ab8cc39ca6e28 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 16:29:58 +0200 Subject: [PATCH 01/14] Updated dependencies --- composer.lock | 118 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 83 insertions(+), 35 deletions(-) diff --git a/composer.lock b/composer.lock index 21ddbef..8c78d0b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8ee12d6427f92c84e230c17669ef606d", + "hash": "b699486a9dc22150656ce08b5f829c00", "packages": [], "packages-dev": [ { @@ -63,16 +63,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.0.11", + "version": "2.0.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" + "reference": "0e7d2eec5554f869fa7a4ec2d21e4b37af943ea5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0e7d2eec5554f869fa7a4ec2d21e4b37af943ea5", + "reference": "0e7d2eec5554f869fa7a4ec2d21e4b37af943ea5", "shasum": "" }, "require": { @@ -124,7 +124,7 @@ "testing", "xunit" ], - "time": "2014-08-31 06:33:04" + "time": "2014-12-03 06:41:44" }, { "name": "phpunit/php-file-iterator", @@ -310,16 +310,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.3.4", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "23e4e0310f037aae873cc81b8658dbbb82878f71" + "reference": "bbe7bcb83b6ec1a9eaabbe1b70d4795027c53ee0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/23e4e0310f037aae873cc81b8658dbbb82878f71", - "reference": "23e4e0310f037aae873cc81b8658dbbb82878f71", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bbe7bcb83b6ec1a9eaabbe1b70d4795027c53ee0", + "reference": "bbe7bcb83b6ec1a9eaabbe1b70d4795027c53ee0", "shasum": "" }, "require": { @@ -336,8 +336,9 @@ "phpunit/phpunit-mock-objects": "~2.3", "sebastian/comparator": "~1.0", "sebastian/diff": "~1.1", - "sebastian/environment": "~1.0", + "sebastian/environment": "~1.1", "sebastian/exporter": "~1.0", + "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", "symfony/yaml": "~2.0" }, @@ -350,7 +351,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3.x-dev" + "dev-master": "4.4.x-dev" } }, "autoload": { @@ -359,10 +360,6 @@ ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -374,13 +371,13 @@ } ], "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], - "time": "2014-10-22 11:43:12" + "time": "2014-12-05 06:49:03" }, { "name": "phpunit/phpunit-mock-objects", @@ -439,16 +436,16 @@ }, { "name": "sebastian/comparator", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef" + "reference": "c484a80f97573ab934e37826dba0135a3301b26a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c484a80f97573ab934e37826dba0135a3301b26a", + "reference": "c484a80f97573ab934e37826dba0135a3301b26a", "shasum": "" }, "require": { @@ -462,7 +459,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -499,7 +496,7 @@ "compare", "equality" ], - "time": "2014-05-11 23:00:21" + "time": "2014-11-16 21:32:38" }, { "name": "sebastian/diff", @@ -555,16 +552,16 @@ }, { "name": "sebastian/environment", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d" + "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", + "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", "shasum": "" }, "require": { @@ -601,7 +598,7 @@ "environment", "hhvm" ], - "time": "2014-10-22 06:38:05" + "time": "2014-10-25 08:00:45" }, { "name": "sebastian/exporter", @@ -668,6 +665,57 @@ ], "time": "2014-09-10 00:51:36" }, + { + "name": "sebastian/global-state", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2014-10-06 09:23:50" + }, { "name": "sebastian/version", "version": "1.0.3", @@ -705,17 +753,17 @@ }, { "name": "symfony/yaml", - "version": "v2.5.6", + "version": "v2.6.1", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726" + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3346fc090a3eb6b53d408db2903b241af51dcb20", + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20", "shasum": "" }, "require": { @@ -724,7 +772,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -748,7 +796,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-10-01 05:50:18" + "time": "2014-12-02 20:19:20" } ], "aliases": [], From 2556fdfdeeb8d5981ed4f7f6048e0f3a0ec8069e Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 16:32:02 +0200 Subject: [PATCH 02/14] Removed php 5.4 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 00362fa..c8dd28a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php php: -- 5.4 - 5.5 - 5.6 before_script: From dbb90ecae19340b9229e62fbfa9ed4aa6cd3a075 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 16:42:14 +0200 Subject: [PATCH 03/14] Removing changelog for now... --- changelog.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 changelog.md diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 77a9340..0000000 --- a/changelog.md +++ /dev/null @@ -1,5 +0,0 @@ -# Changelog - -## 0.1.0 - -First release. From ccadbfcbd7511b65e732613db175440199dec41b Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 17:28:42 +0200 Subject: [PATCH 04/14] Added isArray function --- src/TypeFunctions.php | 25 +++++++++++++++------- tests/Test.php | 1 - tests/TypeFunctionTest.php | 43 ++++++++++++++++++++++++-------------- 3 files changed, 45 insertions(+), 24 deletions(-) diff --git a/src/TypeFunctions.php b/src/TypeFunctions.php index 1f78390..4104a21 100644 --- a/src/TypeFunctions.php +++ b/src/TypeFunctions.php @@ -85,6 +85,16 @@ function isResource($variable) return is_resource($variable); } +/** + * @param mixed $variable + * + * @return bool + */ +function isArray($variable) +{ + return is_array($variable); +} + /** * @param mixed $variable * @@ -93,14 +103,15 @@ function isResource($variable) function getType($variable) { $functions = [ - "isNumber" => "number", - "isBoolean" => "boolean", - "isNull" => "null", - "isObject" => "object", - "isFunction" => "function", + "isNumber" => "number", + "isBoolean" => "boolean", + "isNull" => "null", + "isObject" => "object", + "isFunction" => "function", "isExpression" => "expression", - "isString" => "string", - "isResource" => "resource" + "isString" => "string", + "isResource" => "resource", + "isArray" => "array" ]; $result = "unknown"; diff --git a/tests/Test.php b/tests/Test.php index 76b70c1..8a97a9d 100644 --- a/tests/Test.php +++ b/tests/Test.php @@ -6,5 +6,4 @@ class Test extends PHPUnit_Framework_TestCase { - } diff --git a/tests/TypeFunctionTest.php b/tests/TypeFunctionTest.php index 9bc96ac..c45af7c 100644 --- a/tests/TypeFunctionTest.php +++ b/tests/TypeFunctionTest.php @@ -9,7 +9,7 @@ class TypeFunctionTest extends Test /** * @test */ - public function testIsNumber() + public function itIdentifiesNumbers() { $this->assertTrue(TypeFunctions\isNumber(0)); $this->assertTrue(TypeFunctions\isNumber(0.5)); @@ -23,7 +23,7 @@ public function testIsNumber() /** * @test */ - public function testIsBoolean() + public function itIdentifiesBooleans() { $this->assertTrue(TypeFunctions\isBoolean(true)); $this->assertTrue(TypeFunctions\isBoolean(false)); @@ -37,7 +37,7 @@ public function testIsBoolean() /** * @test */ - public function testIsNull() + public function itIdentifiesNulls() { $this->assertTrue(TypeFunctions\isNull(null)); @@ -49,7 +49,7 @@ public function testIsNull() /** * @test */ - public function testIsObject() + public function itIdentifiesObjects() { $this->assertTrue(TypeFunctions\isObject($this)); @@ -63,7 +63,7 @@ public function testIsObject() /** * @test */ - public function testIsFunction() + public function itIdentifiesFunctions() { $function = function () { echo "hello"; @@ -78,7 +78,7 @@ public function testIsFunction() /** * @test */ - public function testIsExpression() + public function itIdentifiesExpressions() { $this->assertTrue(TypeFunctions\isExpression("[a-z]")); @@ -88,7 +88,7 @@ public function testIsExpression() /** * @test */ - public function testIsString() + public function itIdentifiesStrings() { $this->assertTrue(TypeFunctions\isString("hello")); @@ -98,7 +98,7 @@ public function testIsString() /** * @test */ - public function testIsResource() + public function itIdentifiesResources() { $file = fopen(__FILE__, "r"); @@ -112,7 +112,17 @@ public function testIsResource() /** * @test */ - public function testGetType() + public function itIdentifiesArrays() + { + $this->assertTrue(TypeFunctions\isArray(["foo", "bar"])); + + $this->assertFalse(TypeFunctions\isArray("foo")); + } + + /** + * @test + */ + public function itIdentifiesTypes() { $file = fopen(__FILE__, "r"); @@ -121,14 +131,15 @@ public function testGetType() }; $types = [ - "number" => 1.5, - "boolean" => true, - "null" => null, - "object" => $this, - "function" => $function, + "number" => 1.5, + "boolean" => true, + "null" => null, + "object" => $this, + "function" => $function, "expression" => "[a-z]", - "string" => "hello", - "resource" => $file + "string" => "hello", + "resource" => $file, + "array" => ["foo", "bar"] ]; foreach ($types as $type => $variable) { From 8b51b356da1e88b5a7069c2d2c26c13e55488e94 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 18:19:29 +0200 Subject: [PATCH 05/14] Updated tests --- tests/TypeFunctionTest.php | 50 ++++++++------------------------------ 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/tests/TypeFunctionTest.php b/tests/TypeFunctionTest.php index c45af7c..76b4001 100644 --- a/tests/TypeFunctionTest.php +++ b/tests/TypeFunctionTest.php @@ -6,10 +6,7 @@ class TypeFunctionTest extends Test { - /** - * @test - */ - public function itIdentifiesNumbers() + public function testIsNumber() { $this->assertTrue(TypeFunctions\isNumber(0)); $this->assertTrue(TypeFunctions\isNumber(0.5)); @@ -20,10 +17,7 @@ public function itIdentifiesNumbers() $this->assertFalse(TypeFunctions\isNumber(false)); } - /** - * @test - */ - public function itIdentifiesBooleans() + public function testIsBoolean() { $this->assertTrue(TypeFunctions\isBoolean(true)); $this->assertTrue(TypeFunctions\isBoolean(false)); @@ -34,10 +28,7 @@ public function itIdentifiesBooleans() $this->assertFalse(TypeFunctions\isBoolean(0)); } - /** - * @test - */ - public function itIdentifiesNulls() + public function testIsNull() { $this->assertTrue(TypeFunctions\isNull(null)); @@ -46,10 +37,7 @@ public function itIdentifiesNulls() $this->assertFalse(TypeFunctions\isNull(0)); } - /** - * @test - */ - public function itIdentifiesObjects() + public function testIsObject() { $this->assertTrue(TypeFunctions\isObject($this)); @@ -60,10 +48,7 @@ public function itIdentifiesObjects() $this->assertFalse(TypeFunctions\isObject($function)); } - /** - * @test - */ - public function itIdentifiesFunctions() + public function testIsFunction() { $function = function () { echo "hello"; @@ -75,30 +60,21 @@ public function itIdentifiesFunctions() $this->assertFalse(TypeFunctions\isFunction("is_callable")); } - /** - * @test - */ - public function itIdentifiesExpressions() + public function testIsExpression() { $this->assertTrue(TypeFunctions\isExpression("[a-z]")); $this->assertFalse(TypeFunctions\isExpression("hello")); } - /** - * @test - */ - public function itIdentifiesStrings() + public function testIsString() { $this->assertTrue(TypeFunctions\isString("hello")); $this->assertFalse(TypeFunctions\isString("[a-z]")); } - /** - * @test - */ - public function itIdentifiesResources() + public function testIsResource() { $file = fopen(__FILE__, "r"); @@ -109,20 +85,14 @@ public function itIdentifiesResources() fclose($file); } - /** - * @test - */ - public function itIdentifiesArrays() + public function testIsArray() { $this->assertTrue(TypeFunctions\isArray(["foo", "bar"])); $this->assertFalse(TypeFunctions\isArray("foo")); } - /** - * @test - */ - public function itIdentifiesTypes() + public function testGetType() { $file = fopen(__FILE__, "r"); From 978aac5b23ba425f4fc419a5ad1554f3357225dd Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 18:31:31 +0200 Subject: [PATCH 06/14] Changed src folder --- phpunit.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index c51473a..ba09734 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -17,7 +17,7 @@ - source + src From 890909b76fe58c20f95648fe1daa102d8d33f42d Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 18:57:59 +0200 Subject: [PATCH 07/14] Removed 5.5 dependency --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 0a785d4..a70dbba 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,6 @@ ] }, "require-dev": { - "php": ">=5.5.0", "phpunit/phpunit": "4.*" }, "autoload-dev": { From 2dc04962fdc0bc15bedfd5c2bc8fb6a5f2b5952f Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 20:11:42 +0200 Subject: [PATCH 08/14] Added 5.4 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c8dd28a..00362fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: php php: +- 5.4 - 5.5 - 5.6 before_script: From 7dd1577aa34859b85904e18b50417ed9351a0a33 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 20:17:56 +0200 Subject: [PATCH 09/14] Updated readme --- readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index 5a45faa..b7b0843 100644 --- a/readme.md +++ b/readme.md @@ -19,15 +19,15 @@ TypeFunctions\isBoolean("false"); // false Functions: -- `isNumber` -- `isBoolean` -- `isNull` -- `isObject` -- `isFunction` -- `isExpression` -- `isString` -- `isResource` -- `getType` +- `isNumber(mixed $variable)` +- `isBoolean(mixed $variable)` +- `isNull(mixed $variable)` +- `isObject(mixed $variable)` +- `isFunction(mixed $variable)` +- `isExpression(mixed $variable)` +- `isString(mixed $variable)` +- `isResource(mixed $variable)` +- `getType(mixed $variable)` Caveats: From 3779db7104cdfd435d2b40741bb7caf8adee5d18 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 20:24:28 +0200 Subject: [PATCH 10/14] Updated readme --- readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index b7b0843..b1c13b0 100644 --- a/readme.md +++ b/readme.md @@ -19,15 +19,15 @@ TypeFunctions\isBoolean("false"); // false Functions: -- `isNumber(mixed $variable)` -- `isBoolean(mixed $variable)` -- `isNull(mixed $variable)` -- `isObject(mixed $variable)` -- `isFunction(mixed $variable)` -- `isExpression(mixed $variable)` -- `isString(mixed $variable)` -- `isResource(mixed $variable)` -- `getType(mixed $variable)` +- `isNumber(mixed $variable) → bool` +- `isBoolean(mixed $variable) → bool` +- `isNull(mixed $variable) → bool` +- `isObject(mixed $variable) → bool` +- `isFunction(mixed $variable) → bool` +- `isExpression(mixed $variable) → bool` +- `isString(mixed $variable) → bool` +- `isResource(mixed $variable) → bool` +- `getType(mixed $variable) → string` Caveats: From 2f8482f31c5ee1f00e72da47242f3d1b2b1f3ead Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 20:26:10 +0200 Subject: [PATCH 11/14] Updated dependencies --- composer.lock | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 8c78d0b..ceb78e4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b699486a9dc22150656ce08b5f829c00", + "hash": "03ff8205638438c08aa1607992fb2aec", "packages": [], "packages-dev": [ { @@ -806,7 +806,5 @@ "platform": { "php": ">=5.4.0" }, - "platform-dev": { - "php": ">=5.5.0" - } + "platform-dev": [] } From 8efdae6b8a67cd9049ddb3f42dcf0865ad470be7 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 15 Dec 2014 20:27:02 +0200 Subject: [PATCH 12/14] Updated scrutinizer config --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 849c501..90cf931 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -6,4 +6,4 @@ checks: code_rating: true duplication: true filter: - paths: [source/*, tests/*] + paths: [src/*, tests/*] From 049e38d471390b28c1bc4f1774c6b1ca9ee495d3 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Tue, 6 Jan 2015 22:18:07 +0200 Subject: [PATCH 13/14] Refactoring --- src/TypeFunctions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TypeFunctions.php b/src/TypeFunctions.php index 4104a21..2759e6a 100644 --- a/src/TypeFunctions.php +++ b/src/TypeFunctions.php @@ -117,9 +117,10 @@ function getType($variable) $result = "unknown"; foreach ($functions as $function => $type) { - $qualified = "TypedPHP\\Functions\\TypeFunctions\\{$function}"; + $namespace = "TypedPHP\\Functions\\TypeFunctions\\"; + $function = $namespace . $function; - if ($qualified($variable)) { + if ($function($variable)) { $result = $type; break; } From 61f010da9059c6b73f9dbabbd13b38bd5639f558 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Mon, 10 Aug 2015 12:51:03 +1200 Subject: [PATCH 14/14] Added contribution, code of conduct and updated license files --- code-of-conduct.md | 22 ++++++++++++++++++++++ contributing.md | 3 +++ license.md | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 code-of-conduct.md create mode 100644 contributing.md diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 0000000..ae45a0e --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1,22 @@ +# Code of Conduct + +As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..32334e2 --- /dev/null +++ b/contributing.md @@ -0,0 +1,3 @@ +# Contributing + +Contributions are welcome! Create an issue, explaining a bug or proposal. Submit pull requests if you feel brave. Speak to me on [Twitter](https://twitter.com/assertchris). diff --git a/license.md b/license.md index dd55b9c..823fc32 100644 --- a/license.md +++ b/license.md @@ -2,7 +2,7 @@ The MIT License (MIT) -Copyright (c) 2014 Christopher Pitt +Copyright (c) 2015 Christopher Pitt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal