Skip to content

Commit 1815823

Browse files
author
Nara Kasbergen
committed
Official public release
0 parents  commit 1815823

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5549
-0
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
trim_trailing_whitespace = true
7+
# Unix-style newlines with a newline ending every file
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Matches multiple files with brace expansion notation
12+
# Set default charset
13+
[*.{php,inc,js,css,html}]
14+
charset = utf-8
15+
16+
# 4 space indentation
17+
[*.{php,inc,js,css,html}]
18+
indent_style = space
19+
indent_size = 4
20+
21+
# Matches the exact file
22+
[{composer.json}]
23+
indent_style = space
24+
indent_size = 4
25+
26+
[*.md]
27+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* text=auto
2+
3+
/bin export-ignore
4+
/docs export-ignore
5+
/examples export-ignore
6+
/tests export-ignore
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/phpdoc.xml export-ignore
11+
/phpunit.xml export-ignore
12+
/CODE_OF_CONDUCT.md export-ignore
13+
/CONTRIBUTING.md export-ignore

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*.log
2+
3+
### JetBrains template
4+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
5+
6+
*.iml
7+
8+
## Directory-based project format:
9+
.idea/
10+
# if you remove the above rule, at least ignore the following:
11+
12+
# User-specific stuff:
13+
# .idea/workspace.xml
14+
# .idea/tasks.xml
15+
# .idea/dictionaries
16+
17+
# Sensitive or high-churn files:
18+
# .idea/dataSources.ids
19+
# .idea/dataSources.xml
20+
# .idea/sqlDataSources.xml
21+
# .idea/dynamic.xml
22+
# .idea/uiDesigner.xml
23+
24+
# Gradle:
25+
# .idea/gradle.xml
26+
# .idea/libraries
27+
28+
# Mongo Explorer plugin:
29+
# .idea/mongoSettings.xml
30+
31+
## File-based project format:
32+
*.ipr
33+
*.iws
34+
35+
## Plugin-specific files:
36+
37+
# IntelliJ
38+
/out/
39+
40+
# mpeltonen/sbt-idea plugin
41+
.idea_modules/
42+
43+
# JIRA plugin
44+
atlassian-ide-plugin.xml
45+
46+
# Crashlytics plugin (for Android Studio and IntelliJ)
47+
com_crashlytics_export_strings.xml
48+
crashlytics.properties
49+
crashlytics-build.properties
50+
51+
### Composer template
52+
# composer.phar
53+
composer.lock
54+
vendor/
55+
56+
# PHPUnit Results & Code Coverage
57+
test-results/
58+
59+
# PHPDoc
60+
build/
61+
docs/structure.xml

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<a name="1.0.0"></a>
2+
# 1.0.0 (2016-06-17)
3+
4+
Initial release.

CODE_OF_CONDUCT.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Developer Community Code of Conduct
2+
3+
### Introduction
4+
5+
* Diversity and inclusion make our community strong. We encourage participation from the most varied and diverse backgrounds possible and want to be very clear about where we stand.
6+
* Our goal is to maintain a safe, helpful and friendly community for everyone, regardless of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other defining characteristic.
7+
* This code and related procedures also apply to unacceptable behavior occurring outside the scope of community activities, in all community venues— online and in-person— as well as in all one-on-one communications, and anywhere such behavior has the potential to adversely affect the safety and well-being of community members.
8+
9+
10+
### Expected Behavior
11+
12+
* Be welcoming.
13+
* Be kind.
14+
* Look out for each other.
15+
16+
17+
### Unacceptable Behavior
18+
19+
* Conduct or speech which might be considered sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory or offensive in nature.
20+
* Do not use unwelcome, suggestive, derogatory or inappropriate nicknames or terms.
21+
* Do not show disrespect towards others. (Jokes, innuendo, dismissive attitudes.)
22+
* Intimidation or harassment (online or in-person). Please read the [Citizen Code of Conduct](http://citizencodeofconduct.org/) for how we interpret harassment.
23+
* Disrespect towards differences of opinion.
24+
* Inappropriate attention or contact. Be aware of how your actions affect others. If it makes someone uncomfortable, stop.
25+
* Not understanding the differences between constructive criticism and disparagement.
26+
* Sustained disruptions.
27+
* Violence, threats of violence or violent language.
28+
29+
30+
### Enforcement
31+
32+
* Understand that speech and actions have consequences, and unacceptable behavior will not be tolerated.
33+
* If you are the subject of, or witness to any violations of this Code of Conduct, please contact us by sending an email to [NPROneEnterprise@npr.org](mailto:NPROneEnterprise@npr.org).
34+
* If violations occur, organizers will take any action they deem appropriate for the infraction, up to and including expulsion.
35+
36+
37+
_Copied from the [Slack Developer Community Code of Conduct](https://api.slack.com/docs/community-code-of-conduct). Portions of the original were derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/), [The Citizen Code of Conduct](http://citizencodeofconduct.org/), [The Rust Code of Conduct](https://www.rust-lang.org/conduct.html) and [The Ada Initiative](http://adainitiative.org/2014/02/18/howto-design-a-code-of-conduct-for-your-community/) under a Creative Commons [Attribution-ShareAlike](http://creativecommons.org/licenses/by-sa/3.0/) license._

CONTRIBUTING.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Contributing
2+
3+
If you're interested in contributing to this project by submitting bug reports, helping to improve the documentation, or writing actual code, please read on.
4+
5+
##### Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Submitting Issues](#submitting-issues)
9+
- [Got a Question or Problem?](#got-a-question-or-problem)
10+
- [Found a Bug?](#found-a-bug)
11+
- [Want a Feature?](#want-a-feature)
12+
- [Contributing to Development](#contributing-to-development)
13+
- [Getting Set Up](#getting-set-up)
14+
- [Coding Style](#coding-style)
15+
- [Testing](#testing)
16+
- [Generating Documentation](#generating-documentation)
17+
- [Generating a Changelog](#generating-a-changelog)
18+
19+
20+
## Code of Conduct
21+
22+
Please note that this project has a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms.
23+
24+
25+
## Submitting Issues
26+
27+
When you're considering [submitting an issue to our GitHub repository](https://github.com/nprdm/npr-one-backend-proxy-php/issues/new), please consider the following guidelines:
28+
29+
### Got a Question or Problem?
30+
31+
If you have questions about how to use this package, we would generally prefer that you [contact us via e-mail](mailto:NPROneEnterprise@npr.org) rather than opening a ticket. That said, if you have constructive feedback for how we can make this package better by improving the documentation, by all means, [submit an issue](https://github.com/nprdm/npr-one-backend-proxy-php/issues/new). Please be detailed about your specific pain points, so that we're clear on what aspects of the documentation should be improved.
32+
33+
### Found a Bug?
34+
35+
If you find a bug in the source code or a mistake in the documentation, you can help us by [submitting an issue to our GitHub repository](https://github.com/nprdm/npr-one-backend-proxy-php/issues/new). Even better, you can submit a pull request with a fix. (Please read and follow our [Development Guidelines](#contributing-to-development) before submitting your PR.)
36+
37+
### Want a Feature?
38+
39+
You can request a new feature by [submitting an issue to our GitHub repository](https://github.com/nprdm/npr-one-backend-proxy-php/issues/new). Even if the feature is small and you are able to submit a pull request to implement it yourself, we would prefer to discuss it in the comments on the issue before you run off and write the code. Because this package is largely intended to function as an educational tool and documentation companion, we are trying to keep the codebase as simple and clear as possible, and not all new feature requests will be accepted. That said, you are always welcome to maintain a fork of our repository that has the additional features that you need.
40+
41+
42+
## Contributing to Development
43+
44+
If you would like to contribute to the development of this project, here is the additional information you need:
45+
46+
### Getting Set Up
47+
48+
This project uses [Composer](https://getcomposer.org/) and includes a composer.phar for convenience under `/bin`.
49+
50+
- `bin/composer.phar install`: install all dependencies
51+
52+
Additionally, we highly recommend doing your development with [Xdebug enabled](https://xdebug.org/docs/install), to allow you to take advantage of various features, such as automatic code coverage measurement.
53+
54+
### Coding Style
55+
56+
We follow the [PSR-1](http://www.php-fig.org/psr/psr-1/) basic coding standards and [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style guide, with the following addenda, exceptions, and clarifications:
57+
58+
* All variables/property names should be in `$camelCase` only.
59+
* We put all opening curly braces on their own separate line, even for control structures.
60+
* We prefer `else if` to `elseif`.
61+
* We do not enforce any soft limit on line length (but expect developers to practice common sense here).
62+
63+
Pull requests not conforming to our coding style may be asked to be updated before they are merged.
64+
65+
### Testing
66+
67+
This project includes tests which can be executed with PHPUnit.
68+
69+
- `./vendor/bin/phpunit`: runs all unit tests
70+
71+
PHPUnit is configured to generate coverage reports in a `coverage` folder under `test-results` in the root of the project. Overall test coverage can viewed by opening `test-results/coverage/index.html`. (N.B. These coverage reports are purposely excluded from source control.) Note that [Xdebug must be enabled](https://xdebug.org/docs/install) in order for code coverage to be generated.
72+
73+
XML files are also generated for reporting test results and coverage on a CI server; again, those can be found under `test-results`.
74+
75+
### Generating Documentation
76+
77+
We are using [phpDocumentor](http://www.phpdoc.org) paired with the [phpdoc-md](https://github.com/evert/phpdoc-md) plugin to generate documentation in Markdown based on the contents of our PHPDoc blocks. To generate or update the documentation, use:
78+
79+
```
80+
./vendor/bin/phpdoc
81+
./vendor/bin/phpdocmd docs/structure.xml docs --index README.md
82+
```
83+
84+
### Generating a Changelog
85+
86+
This will generally only ever be done by a maintainer from within NPR, but just in case: We're using the [phly/changelog-generator](https://github.com/weierophinney/changelog_generator) package, and the CLI command is:
87+
88+
```
89+
vendor/bin/changelog_generator.php -t githubAPItoken -u nprdm -r npr-one-backend-proxy-php -m 1 > CHANGELOG.md
90+
```

LICENSE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (c) 2016 NPR
2+
3+
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/License-2.0) (the “License”) with the following modification; you may not use this file except in compliance with the License as modified by the addition of Section 10, as follows:
4+
5+
##### 10. Prohibitions
6+
7+
When using the Work, you may not (or allow those acting on your behalf to):
8+
9+
a. Perform an action with the intent of introducing to the Work, the NPR One API or any other NPR products and services any viruses, worms, defects, Trojan horses, malware or any items of a destructive nature, or obtaining unauthorized access to the NPR One API or any other NPR products or services;
10+
11+
b. Remove, obscure or alter any NPR terms of service, including the [NPR services Terms of Use](http://www.npr.org/about-npr/179876898/terms-of-use) and the [Developer API Terms of Use](http://dev.npr.org/terms-of-use/), or any links to or notices of those terms; or
12+
13+
c. Take any other action prohibited by any NPR terms of service, including the [NPR services Terms of Use](http://www.npr.org/about-npr/179876898/terms-of-use) and the [Developer API Terms of Use](http://dev.npr.org/terms-of-use/), unless expressly permitted by the License.
14+
15+
You may obtain a copy of the License at http://www.apache.org/licenses/License-2.0
16+
17+
Unless required by applicable law or agreed to in writing, software distributed under the License with the above modification is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0 commit comments

Comments
 (0)