Hello community,
here is the log from the commit of package python-readthedocs-sphinx-ext for
openSUSE:Factory checked in at 2019-07-30 13:04:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext (Old)
and /work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.4126
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-readthedocs-sphinx-ext"
Tue Jul 30 13:04:59 2019 rev:2 rq:717585 version:1.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-readthedocs-sphinx-ext/python-readthedocs-sphinx-ext.changes
2019-05-27 08:38:47.671061405 +0200
+++
/work/SRC/openSUSE:Factory/.python-readthedocs-sphinx-ext.new.4126/python-readthedocs-sphinx-ext.changes
2019-07-30 13:05:01.110393828 +0200
@@ -1,0 +2,6 @@
+Mon Jul 22 13:04:39 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.0:
+ * no upstream changelog
+
+-------------------------------------------------------------------
Old:
----
LICENSE
readthedocs-sphinx-ext-0.5.17.tar.gz
New:
----
readthedocs-sphinx-ext-1.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-readthedocs-sphinx-ext.spec ++++++
--- /var/tmp/diff_new_pack.ehfeeE/_old 2019-07-30 13:05:02.222393535 +0200
+++ /var/tmp/diff_new_pack.ehfeeE/_new 2019-07-30 13:05:02.226393534 +0200
@@ -18,15 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-readthedocs-sphinx-ext
-Version: 0.5.17
+Version: 1.0.0
Release: 0
Summary: Sphinx extension for Read the Docs overrides
License: MIT
Group: Development/Languages/Python
URL: http://github.com/rtfd/readthedocs-sphinx-ext
Source:
https://files.pythonhosted.org/packages/source/r/readthedocs-sphinx-ext/readthedocs-sphinx-ext-%{version}.tar.gz
-# https://github.com/rtfd/readthedocs-sphinx-ext/pull/65
-Source1:
https://raw.githubusercontent.com/rtfd/readthedocs-sphinx-ext/master/LICENSE
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
@@ -45,7 +43,6 @@
%prep
%setup -q -n readthedocs-sphinx-ext-%{version}
-cp %{SOURCE1} .
%build
%python_build
++++++ readthedocs-sphinx-ext-0.5.17.tar.gz ->
readthedocs-sphinx-ext-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-0.5.17/LICENSE
new/readthedocs-sphinx-ext-1.0.0/LICENSE
--- old/readthedocs-sphinx-ext-0.5.17/LICENSE 1970-01-01 01:00:00.000000000
+0100
+++ new/readthedocs-sphinx-ext-1.0.0/LICENSE 2019-06-12 00:28:26.000000000
+0200
@@ -0,0 +1,23 @@
+Copyright (c) 2010-2019 Read the Docs, Inc & contributors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-0.5.17/MANIFEST.in
new/readthedocs-sphinx-ext-1.0.0/MANIFEST.in
--- old/readthedocs-sphinx-ext-0.5.17/MANIFEST.in 2019-02-21
21:50:58.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/MANIFEST.in 2019-06-26
00:42:12.000000000 +0200
@@ -5,3 +5,4 @@
recursive-include tests *.py
recursive-include tests *.rst
include *.rst
+include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-0.5.17/PKG-INFO
new/readthedocs-sphinx-ext-1.0.0/PKG-INFO
--- old/readthedocs-sphinx-ext-0.5.17/PKG-INFO 2019-02-21 23:34:29.000000000
+0100
+++ new/readthedocs-sphinx-ext-1.0.0/PKG-INFO 2019-07-16 21:49:55.000000000
+0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.0
Name: readthedocs-sphinx-ext
-Version: 0.5.17
+Version: 1.0.0
Summary: Sphinx extension for Read the Docs overrides
-Home-page: http://github.com/rtfd/readthedocs-sphinx-ext
+Home-page: http://github.com/readthedocs/readthedocs-sphinx-ext
Author: Read the Docs, Inc
Author-email: [email protected]
License: MIT
@@ -12,8 +12,8 @@
.. image:: https://img.shields.io/pypi/v/readthedocs-sphinx-ext.svg
:target: https://pypi.python.org/pypi/readthedocs-sphinx-ext
:alt: Pypi Version
- .. image::
https://travis-ci.org/rtfd/readthedocs-sphinx-ext.svg?branch=master
- :target: https://travis-ci.org/rtfd/readthedocs-sphinx-ext
+ .. image::
https://travis-ci.org/readthedocs/readthedocs-sphinx-ext.svg?branch=master
+ :target: https://travis-ci.org/readthedocs/readthedocs-sphinx-ext
:alt: Build Status
This module adds extensions that make Sphinx easier to use.
@@ -31,7 +31,7 @@
#. Increment the version in ``setup.py``
#. Tag the release in git: ``git tag $NEW_VERSION``.
- #. Push the tag to GitHub: ``git push --tags origin``
+ #. Push the tag to GitHub: ``git push --tags origin master``
#. Upload the package to PyPI:
.. code:: bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-0.5.17/README.rst
new/readthedocs-sphinx-ext-1.0.0/README.rst
--- old/readthedocs-sphinx-ext-0.5.17/README.rst 2019-02-21
21:48:39.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/README.rst 2019-07-16 21:28:46.000000000
+0200
@@ -4,8 +4,8 @@
.. image:: https://img.shields.io/pypi/v/readthedocs-sphinx-ext.svg
:target: https://pypi.python.org/pypi/readthedocs-sphinx-ext
:alt: Pypi Version
-.. image:: https://travis-ci.org/rtfd/readthedocs-sphinx-ext.svg?branch=master
- :target: https://travis-ci.org/rtfd/readthedocs-sphinx-ext
+.. image::
https://travis-ci.org/readthedocs/readthedocs-sphinx-ext.svg?branch=master
+ :target: https://travis-ci.org/readthedocs/readthedocs-sphinx-ext
:alt: Build Status
This module adds extensions that make Sphinx easier to use.
@@ -23,7 +23,7 @@
#. Increment the version in ``setup.py``
#. Tag the release in git: ``git tag $NEW_VERSION``.
-#. Push the tag to GitHub: ``git push --tags origin``
+#. Push the tag to GitHub: ``git push --tags origin master``
#. Upload the package to PyPI:
.. code:: bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
---
old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
2018-06-06 19:41:18.000000000 +0200
+++
new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/_templates/readthedocs-insert.html.tmpl
2019-06-26 00:42:12.000000000 +0200
@@ -22,9 +22,9 @@
<!-- Add page-specific data, which must exist in the page js, not global -->
<script type="text/javascript">
-READTHEDOCS_DATA['page'] = '{{ pagename }}'
+READTHEDOCS_DATA['page'] = {{ pagename|tojson }}
{%- if page_source_suffix %}
-READTHEDOCS_DATA['source_suffix'] = '{{ page_source_suffix }}'
+READTHEDOCS_DATA['source_suffix'] = {{ page_source_suffix|tojson }}
{%- endif %}
</script>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/external_version_warning.py
new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/external_version_warning.py
---
old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/external_version_warning.py
1970-01-01 01:00:00.000000000 +0100
+++
new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/external_version_warning.py
2019-07-16 21:28:46.000000000 +0200
@@ -0,0 +1,27 @@
+from docutils import nodes
+
+try:
+ # Avaliable from Sphinx 1.6
+ from sphinx.util.logging import getLogger
+except ImportError:
+ from logging import getLogger
+
+log = getLogger(__name__)
+
+
+def process_external_version_warning_banner(app, doctree, fromdocname):
+ """
+ Add warning banner for external versions in every page.
+
+ If the version type is external this will show a warning banner
+ at the top of each page of the documentation.
+ """
+ for document in doctree.traverse(nodes.document):
+ text = 'This Documentation was created from pull/merge request.'
+ prose = nodes.paragraph(text, text)
+ warning = nodes.warning(prose, prose)
+ document.insert(0, warning)
+
+
+def setup(app):
+ app.connect('doctree-resolved', process_external_version_warning_banner)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/readthedocs.py
new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/readthedocs.py
--- old/readthedocs-sphinx-ext-0.5.17/readthedocs_ext/readthedocs.py
2019-02-21 21:49:22.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/readthedocs_ext/readthedocs.py
2019-07-16 21:28:59.000000000 +0200
@@ -15,6 +15,7 @@
StandaloneHTMLBuilder)
from sphinx.util.console import bold
+
from .embed import EmbedDirective
from .mixins import BuilderMixin
@@ -27,10 +28,20 @@
log = getLogger(__name__)
DEFAULT_STATIC_URL = 'https://assets.readthedocs.org/static/'
+ONLINE_BUILDERS = [
+ 'readthedocs', 'readthedocsdirhtml', 'readthedocssinglehtml'
+]
+# Only run JSON output once during HTML build
+# This saves resources and keeps filepaths correct,
+# because singlehtml filepaths are different
+JSON_BUILDERS = [
+ 'html', 'dirhtml',
+ 'readthedocs', 'readthedocsdirhtml'
+]
# Whitelist keys that we want to output
# to the json artifacts.
-KEYS = [
+JSON_KEYS = [
'body',
'title',
'sourcename',
@@ -65,15 +76,12 @@
"""
STATIC_URL = context.get('STATIC_URL', DEFAULT_STATIC_URL)
- online_builders = [
- 'readthedocs', 'readthedocsdirhtml', 'readthedocssinglehtml'
- ]
if app.builder.name == 'readthedocssinglehtmllocalmedia':
if 'html_theme' in context and context['html_theme'] ==
'sphinx_rtd_theme':
theme_css = '_static/css/theme.css'
else:
theme_css = '_static/css/badge_only.css'
- elif app.builder.name in online_builders:
+ elif app.builder.name in ONLINE_BUILDERS:
if 'html_theme' in context and context['html_theme'] ==
'sphinx_rtd_theme':
theme_css = '%scss/sphinx_rtd_theme.css' % STATIC_URL
else:
@@ -102,7 +110,10 @@
# This is monkey patched on the signal because we can't know what the user
# has done with their `app.builder.templates` before now.
- if not hasattr(app.builder.templates.render, '_patched'):
+ if (
+ app.builder.name in ONLINE_BUILDERS and not
+ hasattr(app.builder.templates.render, '_patched')
+ ):
# Janky monkey patch of template rendering to add our content
old_render = app.builder.templates.render
@@ -148,6 +159,8 @@
This way we can skip generating this in other build step.
"""
+ if app.builder.name not in JSON_BUILDERS:
+ return
try:
# We need to get the output directory where the docs are built
# _build/json.
@@ -161,7 +174,7 @@
with open(outjson, 'w+') as json_file:
to_context = {
key: context.get(key, '')
- for key in KEYS
+ for key in JSON_KEYS
}
json.dump(to_context, json_file, indent=4)
except TypeError:
@@ -172,12 +185,73 @@
log.exception(
'Fail to save JSON output for page {page}'.format(page=outjson)
)
- except Exception as e:
+ except Exception:
log.exception(
'Failure in JSON search dump for page {page}'.format(page=outjson)
)
+def dump_sphinx_data(app, exception):
+ """
+ Dump data that is only in memory during Sphinx build.
+ This is mostly used for search indexing.
+
+ This includes:
+
+ * `paths`: A mapping of HTML Filename -> RST file
+ * `pages`: A mapping of HTML Filename -> Sphinx Page name
+ * `titles`: A mapping of HTML Filename -> Page Title
+ * `types`: A mapping of Sphinx Domain type slugs -> human-readable name
for that type
+
+ """
+ if app.builder.name not in JSON_BUILDERS or exception:
+ return
+ try:
+ types = {}
+ titles = {}
+ paths = {}
+ pages = {}
+
+ for domain_name, domain_obj in app.env.domains.items():
+ for type_name, type_obj in domain_obj.object_types.items():
+ key = "{}:{}".format(domain_name, type_name)
+ types[key] = str(type_obj.lname)
+
+ for page, title in app.env.titles.items():
+ page_uri = app.builder.get_target_uri(page)
+ titles[page_uri] = title.astext()
+ paths[page_uri] = app.env.doc2path(page, base=None)
+ pages[page_uri] = page
+
+ to_dump = {
+ 'types': types,
+ 'titles': titles,
+ 'paths': paths,
+ 'pages': pages,
+ }
+
+ # We need to get the output directory where the docs are built
+ # _build/json.
+ build_json = os.path.abspath(
+ os.path.join(app.outdir, '..', 'json')
+ )
+ outjson = os.path.join(build_json,
'readthedocs-sphinx-domain-names.json')
+ with open(outjson, 'w+') as json_file:
+ json.dump(to_dump, json_file, indent=4)
+ except TypeError:
+ log.exception(
+ 'Fail to encode JSON for object names'
+ )
+ except IOError:
+ log.exception(
+ 'Fail to save JSON for object names'
+ )
+ except Exception:
+ log.exception(
+ 'Failure in JSON search dump for object names'
+ )
+
+
class HtmlBuilderMixin(BuilderMixin):
static_readthedocs_files = [
@@ -271,6 +345,7 @@
app.connect('builder-inited', finalize_media)
app.connect('html-page-context', update_body)
app.connect('html-page-context', generate_json_artifacts)
+ app.connect('build-finished', dump_sphinx_data)
# Embed
app.add_directive('readthedocs-embed', EmbedDirective)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/PKG-INFO
new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/PKG-INFO
--- old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/PKG-INFO
2019-02-21 23:34:29.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/PKG-INFO
2019-07-16 21:49:54.000000000 +0200
@@ -1,8 +1,8 @@
Metadata-Version: 1.0
Name: readthedocs-sphinx-ext
-Version: 0.5.17
+Version: 1.0.0
Summary: Sphinx extension for Read the Docs overrides
-Home-page: http://github.com/rtfd/readthedocs-sphinx-ext
+Home-page: http://github.com/readthedocs/readthedocs-sphinx-ext
Author: Read the Docs, Inc
Author-email: [email protected]
License: MIT
@@ -12,8 +12,8 @@
.. image:: https://img.shields.io/pypi/v/readthedocs-sphinx-ext.svg
:target: https://pypi.python.org/pypi/readthedocs-sphinx-ext
:alt: Pypi Version
- .. image::
https://travis-ci.org/rtfd/readthedocs-sphinx-ext.svg?branch=master
- :target: https://travis-ci.org/rtfd/readthedocs-sphinx-ext
+ .. image::
https://travis-ci.org/readthedocs/readthedocs-sphinx-ext.svg?branch=master
+ :target: https://travis-ci.org/readthedocs/readthedocs-sphinx-ext
:alt: Build Status
This module adds extensions that make Sphinx easier to use.
@@ -31,7 +31,7 @@
#. Increment the version in ``setup.py``
#. Tag the release in git: ``git tag $NEW_VERSION``.
- #. Push the tag to GitHub: ``git push --tags origin``
+ #. Push the tag to GitHub: ``git push --tags origin master``
#. Upload the package to PyPI:
.. code:: bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/SOURCES.txt
new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/SOURCES.txt
---
old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/SOURCES.txt
2019-02-21 23:34:29.000000000 +0100
+++
new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/SOURCES.txt
2019-07-16 21:49:54.000000000 +0200
@@ -1,9 +1,11 @@
+LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py
./readthedocs_ext/__init__.py
./readthedocs_ext/embed.py
+./readthedocs_ext/external_version_warning.py
./readthedocs_ext/mixins.py
./readthedocs_ext/readthedocs.py
./readthedocs_ext/template-meta.py
@@ -24,6 +26,7 @@
tests/test_mixins.py
tests/util.py
tests/pyexample/conf.py
+tests/pyexample/escape' this js.rst
tests/pyexample/index.rst
tests/pyexample-json/conf.py
tests/pyexample-json/index.rst
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/requires.txt
new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/requires.txt
---
old/readthedocs-sphinx-ext-0.5.17/readthedocs_sphinx_ext.egg-info/requires.txt
2019-02-21 23:34:29.000000000 +0100
+++
new/readthedocs-sphinx-ext-1.0.0/readthedocs_sphinx_ext.egg-info/requires.txt
2019-07-16 21:49:54.000000000 +0200
@@ -1 +1,2 @@
requests
+Jinja2>=2.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/readthedocs-sphinx-ext-0.5.17/setup.py
new/readthedocs-sphinx-ext-1.0.0/setup.py
--- old/readthedocs-sphinx-ext-0.5.17/setup.py 2019-02-21 23:33:07.000000000
+0100
+++ new/readthedocs-sphinx-ext-1.0.0/setup.py 2019-07-16 21:49:45.000000000
+0200
@@ -2,7 +2,7 @@
try:
from setuptools import setup, find_packages
extra_setup = dict(
- install_requires=['requests'],
+ install_requires=['requests', 'Jinja2>=2.9'],
)
except ImportError:
from distutils.core import setup
@@ -10,10 +10,10 @@
setup(
name='readthedocs-sphinx-ext',
- version='0.5.17',
+ version='1.0.0',
author='Read the Docs, Inc',
author_email='[email protected]',
- url='http://github.com/rtfd/readthedocs-sphinx-ext',
+ url='http://github.com/readthedocs/readthedocs-sphinx-ext',
license='MIT',
description='Sphinx extension for Read the Docs overrides',
package_dir={'': '.'},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/tests/pyexample/conf.py
new/readthedocs-sphinx-ext-1.0.0/tests/pyexample/conf.py
--- old/readthedocs-sphinx-ext-0.5.17/tests/pyexample/conf.py 2018-01-09
19:33:14.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/tests/pyexample/conf.py 2019-07-16
21:28:46.000000000 +0200
@@ -11,8 +11,8 @@
source_suffix = '.rst'
master_doc = 'index'
project = u'pyexample'
-copyright = u'2015, rtfd'
-author = u'rtfd'
+copyright = u'2015, readthedocs'
+author = u'readthedocs'
version = '0.1'
release = '0.1'
language = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
"old/readthedocs-sphinx-ext-0.5.17/tests/pyexample/escape' this js.rst"
"new/readthedocs-sphinx-ext-1.0.0/tests/pyexample/escape' this js.rst"
--- "old/readthedocs-sphinx-ext-0.5.17/tests/pyexample/escape' this js.rst"
1970-01-01 01:00:00.000000000 +0100
+++ "new/readthedocs-sphinx-ext-1.0.0/tests/pyexample/escape' this js.rst"
2019-06-26 00:42:12.000000000 +0200
@@ -0,0 +1,4 @@
+Escape JS
+#########
+
+This file name should be escaped before it's included in a `<scrip>` tag.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/tests/pyexample-json/conf.py
new/readthedocs-sphinx-ext-1.0.0/tests/pyexample-json/conf.py
--- old/readthedocs-sphinx-ext-0.5.17/tests/pyexample-json/conf.py
2018-12-13 22:54:51.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/tests/pyexample-json/conf.py
2019-07-16 21:28:46.000000000 +0200
@@ -11,8 +11,8 @@
source_suffix = '.rst'
master_doc = 'index'
project = u'pyexample'
-copyright = u'2015, rtfd'
-author = u'rtfd'
+copyright = u'2015, readthedocs'
+author = u'readthedocs'
version = '0.1'
release = '0.1'
language = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/readthedocs-sphinx-ext-0.5.17/tests/test_integration.py
new/readthedocs-sphinx-ext-1.0.0/tests/test_integration.py
--- old/readthedocs-sphinx-ext-0.5.17/tests/test_integration.py 2018-12-13
23:54:58.000000000 +0100
+++ new/readthedocs-sphinx-ext-1.0.0/tests/test_integration.py 2019-07-16
21:28:46.000000000 +0200
@@ -71,3 +71,25 @@
'toc', 'sourcename', 'page_source_suffix',
],
)
+
+ def test_generate_json_domain_artifacts(self):
+ self._run_test(
+ 'pyexample-json',
+ '_build/json/readthedocs-sphinx-domain-names.json',
+ [
+ # types
+ '"js:class": "class"',
+ # pages
+ '"index.html": "index"',
+ # paths
+ '"index.html": "index.rst"',
+ # titles
+ '"index.html": "Welcome to pyexample',
+ ],
+ )
+
+ def test_escape_js_vars(self):
+ with build_output('pyexample', '_build/readthedocs/escape\' this
js.html',
+ builder='readthedocs') as data:
+ self.assertNotIn('escape \' this js', data)
+ self.assertIn('escape\\u0027 this js', data)