lessons_indexer 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04ae609f9983a53a79e668bf10c4f7589779b308
4
- data.tar.gz: 8271bcda2f67cb2ab9cd359e21a500faa2e1f852
3
+ metadata.gz: e3ab9f56e8047213550030b58897f47cade71a8f
4
+ data.tar.gz: fa3631a521eb736e6a7d43c69d22d38fcd926d28
5
5
  SHA512:
6
- metadata.gz: 8a79810dcc74a046e5c2a048f870cfde00e4e6627cc691de2ed1dd308d5c12690f01f773b4841c2ceaaef97576a43da0532c5bc624106031721c497263070d76
7
- data.tar.gz: ce24344cdffb20bbd9794904d8e43e844f6a6be0f733958715a285db5fd8fa65f7f1192b4f631d6d734dad583554f07408dc615f4f87180dc1ef2b22a1b98a6d
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
- generate_files(course)
17
- else
18
- build_index(course) unless options.skip_index
19
- add_headings(course) if options.headings
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)
@@ -1,3 +1,3 @@
1
1
  module LessonsIndexer
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
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).not_to receive(:add_headings)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lessons_indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Bodrov