Skip to content

Commit

Permalink
#5 Split docs into Open and Custom Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
groganz committed Jul 16, 2016
1 parent 9b1654b commit 1fb426a
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 12 deletions.
2 changes: 1 addition & 1 deletion open/administrator/installation/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ You can easily add modules (e.g. to post on Twitter or Facebook) at http://local
Start Developing!
-----------------

You can now :doc:`start developing with CampaignChain </developer/book/index>` and create your
You can now :doc:`start developing with CampaignChain </open/developer/book/index>` and create your
own bundles that include CampaignChain modules in the *src/* directory inside
the Symfony root.

Expand Down
213 changes: 213 additions & 0 deletions open/developer/book/contribute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
How to Contribute
=================

If you would like to add new functionality or fix a bug in CampaignChain, you
are more than welcomed!

In general, we follow the best practices of open-source collaboration and
developed some of our own - which is mostly due to the fact that CampaignChain
is highly modular.

Find below some guidelines and we'd appreciate if you followed them. Should you
have questions, please [contact us](http://www.campaignchain.com/contact/).

GitHub
------

We use [GitHub]() to develop the CampaignChain Open Edition. It allows us to
collaborate with developers world-wide.

Please follow these guidelines:

Issues
~~~~~~

Always create an issue for the task you are working on at https://github.com/CampaignChain/campaignchain-custom/issues.

Commit Message
~~~~~~~~~~~~~~

The Git commit message should point to the issue you are working on. The syntax
is:

.. code-block::
CampaignChain/campaignchain#{issue-number} {issue-title}
In [PHPStorm](https://www.jetbrains.com/phpstorm/), you can use below definition
for the commit message field when configuring the GitHub server to retrieve
issues within PHPStorm:

.. code-block::
CampaignChain/{project}#{number} {summary}
Pull Requests
~~~~~~~~~~~~~

Never commit directly to the ``master`` branch of CampaignChain or its modules.
Instead, please :ref:`create branches <dev-book-contribute-branching>`. That way
we can first test your contributions in the branch, ask you for changes, and
then merge them with the ``master`` branch.

What's great about GitHub is that it [let's you easily create pull requests](https://help.github.com/articles/creating-a-pull-request/)
and then comment on it, [even on single lines of the code](https://help.github.com/articles/commenting-on-differences-between-files/).

So, once you are done with your changes and they are all committed to your
branch, please create a pull request and we'll review it.

.. _dev-book-contribute-branching:

Branching
---------

Whenever you create a new feature for CampaignChain or want to contribute a bug
fix, please create a new branch of the respective CampaignChain module(s) or
Symfony bundles you are working on.

Also, make sure you create a new branch of the [CampaignChain/campaignchain](https://github.com/CampaignChain/campaignchain)
application as well.

How to Create a Branch?
~~~~~~~~~~~~~~~~~~~~~~~

If you are not familiar with Git and branching, please read the introduction
[Basic Branching and Merging](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging).

Inline Alias in composer.json
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can define in the [``composer.json``](https://github.com/CampaignChain/campaignchain/blob/master/composer.json)
file of the application, which branched modules/bundles you'd like to use for
development. Just list them in the ``require-dev`` section and define the
branch as a [Composer inline alias](https://getcomposer.org/doc/articles/aliases.md#require-inline-alias).

Here's an example how to do it for your custom module/bundle:

.. code-block:: yaml
"require-dev": {
"acme/my-bundle": "my-branch as dev-master"
},
If you are working on existing CampaignChain modules, e.g. to fix a bug, create
a branch and define it as an inline alias. All [Composer version constraints](https://getcomposer.org/doc/articles/versions.md)
defined elsewhere will be overridden.

.. code-block:: yaml
"require-dev": {
"campaignchain/core": "my-branch as dev-master"
},
Modify Sample Data
~~~~~~~~~~~~~~~~~~

Please modify the :ref:`sample data <dev-book-contribute-sample-data>` accordingly
by changing existing fixtures or by adding those which allow others to test new
features.

.. _dev-book-contribute-sample-data:

Sample Data
-----------

When you are developing with CampaignChain, sample data will be available
automatically. Learn how to :doc:`import sample data to the system </open/developer/book/sample_data>`.

To allow testing of your changes by others, please keep all the publicly available
:ref:`sample data packages <dev-book-sample-data-packages>` in sync with your
branch.

License
-------

All code developed for the CampaignChain Open Edition is available under the
[Apache License](http://www.apache.org/licenses/LICENSE-2.0). We ask all
contributors to assign new code to the same license.

Please add a ``LICENSE`` file with the [content of the Apache License](http://www.apache.org/licenses/LICENSE-2.0) into the
root of new packages that you want to be included as part of the CampaignChain
Open Edition.

The below license block has to be present at the top of every file:

In PHP before the namespace:

.. code-block:: php
/*
* Copyright 2016 CampaignChain, Inc. <info@campaignchain.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License 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.
*/
In ``.yml`` configuration files, at the very top:

.. code-block:: yaml
# Copyright 2016 CampaignChain, Inc. <info@campaignchain.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License 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.
In TWIG files at the very top:

.. code-block:: html+jinja
{#
Copyright 2016 CampaignChain, Inc. <info@campaignchain.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License 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.
#}

In CSS files at the very top:

.. code-block:: css
/*
Copyright 2016 CampaignChain, Inc. <info@campaignchain.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License 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.
*/
Credits
-------

If you use third-party intellectual property, you must make sure that you are
allowed to do so. Please add a ``NOTICE`` file in the root directory of a new
module/bundle where you credit the copyright holders. See for example the
[NOTICE file of the core bundle](https://github.com/CampaignChain/core/blob/master/NOTICE).
2 changes: 1 addition & 1 deletion open/developer/book/dev_mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Development Tools

The navigation bar will display an icon to access various developer tools from
within the CampaignChain user interface, such as
:doc:`loading sample data </developer/book/sample_data>`.
:doc:`loading sample data </open/developer/book/sample_data>`.

.. image:: /images/developer/book/load_sample_data.png
:width: 600px
Expand Down
2 changes: 1 addition & 1 deletion open/developer/book/development_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ installed with the ``--stability=dev`` option through Composer_.
* `amariki/data-test`_
* `amariki/data-demo`_

Learn :doc:`how to load sample data </developer/book/sample_data>` in
Learn :doc:`how to load sample data </open/developer/book/sample_data>` in
CampaignChain.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion open/developer/book/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ following conversion funnel:
With CampaignChain, you will be able to understand how many leads have been
generated by that specific Twitter post.

Learn more about the details of CampaignChain's :doc:`Call to Action (CTA) Tracking </developer/book/cta>`.
Learn more about the details of CampaignChain's :doc:`Call to Action (CTA) Tracking </open/developer/book/cta>`.

User Interface
--------------
Expand Down
4 changes: 3 additions & 1 deletion open/developer/book/sample_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ development process.
backup your CampaignChain database if you are not sure whether the sample
data you load is safe.

.. _dev-book-sample-data-packages:

Packages
--------

Expand Down Expand Up @@ -67,7 +69,7 @@ these instructions:
.. note::
If you would like to retrieve a ``credentials.yml`` file for the default
sample data packages that works out-of-the-box, check out how to apply for
access to the :doc:`live development environment </developer/book/development_environment>`.
access to the :doc:`live development environment </open/developer/book/development_environment>`.

Usage
-----
Expand Down
4 changes: 2 additions & 2 deletions open/developer/cookbook/connect_a_new_online_channel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ XING activity stream and post updates to it.
Assumptions and Prerequisites
-----------------------------
* You have a `Symfony environment`_ meeting all the system requirements.
* You have a working :doc:`CampaignChain development installation </administrator/installation/dev>`.
* You have a working :doc:`CampaignChain development installation </open/administrator/installation/dev>`.
* You have a good understanding of the OAuth authentication process.
* You have a good understanding of the XING REST API.
`Learn more about the API`_.
* You have an application registered with XING and have obtained the
necessary keys. `Register your application`_.
* You have an account registered with XING, or you have access to the
:doc:`CampaignChain live development environment </developer/book/development_environment>` (optional, for testing).
:doc:`CampaignChain live development environment </open/developer/book/development_environment>` (optional, for testing).

Overview
--------
Expand Down
3 changes: 2 additions & 1 deletion open/developer/cookbook/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ The Developer Cookbook
:maxdepth: 2

connect_a_new_online_channel
how_to_use_the_rest_api
branching
how_to_use_the_rest_api
8 changes: 4 additions & 4 deletions open/developer/quick_tour/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ Installation

Install CampaignChain with some sample data in 10 minutes! Learn all about the
system requirements, step-by-step installation and configuration as well as
how to load the sample data in the :doc:`Community Edition installation </administrator/installation/ce>` tutorial.
how to load the sample data in the :doc:`Community Edition installation </open/administrator/installation/ce>` tutorial.

Architecture
------------

Before you start developing with CampaignChain, please make yourself familiar with
the following concepts of its software architecture:

1. :doc:`Features, entities, calls to action </developer/book/overview>`
2. :doc:`General introduction to modules </developer/book/modules>`
1. :doc:`Features, entities, calls to action </open/developer/book/overview>`
2. :doc:`General introduction to modules </open/developer/book/modules>`

Development
-----------

Customizing and enhancing CampaignChain can all be done through modules. There is
an in-depth tutorial available that shows you how to :doc:`Connect a new Online Channel </developer/cookbook/connect_a_new_online_channel>`.
an in-depth tutorial available that shows you how to :doc:`Connect a new Online Channel </open/developer/cookbook/connect_a_new_online_channel>`.

0 comments on commit 1fb426a

Please sign in to comment.