Skip to content

Commit ec0f44c

Browse files
committed
Rename chapter 18
1 parent 32dcd53 commit ec0f44c

13 files changed

+24
-25
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
path = source/chapter_17_second_deploy/superlists
4545
url = [email protected]:hjwp/book-example.git
4646
[submodule "source/chapter_16/superlists"]
47-
path = source/chapter_spiking_custom_auth/superlists
47+
path = source/chapter_18_spiking_custom_auth/superlists
4848
url = [email protected]:hjwp/book-example.git
4949
[submodule "source/chapter_17/superlists"]
5050
path = source/chapter_mocking/superlists

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ test_chapter_16_javascript: chapter_16_javascript.html $(TMPDIR) $(VENV)/bin
130130
.PHONY: test_chapter_17_second_deploy
131131
test_chapter_17_second_deploy: chapter_17_second_deploy.html $(TMPDIR) $(VENV)/bin
132132
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_17_second_deploy.py
133-
.PHONY: test_chapter_spiking_custom_auth
134-
test_chapter_spiking_custom_auth: chapter_spiking_custom_auth.html $(TMPDIR) $(VENV)/bin
135-
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_spiking_custom_auth.py
133+
.PHONY: test_chapter_18_spiking_custom_auth
134+
test_chapter_18_spiking_custom_auth: chapter_18_spiking_custom_auth.html $(TMPDIR) $(VENV)/bin
135+
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_18_spiking_custom_auth.py
136136
.PHONY: test_chapter_mocking
137137
test_chapter_mocking: chapter_mocking.html $(TMPDIR) $(VENV)/bin
138138
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_mocking.py

appendix_github_links.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Full List of Links for Each Chapter
3636
<<chapter_15_advanced_forms>>:: https://github.com/hjwp/book-example/tree/chapter_15_advanced_forms
3737
<<chapter_16_javascript>>:: https://github.com/hjwp/book-example/tree/chapter_16_javascript
3838
<<chapter_17_second_deploy>>:: https://github.com/hjwp/book-example/tree/chapter_17_second_deploy
39-
<<chapter_spiking_custom_auth>>:: https://github.com/hjwp/book-example/tree/chapter_spiking_custom_auth
39+
<<chapter_18_spiking_custom_auth>>:: https://github.com/hjwp/book-example/tree/chapter_18_spiking_custom_auth
4040
<<chapter_mocking>>:: https://github.com/hjwp/book-example/tree/chapter_mocking
4141
<<chapter_fixtures_and_wait_decorator>>:: https://github.com/hjwp/book-example/tree/chapter_fixtures_and_wait_decorator
4242
<<chapter_server_side_debugging>>:: https://github.com/hjwp/book-example/tree/chapter_server_side_debugging

atlas.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"chapter_16_javascript.asciidoc",
3131
"chapter_17_second_deploy.asciidoc",
3232
"part3.asciidoc",
33-
"chapter_spiking_custom_auth.asciidoc",
33+
"chapter_18_spiking_custom_auth.asciidoc",
3434
"chapter_mocking.asciidoc",
3535
"chapter_fixtures_and_wait_decorator.asciidoc",
3636
"chapter_server_side_debugging.asciidoc",

book.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ include::chapter_16_javascript.asciidoc[]
4141
include::chapter_17_second_deploy.asciidoc[]
4242

4343
include::part3.forbook.asciidoc[]
44-
include::chapter_spiking_custom_auth.asciidoc[]
44+
include::chapter_18_spiking_custom_auth.asciidoc[]
4545
include::chapter_mocking.asciidoc[]
4646
include::chapter_fixtures_and_wait_decorator.asciidoc[]
4747
include::chapter_server_side_debugging.asciidoc[]

chapter_spiking_custom_auth.asciidoc renamed to chapter_18_spiking_custom_auth.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[chapter_spiking_custom_auth]]
1+
[[chapter_18_spiking_custom_auth]]
22
User Authentication, Spiking, and [keep-together]#De-Spiking#
33
-------------------------------------------------------------
44

chapter_outside_in.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ We're moving back up to the views layer now, just doing a little
826826
tidying up. Notice that these are in the old test for the `new_list` view, when
827827
we haven't got a logged-in user. We should only save the list owner when the
828828
user is actually logged in. The `.is_authenticated` attribute we defined in
829-
<<chapter_spiking_custom_auth>> comes in useful now (when they're not logged in,
829+
<<chapter_18_spiking_custom_auth>> comes in useful now (when they're not logged in,
830830
Django represents users using a class called `AnonymousUser`, whose
831831
`.is_authenticated` is always `False`):
832832

preface.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ I've split this book into three parts.
196196
JavaScript.
197197

198198

199-
<<part3>> (Chapters pass:[<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_spiking_custom_auth">#chapter_spiking_custom_auth</a>–<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_hot_lava">#chapter_hot_lava</a>]): More advanced testing topics::
199+
<<part3>> (Chapters pass:[<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_18_spiking_custom_auth">#chapter_18_spiking_custom_auth</a>–<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_hot_lava">#chapter_hot_lava</a>]): More advanced testing topics::
200200
Mocking, integrating a third-party system, test fixtures, Outside-In TDD,
201201
and Continuous Integration (CI).
202202

rename-chapter.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ set -o pipefail
55
OLD_CHAPTER=$1
66
NEW_NAME=$2
77

8-
# git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9-
# mv "$OLD_CHAPTER.html" "$NEW_NAME.html" || touch "$NEW_NAME.html"
10-
#
11-
# if [ -e "tests/test_$OLD_CHAPTER.py" ]; then
12-
# git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
13-
# fi
14-
#
15-
# git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
16-
#
8+
git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9+
mv "$OLD_CHAPTER.html" "$NEW_NAME.html" || touch "$NEW_NAME.html"
10+
11+
if [ -e "tests/test_$OLD_CHAPTER.py" ]; then
12+
git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
13+
fi
14+
15+
git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
16+
1717
cd "source/$NEW_NAME/superlists"
18-
# git checkout "$OLD_CHAPTER"
19-
# git checkout -b "$NEW_NAME"
20-
git checkout "$NEW_NAME"
18+
git checkout "$OLD_CHAPTER"
19+
git checkout -b "$NEW_NAME"
2120
git push -u local
2221
git push -u origin
2322
cd ../../..

0 commit comments

Comments
 (0)