Skip to content

Commit c82e411

Browse files
authored
Populate "files" section in each exercise config.json (#495)
This track only contains practice exercises. script (fish): ``` cd exercises/practice for d in * set e (string replace --all -- "-" "_" $d) jq --arg s {$e}".sh" --arg t {$e}"_test.sh" ' .files = { "solution": [$s], "test": [$t], "example": [".meta/example.sh"] } ' $d/.meta/config.json | sponge $d/.meta/config.json end ```
1 parent 3aa6d9d commit c82e411

File tree

89 files changed

+794
-266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+794
-266
lines changed

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
},
1717
"files": {
1818
"solution": [
19-
"./%{snake_slug}.sh"
19+
"%{snake_slug}.sh"
2020
],
2121
"test": [
22-
"./%{snake_slug}_test.sh"
22+
"%{snake_slug}_test.sh"
2323
],
2424
"example": [
2525
".meta/example.sh"

exercises/practice/acronym/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Convert a long phrase to its acronym",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"acronym.sh"
7+
],
8+
"test": [
9+
"acronym_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Julien Vanier",
1016
"source_url": "https://github.com/monkbroc"

exercises/practice/affine-cipher/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Create an implementation of the Affine cipher, an ancient encryption algorithm from the Middle East.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"affine_cipher.sh"
7+
],
8+
"test": [
9+
"affine_cipher_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Wikipedia",
1016
"source_url": "http://en.wikipedia.org/wiki/Affine_cipher"

exercises/practice/all-your-base/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
"blurb": "Convert a number, represented as a sequence of digits in one base, to any other base.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"all_your_base.sh"
7+
],
8+
"test": [
9+
"all_your_base_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
}
915
}

exercises/practice/allergies/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"allergies.sh"
7+
],
8+
"test": [
9+
"allergies_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Jumpstart Lab Warm-up",
1016
"source_url": "http://jumpstartlab.com"

exercises/practice/anagram/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Given a word and a list of possible anagrams, select the correct sublist.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"anagram.sh"
7+
],
8+
"test": [
9+
"anagram_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Inspired by the Extreme Startup game",
1016
"source_url": "https://github.com/rchatley/extreme_startup"

exercises/practice/armstrong-numbers/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Determine if a number is an Armstrong number",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"armstrong_numbers.sh"
7+
],
8+
"test": [
9+
"armstrong_numbers_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Wikipedia",
1016
"source_url": "https://en.wikipedia.org/wiki/Narcissistic_number"

exercises/practice/atbash-cipher/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"atbash_cipher.sh"
7+
],
8+
"test": [
9+
"atbash_cipher_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Wikipedia",
1016
"source_url": "http://en.wikipedia.org/wiki/Atbash"

exercises/practice/beer-song/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"beer_song.sh"
7+
],
8+
"test": [
9+
"beer_song_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Learn to Program by Chris Pine",
1016
"source_url": "http://pine.fm/LearnToProgram/?Chapter=06"

exercises/practice/binary-search/.meta/config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"blurb": "Implement a binary search algorithm.",
33
"authors": [],
44
"files": {
5-
"solution": [],
6-
"test": [],
7-
"example": []
5+
"solution": [
6+
"binary_search.sh"
7+
],
8+
"test": [
9+
"binary_search_test.sh"
10+
],
11+
"example": [
12+
".meta/example.sh"
13+
]
814
},
915
"source": "Wikipedia",
1016
"source_url": "http://en.wikipedia.org/wiki/Binary_search_algorithm"

0 commit comments

Comments
 (0)