lessons_indexer 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -3
- data/lib/lessons_indexer/indexer.rb +5 -8
- data/lib/lessons_indexer/version.rb +1 -1
- data/spec/indexer_spec.rb +1 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3ab9f56e8047213550030b58897f47cade71a8f
|
4
|
+
data.tar.gz: fa3631a521eb736e6a7d43c69d22d38fcd926d28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc8cc6f0d64db5408a174e4b657c0a36966edc8d36f03697e69e1e87ddac38c747093d57e3041042cd9699e1174ba912a39315063226cc3a5dcccf1a22d6b932
|
7
|
+
data.tar.gz: 4a057a498f868de92d1d66869819cb3d4f1d93283938bb1a71b5a83fce1e6f13556566144b9ae2f1002796fbdbd238886fb9b8c84c7425b6b635809e4a261bef
|
data/README.md
CHANGED
@@ -59,9 +59,6 @@ of files to generate for a specific lesson. In the provided example, the first l
|
|
59
59
|
2 steps, the third - 3 steps. The script will then create a bunch of appropriate files, called *lessonx-y.md*,
|
60
60
|
where *x* is a lesson number and *y* is a step number, for example *lesson1-1.md*, *lesson2-1.md* etc, up to *lesson3-3.md*. This option
|
61
61
|
is useful when you only begin to produce handouts for a course and need a bunch of empty files to place your text into.
|
62
|
-
**Please note** that if this option is present, all other options (expect for the `--path`) will be ignored,
|
63
|
-
meaning that the script won't do anything else. This is because the lesson files will be empty and
|
64
|
-
obviously you wouldn't want to generate PDFs or push anything to GitHub at this point.
|
65
62
|
|
66
63
|
## Some Assumptions
|
67
64
|
|
@@ -12,14 +12,11 @@ module LessonsIndexer
|
|
12
12
|
def do_work!
|
13
13
|
course = Course.new(get_course_dir, options.headings_dir)
|
14
14
|
|
15
|
-
if options.lessons.length > 0
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
generate_pdfs(course) if options.pdf
|
21
|
-
git_push! if options.git
|
22
|
-
end
|
15
|
+
generate_files(course) if options.lessons.length > 0
|
16
|
+
build_index(course) unless options.skip_index
|
17
|
+
add_headings(course) if options.headings
|
18
|
+
generate_pdfs(course) if options.pdf
|
19
|
+
git_push! if options.git
|
23
20
|
end
|
24
21
|
|
25
22
|
def generate_files(course)
|
data/spec/indexer_spec.rb
CHANGED
@@ -23,10 +23,7 @@ RSpec.describe LessonsIndexer::Indexer do
|
|
23
23
|
it "should generate files if --lessons is set" do
|
24
24
|
allow(subject.options).to receive(:lessons).and_return([1,2])
|
25
25
|
expect(subject).to receive(:generate_files)
|
26
|
-
expect(subject).
|
27
|
-
expect(subject).not_to receive(:git_push!)
|
28
|
-
expect(subject).not_to receive(:generate_pdfs)
|
29
|
-
expect(subject).not_to receive(:build_index)
|
26
|
+
expect(subject).to receive(:build_index)
|
30
27
|
capture_stdout { subject.do_work! }
|
31
28
|
end
|
32
29
|
|