Skip to content

add spell checking and fix spelling errors #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2015
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 @@ -43,11 +43,13 @@ before_script:
- bash -c 'FLAWED_DEPRECATIONS=`echo "${SYMFONY_VERSION:0:3} >= 2.7"|bc`; if [ "$FLAWED_DEPRECATIONS" = "1" ]; then echo "error_reporting = E_ALL & ~E_DEPRECATED" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; echo "PHPUnit_Framework_Error_Deprecated::\$enabled = false;" >> Tests/bootstrap.php; fi;'
- sh -c 'if [ "$FRAMEWORK_EXTRA_VERSION" != "" ]; then composer require --dev --no-update sensio/framework-extra-bundle=$FRAMEWORK_EXTRA_VERSION; fi;'
- composer install
- sudo apt-get install python-sphinx
- sudo apt-get install python-sphinx enchant
- sudo pip install -r Resources/doc/requirements.txt

script:
- phpunit --coverage-clover=coverage.clover
- make -C Resources/doc SPHINXOPTS='-nW' html
- make -C Resources/doc spelling

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
Expand Down
5 changes: 5 additions & 0 deletions Resources/doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " spelling generate a spelling report"

clean:
-rm -rf $(BUILDDIR)/*
Expand Down Expand Up @@ -151,3 +152,7 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

spelling:
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo "Spelling report generated in $(BUILDDIR)/spelling/output.txt"
12 changes: 11 additions & 1 deletion Resources/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.todo']
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.todo',
'sensio.sphinx.configurationblock',
'sphinxcontrib.spelling'
]

# Spelling configuration
spelling_lang='en_US'
spelling_word_list_filename='spelling_word_list.txt'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
31 changes: 31 additions & 0 deletions Resources/doc/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Contributing
============

We are happy for contributions. Before you invest a lot of time however, best
open an issue on github to discuss your idea. Then we can coordinate efforts
if somebody is already working on the same thing. If your idea is specific to
the Symfony framework, it belongs into the ``FOSHttpCacheBundle``, otherwise
it should go into the ``FOSHttpCache`` library.

When you change code, you can run the tests as described in :doc:`testing`.

Building the Documentation
--------------------------

First `install Sphinx`_ and `install enchant`_ (e.g. ``sudo apt-get install enchant``),
then download the requirements:

.. code-block:: bash
$ pip install -r Resources/doc/requirements.txt
To build the docs:

.. code-block:: bash
$ cd doc
$ make html
$ make spelling
.. _install Sphinx: http://sphinx-doc.org/latest/install.html
.. _install enchant: http://www.abisource.com/projects/enchant/
12 changes: 6 additions & 6 deletions Resources/doc/features/invalidation.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Invalidation
============

**Works with**:
**Works with**:

* :ref:`Varnish <foshttpcache:varnish configuration>`
* :ref:`Nginx <foshttpcache:nginx configuration>`

**Preparation**:

In order to invalidate cached objects, requests are sent to your caching proxy,
In order to invalidate cached objects, requests are sent to your caching proxy,
so first:

1. :ref:`configure your proxy <foshttpcache:proxy-configuration>`
1. :ref:`configure your proxy <foshttpcache:proxy-configuration>`
2. :doc:`enable a proxy client </reference/configuration/proxy-client>`

By *invalidating* a piece of content, you tell your HTTP caching proxy (Varnish
Expand Down Expand Up @@ -86,7 +86,7 @@ You can add invalidation rules to your application configuration:
villain_details: ~ # e.g., /villain/{id}
Now when a request to either route ``villain_edit`` or route ``villain_delete``
returns a succesful response, both routes ``vilains_index`` and
returns a successful response, both routes ``villains_index`` and
``villain_details`` will be purged. See the
:doc:`/reference/configuration/invalidation` configuration reference.

Expand Down Expand Up @@ -115,8 +115,8 @@ Console Commands

This bundle provides commands to trigger cache invalidation from the command
line. You could also send invalidation requests with a command line tool like
curl or, in the case of varnish, varnishadm. But the commands simplify the task
and will automatically talk to all configured cache instances.
``curl`` or, in the case of varnish, ``varnishadm``. But the commands simplify
the task and will automatically talk to all configured cache instances.

* ``fos:httpcache:invalidate:path`` accepts one or more paths and invalidates
each of them. See :ref:`cache manager invalidation`.
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/features/symfony-http-cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ By default, the event dispatching cache kernel registers all subscribers it know
about. You can disable subscribers, or customize how they are instantiated.

If you do not need all subscribers, or need to register some yourself to
customize their behaviour, overwrite ``getOptions`` and return the right bitmap
customize their behavior, overwrite ``getOptions`` and return the right bitmap
in ``fos_default_subscribers``. Use the constants provided by the cache kernel::

public function getOptions()
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/features/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Testing
* :ref:`Varnish <foshttpcache:varnish configuration>`
* :ref:`Nginx <foshttpcache:nginx configuration>`

**Preparation**:
**Preparation**:

1. :ref:`Configure caching proxy <foshttpcache:proxy-configuration>`
2. Your application must be reachable from the caching proxy through HTTP, so you
Expand Down Expand Up @@ -49,7 +49,7 @@ Test Client
^^^^^^^^^^^

The ``getResponse()`` method calls ``getHttpClient()`` to retrieve a test client. You
can use this client yourself to customise the requests. Note that the test
can use this client yourself to customize the requests. Note that the test
client must be :doc:`enabled in your configuration </reference/configuration/test>`.
By default, it is enabled when you access your application in debug mode and
you have :doc:`configured a proxy client </reference/configuration/proxy-client>`
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/includes/enabled.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
enabled
-------
``enabled``
-----------

**type**: ``enum``, **default**: ``auto``, **options**: ``true``, ``false``, ``auto``

Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/includes/match.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
match
^^^^^
``match``
^^^^^^^^^

**type**: ``array``

Expand Down
4 changes: 3 additions & 1 deletion Resources/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FOSHttpCacheBundle
This is the documentation for the `FOSHttpCacheBundle <https://github.com/FriendsOfSymfony/FOSHttpCacheBundle>`_.
Use the FOSHttpCacheBundle to:

* Set path-based cache expiration headers via your app configuration;
* Set path-based cache expiration headers via your application configuration;
* Set up an invalidation scheme without writing PHP code;
* Tag your responses and invalidate cache based on tags;
* Send invalidation requests with minimal impact on performance with the FOSHttpCache_ library;
Expand All @@ -20,4 +20,6 @@ Contents
overview
features
reference

testing
contributing
12 changes: 6 additions & 6 deletions Resources/doc/reference/annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ actions are executed.

.. _invalidatepath:

@InvalidatePath
---------------
``@InvalidatePath``
-------------------

Invalidate a path::

Expand All @@ -32,8 +32,8 @@ See :doc:`/features/invalidation` for more information.

.. _invalidateroute:

@InvalidateRoute
----------------
``@InvalidateRoute``
--------------------

Invalidate a route with parameters::

Expand Down Expand Up @@ -66,8 +66,8 @@ See :doc:`/features/invalidation` for more information.

.. _tag:

@Tag
----
``@Tag``
--------

You can make this bundle tag your response automatically using the ``@Tag``
annotation. :term:`Safe <safe>` operations like GET that produce a successful
Expand Down
20 changes: 10 additions & 10 deletions Resources/doc/reference/cache-manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ By *refreshing* a piece of content, a fresh copy will be fetched right away.

.. _cache manager invalidation:

invalidatePath
--------------
``invalidatePath()``
--------------------

.. important::

Expand Down Expand Up @@ -58,8 +58,8 @@ The cache manager offers a fluent interface::

.. _cache manager refreshing:

Refreshing
----------
``refreshPath()`` and ``refreshRoute()``
----------------------------------------

.. note::

Expand All @@ -82,8 +82,8 @@ Refresh a Route::

.. _cache_manager_tags:

tagResponse()
-------------
``tagResponse()``
-----------------

Use the Cache Manager to tag responses::

Expand All @@ -95,17 +95,17 @@ option to true::

$cacheManager->tagResponse($response, array('different'), true);

invalidateTags()
----------------
``invalidateTags()``
--------------------

Invalidate cache tags::

$cacheManager->invalidateTags(array('some-tag', 'other-tag'));

.. _flushing:

Flushing
--------
``flush()``
-----------

Internally, the invalidation requests are queued and only sent out to your HTTP
proxy when the manager is flushed. The manager is flushed automatically at the
Expand Down
12 changes: 6 additions & 6 deletions Resources/doc/reference/configuration/cache-manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ by default if a :doc:`Proxy Client <proxy-client>` is configured.
enabled: true
generate_url_type: true
enabled
-------
``enabled``
-----------

**type**: ``enum`` **options**: ``auto``, ``true``, ``false``

Whether the cache manager service should be enabled. By default, it is enabled
if a proxy client is configured. It can not be enabled without a proxy client.

generate_url_type
-----------------
``generate_url_type``
---------------------

**type**: ``enum`` **options**: ``auto``, ``true``, ``false``, ``relative``, ``network``

The ``$referenceType`` to be used when generating URLs in the invalidateRoute and
refreshRoute calls. True results in absolute URLs including the current domain,
The ``$referenceType`` to be used when generating URLs in the ``invalidateRoute()``
and ``refreshRoute()`` calls. True results in absolute URLs including the current domain,
``false`` generates a path without domain, needing a ``base_url`` to be configured
on the proxy client. When set to ``auto``, the value is determined based on ``base_url``
of the default proxy client.
10 changes: 5 additions & 5 deletions Resources/doc/reference/configuration/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ debug information when that header is present:
enabled: true
header: Please-Send-Debug-Infos
enabled
-------
``enabled``
-----------

**type**: ``enum`` **default**: ``auto`` **options**: ``true``, ``false``, ``auto``

The default value is ``%kernel.debug%``, triggering the header when you are in
dev mode but not in prod mode.
``dev`` mode but not in prod mode.

header
------
``header``
----------

**type**: ``string`` **default**: ``X-Cache-Debug``

Expand Down
21 changes: 10 additions & 11 deletions Resources/doc/reference/configuration/flash-message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,37 @@ another building brick for caching pages for logged in users.
host: null
secure: false
enabled
-------
``enabled``
-----------

**type**: ``boolean`` **default**: ``false``

This event subscriber is disabled by default. You can set enabled to true if
the default values for all options are good for you. When you configure any of
the options, the subscriber is automatically enabled.

name
----
``name``
--------

**type**: ``string`` **default**: ``flashes``
Set the name of the cookie.


path
----
``path``
--------

**type**: ``string`` **default**: ``/``

The cookie path to use.

host
----
``host``
--------

**type**: ``string``

Set the host for the cookie, e.g. to share among subdomains.

secure
------
``secure``
----------

**type**: ``boolean`` **default**: ``false``

Expand Down
Loading