Skip to content

Commit a47e7db

Browse files
committed
Merge branch 'nu-js-chap'
2 parents a61a767 + 74dbb7f commit a47e7db

12 files changed

+33
-30
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
path = source/chapter_15_advanced_forms/superlists
3939
url = [email protected]:hjwp/book-example.git
4040
[submodule "source/chapter_14/superlists"]
41-
path = source/chapter_javascript/superlists
41+
path = source/chapter_16_javascript/superlists
4242
url = [email protected]:hjwp/book-example.git
4343
[submodule "source/chapter_15/superlists"]
4444
path = source/chapter_deploying_validation/superlists

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ test_chapter_14_simple_form: chapter_14_simple_form.html $(TMPDIR) .venv/bin
128128
.PHONY: test_chapter_15_advanced_forms
129129
test_chapter_15_advanced_forms: chapter_15_advanced_forms.html $(TMPDIR) .venv/bin
130130
.venv/bin/pytest -s --tb=short ./tests/test_chapter_15_advanced_forms.py
131-
.PHONY: test_chapter_javascript
132-
test_chapter_javascript: chapter_javascript.html $(TMPDIR) .venv/bin
133-
.venv/bin/pytest -s --tb=short ./tests/test_chapter_javascript.py
131+
.PHONY: test_chapter_16_javascript
132+
test_chapter_16_javascript: chapter_16_javascript.html $(TMPDIR) .venv/bin
133+
.venv/bin/pytest -s --tb=short ./tests/test_chapter_16_javascript.py
134134
.PHONY: test_chapter_deploying_validation
135135
test_chapter_deploying_validation: chapter_deploying_validation.html $(TMPDIR) .venv/bin
136136
.venv/bin/pytest -s --tb=short ./tests/test_chapter_deploying_validation.py

appendix_github_links.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Full List of Links for Each Chapter
3434
<<chapter_13_database_layer_validation>>:: https://github.com/hjwp/book-example/tree/chapter_13_database_layer_validation
3535
<<chapter_14_simple_form>>:: https://github.com/hjwp/book-example/tree/chapter_14_simple_form
3636
<<chapter_15_advanced_forms>>:: https://github.com/hjwp/book-example/tree/chapter_15_advanced_forms
37-
<<chapter_javascript>>:: https://github.com/hjwp/book-example/tree/chapter_javascript
37+
<<chapter_16_javascript>>:: https://github.com/hjwp/book-example/tree/chapter_16_javascript
3838
<<chapter_deploying_validation>>:: https://github.com/hjwp/book-example/tree/chapter_deploying_validation
3939
<<chapter_spiking_custom_auth>>:: https://github.com/hjwp/book-example/tree/chapter_spiking_custom_auth
4040
<<chapter_mocking>>:: https://github.com/hjwp/book-example/tree/chapter_mocking

appendix_rest_api.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ QUnit.test("should call updateItems after successful post", function (assert) {
866866
<1> First important thing to notice: We only set up our server response
867867
'after' we do the initialize. We want this to be the response to the
868868
POST request that happens on form submit, not the response to the
869-
initial GET request. (Remember our lesson from <<chapter_javascript>>?
869+
initial GET request. (Remember our lesson from <<chapter_16_javascript>>?
870870
One of the most challenging things about JS testing is controlling the
871871
order of execution.)
872872

atlas.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"chapter_13_database_layer_validation.asciidoc",
2828
"chapter_14_simple_form.asciidoc",
2929
"chapter_15_advanced_forms.asciidoc",
30-
"chapter_javascript.asciidoc",
30+
"chapter_16_javascript.asciidoc",
3131
"chapter_deploying_validation.asciidoc",
3232
"part3.asciidoc",
3333
"chapter_spiking_custom_auth.asciidoc",

book.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ include::chapter_12_organising_test_files.asciidoc[]
3737
include::chapter_13_database_layer_validation.asciidoc[]
3838
include::chapter_14_simple_form.asciidoc[]
3939
include::chapter_15_advanced_forms.asciidoc[]
40-
include::chapter_javascript.asciidoc[]
40+
include::chapter_16_javascript.asciidoc[]
4141
include::chapter_deploying_validation.asciidoc[]
4242

4343
include::part3.forbook.asciidoc[]

chapter_javascript.asciidoc renamed to chapter_16_javascript.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[chapter_javascript]]
1+
[[chapter_16_javascript]]
22
Dipping Our Toes, Very Tentatively, [keep-together]#into JavaScript#
33
--------------------------------------------------------------------
44

@@ -303,6 +303,8 @@ QUnit.test("smoke test", function (assert) {
303303
====
304304
//ch14l006
305305

306+
// TODO: is:visible can be replace by checkVisibility: https://stackoverflow.com/a/72717388/366221
307+
306308
<1> The `<form>` and its contents are there to represent what will be
307309
on the real list page.
308310

rename-chapter.sh

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

8-
# git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9-
# git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
10-
#
11-
# git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
12-
#
13-
# cd "source/$NEW_NAME/superlists"
14-
# git checkout "$OLD_CHAPTER"
15-
# git checkout -b "$NEW_NAME"
16-
# git push -u local
17-
# git push -u origin
18-
# cd ../../..
8+
git mv "$OLD_CHAPTER.asciidoc" "$NEW_NAME.asciidoc"
9+
mv "$OLD_CHAPTER.html" "$NEW_NAME.html" || touch "$NEW_NAME.html"
10+
git mv "tests/test_$OLD_CHAPTER.py" "tests/test_$NEW_NAME.py"
11+
12+
git mv "source/$OLD_CHAPTER" "source/$NEW_NAME"
13+
14+
cd "source/$NEW_NAME/superlists"
15+
git checkout "$OLD_CHAPTER"
16+
git checkout -b "$NEW_NAME"
17+
git push -u local
18+
git push -u origin
19+
cd ../../..
1920

2021
git grep -l "$OLD_CHAPTER" | xargs sed -i '' "s/$OLD_CHAPTER/$NEW_NAME/g"
2122

tests/chapters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"chapter_13_database_layer_validation",
1717
"chapter_14_simple_form",
1818
"chapter_15_advanced_forms",
19-
"chapter_javascript",
19+
"chapter_16_javascript",
2020
"chapter_deploying_validation",
2121
# part 3
2222
"chapter_spiking_custom_auth",

0 commit comments

Comments
 (0)