Skip to content

Commit 47e90a2

Browse files
dannylambruebot
authored andcommitted
Fedora resource converter (#1)
* Repo setup. Adding FedoraResourceConverter * License, readme, all that jazz. * PR template * Resonding to @ruebot's feedback * Triggering travis * Ignoring .git and vendor dirs for line endings check.
1 parent 9167faa commit 47e90a2

12 files changed

+2756
-2
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
**GitHub Issue**: (link)
2+
3+
* Other Relevant Links (Google Groups discussion, related pull requests, Release pull requests, etc.)
4+
5+
# What does this Pull Request do?
6+
7+
A brief description of what the intended result of the PR will be and/or what problem it solves.
8+
9+
# What's new?
10+
A in-depth description of the changes made by this PR. Technical details and possible side effects.
11+
12+
* Changes x feature to such that y
13+
* Added x
14+
* Removed y
15+
* Does this change require documentation to be updated?
16+
* Does this change add any new dependencies?
17+
* Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)?
18+
* Could this change impact execution of existing code?
19+
20+
# How should this be tested?
21+
22+
A description of what steps someone could take to:
23+
* Reproduce the problem you are fixing (if applicable)
24+
* Test that the Pull Request does what is intended.
25+
* Please be as detailed as possible.
26+
* Good testing instructions help get your PR completed faster.
27+
28+
# Additional Notes:
29+
Any additional information that you think would be helpful when reviewing this PR.
30+
31+
# Interested parties
32+
Tag (@ mention) interested parties or, if unsure, @Islandora-CLAW/committers

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
vendor

.scripts/line_endings.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
RETURN=0
4+
FILES=`find $1 -type f -name "*" ! -path "$1/vendor/*" ! -path "$1/.git/*"`
5+
echo "Testing for files with DOS line endings..."
6+
for FILE in $FILES
7+
do
8+
file $FILE | grep CRLF
9+
if [ $? == 0 ]
10+
then
11+
RETURN=1
12+
fi
13+
done
14+
exit $RETURN

.scripts/php56.ini

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; there is an issue with php 5.6 that causes travis to fail
2+
; some info about it here:
3+
; https://bugs.php.net/bug.php?id=66763
4+
; https://www.drupal.org/node/2456025
5+
always_populate_raw_post_data = -1
6+

.scripts/travis_setup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if [ $TRAVIS_PHP_VERSION = "5.6" ]; then
2+
phpenv config-add $SCRIPT_DIR/php56.ini
3+
fi

.travis.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
sudo: true
2+
language: php
3+
php:
4+
- 5.6
5+
- 7.0
6+
- 7.1
7+
8+
matrix:
9+
fast_finish: true
10+
11+
branches:
12+
only:
13+
- /master/
14+
15+
before_install:
16+
- export SCRIPT_DIR=$TRAVIS_BUILD_DIR/.scripts
17+
18+
install:
19+
- $SCRIPT_DIR/travis_setup.sh
20+
- composer install
21+
22+
script:
23+
- $SCRIPT_DIR/line_endings.sh $TRAVIS_BUILD_DIR
24+
- vendor/bin/phpcs --standard=PSR2 src
25+
- vendor/bin/phpcpd --names *.php src
26+
27+
notifications:
28+
irc:
29+
channels:
30+
- "irc.freenode.org#islandora"
31+
on_success: change
32+
on_failure: always
33+
skip_join: true
34+

CONTRIBUTING.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Welcome!
2+
3+
If you are reading this document then you are interested in contributing to the Islandora CLAW. All contributions are welcome: use-cases, documentation, code, patches, bug reports, feature requests, etc. You do not need to be a programmer to speak up!
4+
5+
## Workflows
6+
7+
The group meets each Wednesday at 1:00 PM Eastern. Meeting notes and announcements are posted to the [Islandora community list](https://groups.google.com/forum/#!forum/islandora) and the [Islandora developers list](https://groups.google.com/forum/#!forum/islandora-dev). You can view meeting agendas, notes, and call-in information [here](https://github.com/Islandora-CLAW/CLAW/wiki#islandora-claw-tech-calls). Anybody is welcome to join the calls, and add items to the agenda.
8+
9+
### Use cases
10+
11+
If you would like to submit a use case to the Islandora CLAW project, please submit an issue [here](https://github.com/Islandora-CLAW/CLAW/issues/new) using the [Use Case template](https://github.com/Islandora-CLAW/CLAW/wiki/Use-Case-template), prepending "Use Case:" to the title of the issue.
12+
13+
### Documentation
14+
15+
You can contribute documentation in two different ways. One way is to create an issue [here](https://github.com/Islandora-CLAW/CLAW/issues/new), prepending "Documentation:" to the title of the issue. Another way is by pull request, which is the same process as [Contribute Code](https://github.com/Islandora-CLAW/CLAW/blob/master/CONTRIBUTING.md#contribute-code). All documentation resides in [`docs`](https://github.com/Islandora-CLAW/CLAW/tree/master/docs).
16+
17+
### Request a new feature
18+
19+
To request a new feature you should [open an issue in the CLAW repository](https://github.com/Islandora-CLAW/CLAW/issues/new) or create a use case (see the _Use cases_ section above), and summarize the desired functionality. Prepend "Enhancement:" if creating an issue on the project repo, and "Use Case:" if creating a use case.
20+
21+
### Report a bug
22+
23+
To report a bug you should [open an issue in the CLAW repository](https://github.com/Islandora-CLAW/CLAW/issues/new) that summarizes the bug. Prepend the label "Bug:" to the title of the issue.
24+
25+
In order to help us understand and fix the bug it would be great if you could provide us with:
26+
27+
1. The steps to reproduce the bug. This includes information about e.g. the Islandora version you were using along with the versions of stack components.
28+
2. The expected behavior.
29+
3. The actual, incorrect behavior.
30+
31+
Feel free to search the issue queue for existing issues (aka tickets) that already describe the problem; if there is such a ticket please add your information as a comment.
32+
33+
**If you want to provide a pull along with your bug report:**
34+
35+
That is great! In this case please send us a pull request as described in the section _Create a pull request_ below.
36+
37+
### Contribute code
38+
39+
Before you set out to contribute code you will need to have completed a [Contributor License Agreement](http://islandora.ca/sites/default/files/islandora_cla.pdf) or be covered by a [Corporate Contributor Licencse Agreement](http://islandora.ca/sites/default/files/islandora_ccla.pdf). The signed copy of the license agreement should be sent to <mailto:[email protected]>
40+
41+
_If you are interested in contributing code to Islandora but do not know where to begin:_
42+
43+
In this case you should [browse open issues](https://github.com/Islandora-CLAW/CLAW/issues) and check out [use cases](https://github.com/Islandora-CLAW/CLAW/labels/use%20case).
44+
45+
If you are contributing Drupal code, it must adhere to [Drupal Coding Standards](https://www.drupal.org/coding-standards); Travis CI will check for this on pull requests.
46+
47+
Contributions to the Islandora codebase should be sent as GitHub pull requests. See section _Create a pull request_ below for details. If there is any problem with the pull request we can work through it using the commenting features of GitHub.
48+
49+
* For _small patches_, feel free to submit pull requests directly for those patches.
50+
* For _larger code contributions_, please use the following process. The idea behind this process is to prevent any wasted work and catch design issues early on.
51+
52+
1. [Open an issue](https://github.com/Islandora-CLAW/CLAW/issues), prepending "Enhancement:" in the title if a similar issue does not exist already. If a similar issue does exist, then you may consider participating in the work on the existing issue.
53+
2. Comment on the issue with your plan for implementing the issue. Explain what pieces of the codebase you are going to touch and how everything is going to fit together.
54+
3. Islandora committers will work with you on the design to make sure you are on the right track.
55+
4. Implement your issue, create a pull request (see below), and iterate from there.
56+
57+
### Create a pull request
58+
59+
Take a look at [Creating a pull request](https://help.github.com/articles/creating-a-pull-request). In a nutshell you need to:
60+
61+
1. [Fork](https://help.github.com/articles/fork-a-repo) this repository to your personal or institutional GitHub account (depending on the CLA you are working under). Be cautious of which branches you work from though (you'll want to base your work off master, or for Drupal modules use the most recent version branch). See [Fork a repo](https://help.github.com/articles/fork-a-repo) for detailed instructions.
62+
2. Commit any changes to your fork.
63+
3. Send a [pull request](https://help.github.com/articles/creating-a-pull-request) using the [pull request template](https://github.com/Islandora-CLAW/CLAW/blob/master/.github/PULL_REQUEST_TEMPLATE.md) to the Islandora GitHub repository that you forked in step 1. If your pull request is related to an existing issue -- for instance, because you reported a [bug/issue](https://github.com/Islandora-CLAW/CLAW/issues) earlier -- prefix the title of your pull request with the corresponding issue number (e.g. `issue-123: ...`). Please also include a reference to the issue in the description of the pull. This can be done by using '#' plus the issue number like so '#123', also try to pick an appropriate name for the branch in which you're issuing the pull request from.
64+
65+
You may want to read [Syncing a fork](https://help.github.com/articles/syncing-a-fork) for instructions on how to keep your fork up to date with the latest changes of the upstream (official) repository.
66+
67+
## License Agreements
68+
69+
The Islandora Foundation requires that contributors complete a [Contributor License Agreement](http://islandora.ca/sites/default/files/islandora_cla.pdf) or be covered by a [Corporate Contributor License Agreement](http://islandora.ca/sites/default/files/islandora_ccla.pdf). The signed copy of the license agreement should be sent to <a href="mailto:[email protected]?Subject=Contributor%20License%20Agreement" target="_top">[email protected]</a>. This license is for your protection as a contributor as well as the protection of the Foundation and its users; it does not change your rights to use your own contributions for any other purpose.
70+

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Islandora Foundation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+52-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# Crayfish-Commons
2-
Shared code between Crayfish microservices.
1+
# Crayfish Commons
2+
3+
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net/)
4+
[![Build Status](https://travis-ci.org/Islandora-CLAW/Crayfish-Commons.svg?branch=master)](https://travis-ci.org/Islandora-CLAW/Crayfish)
5+
[![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
6+
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](./LICENSE)
7+
8+
Crayfish Commons is a library housing shared code for Crayfish microservices.
9+
10+
## Requirements
11+
12+
* PHP 5.6+
13+
* [Composer](https://getcomposer.org/)
14+
15+
## Development
16+
17+
If you would like to contribute, please get involved by attending our weekly
18+
[Tech Call][5]. We love to hear from you!
19+
20+
If you would like to contribute code to the project, you need to be covered by
21+
an Islandora Foundation [Contributor License Agreement][6] or
22+
[Corporate Contributor License Agreement][7]. Please see the
23+
[Contributors][8] pages on Islandora.ca for more information.
24+
25+
## Sponsors
26+
27+
* UPEI
28+
* discoverygarden inc.
29+
* LYRASIS
30+
* McMaster University
31+
* University of Limerick
32+
* York University
33+
* University of Manitoba
34+
* Simon Fraser University
35+
* PALS
36+
* American Philosophical Society
37+
* common media inc.
38+
39+
## Maintainers
40+
41+
* [Daniel Lamb](https://github.com/dannylamb)
42+
43+
## License
44+
45+
[MIT](https://opensource.org/licenses/MIT)
46+
47+
[5]: https://github.com/Islandora-CLAW/CLAW/wiki
48+
[6]: http://islandora.ca/sites/default/files/islandora_cla.pdf
49+
[7]: http://islandora.ca/sites/default/files/islandora_ccla.pdf
50+
[8]: http://islandora.ca/resources/contributors
51+
52+

composer.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "islandora/crayfish-commons",
3+
"description": "Shared code amongst Islandora Crayfish microservices",
4+
"type": "library",
5+
"require": {
6+
"islandora/chullo": "^0.0.8",
7+
"symfony/http-foundation": "3.2.6"
8+
},
9+
"require-dev": {
10+
"phpunit/phpunit": "^5.0",
11+
"squizlabs/php_codesniffer": "^2.0",
12+
"sebastian/phpcpd": "^3.0"
13+
},
14+
"autoload": {
15+
"psr-4": {
16+
"Islandora\\Crayfish\\Commons\\": "src/"
17+
}
18+
},
19+
"license": "MIT",
20+
"authors": [
21+
{
22+
"name": "Islandora Foundation",
23+
"email": "[email protected]",
24+
"role": "Owner"
25+
},
26+
{
27+
"name": "Daniel Lamb",
28+
"email": "[email protected]",
29+
"role": "Maintainer"
30+
}
31+
]
32+
}

0 commit comments

Comments
 (0)