lessons_indexer 0.0.2.1 → 0.0.2.2

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: d6f88831e8ce052dcc32bb7fa5dee852704b3133
4
- data.tar.gz: c12ce22e7c5ef3750693ad4899bff238f6f8271f
3
+ metadata.gz: 700b6b45e2dcbff289222f9c44f1eaea2fcb9997
4
+ data.tar.gz: 156538d022744cc4520352f90ca375e76266a288
5
5
  SHA512:
6
- metadata.gz: 5e7f484749590e07157356103a05129e93f6be49eda8bcacfb55842145274947a44e03847518460c7426cc14f662f4b85b5da39be35aef5ec4f79ec0631361ad
7
- data.tar.gz: 890cae777e1935c86f9a9ce626f88840adc19e905ff613789c4cb9c0dab9b11aae8e9779fcec0e2922363db8f85aa40251333f6e92991ee73a77eeb9604b1bd6
6
+ metadata.gz: e6dec8a959a6ab12f203001e164ffd0cf3836bc090c64853078fa18c9417dab332d6c2fbb4629111128ad01fb794b4cfe0dfb1a62f1fb7df1e8b4b157ee9cd20
7
+ data.tar.gz: 02fae34b5d7415b1b8d4a476e873b49e5132cf4224af35966fb0e34304e919a938ff0b8ff08cf2c3eea904bee706388bda5ecba26b7cde854c7feedcf0c80e3e
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  Gemfile.lock
2
2
  .idea/
3
- test.txt
3
+ *.gem
data/README.md CHANGED
@@ -4,47 +4,53 @@
4
4
  [![Dependency Status](https://gemnasium.com/bodrovis/LessonsIndexer.svg)](https://gemnasium.com/bodrovis/LessonsIndexer)
5
5
  # Lessons Indexer for Learnable
6
6
 
7
- Builds an index in Markdown format for the lesson files in the provided directory and optionally adds heading images to the files. Available options:
7
+ Builds an index in Markdown format for the lesson files in the provided directory, adds heading images to the files,
8
+ pushes changes to GitHub. Can work with multiple branches.
8
9
 
9
- * `-p` (`--path`) - path to the working directory. Defaults to `.`.
10
- * `-s` (`--skip_index`) - skip index generation. Defaults to `false`.
11
- * `-o` (`--output`) - output file to save index to. Defaults to `README.md`. The file will be creating in the working
12
- directory if it does not exist. If it does exist, all its contents **will be erased**. Has no effect if `-s` is set.
13
- * `-g` (`--git`) - if present, pushes changes to the remote branch (with the name equal to the local branch).
14
- * `-m` (`--message`) - which commit message should be specified. Default to "Added index". Has no effect if the `-g` flag
15
- is not set.
16
- * `-a` (`--all`) - if present, will work with **all** branches of the specified directory (except for `master`).
17
- * `-i` (`--headings`) - if present, heading images will be added to the beginning of each lesson file. If the file already
18
- has a heading in the beginning, it will be skipped.
19
- * `-d` (`--headings_dir`) - relative path to the directory with heading images.
20
- Defaults to `headers`, has no effect if the `-i` flag is not set.
10
+ ## Installation and Usage
21
11
 
22
- ## Running
12
+ Requires [Ruby](https://www.ruby-lang.org) 2.0+ and [RubyGems](https://rubygems.org/). `Ruby\bin` should be added
13
+ to the PATH.
23
14
 
24
- Requires Ruby 2.0+. Install the necessary gems using
15
+ Install the gem:
25
16
 
26
17
  ```
27
- bundle install
18
+ gem install lessons_indexer
28
19
  ```
29
20
 
30
- To run on nix systems use
21
+ Run:
31
22
 
32
23
  ```
33
- bin/lessons_indexer <options>
24
+ lessons_indexer <options>
34
25
  ```
35
26
 
36
- For Windows use
27
+ or
37
28
 
38
29
  ```
39
- bin/lessons_indexer.bat <options>
30
+ bundle exec lessons_indexer <options>
40
31
  ```
41
32
 
42
- If any option's value contains spaces, it has to be surrounded with quotes:
33
+ If an option contains spaces, it has to be surrounded with quotes:
43
34
 
44
35
  ```
45
36
  bin/lessons_indexer -p "C:\User\my test dir\"
46
37
  ```
47
38
 
39
+ ## Options
40
+
41
+ * `-p` (`--path`) - path to the working directory. Defaults to `.`.
42
+ * `-s` (`--skip_index`) - skip index generation. Defaults to `false`.
43
+ * `-o` (`--output`) - output file to save index to. Defaults to `README.md`. The file will be creating in the working
44
+ directory if it does not exist. If it does exist, all its contents **will be erased**. Has no effect if `-s` is set.
45
+ * `-g` (`--git`) - if present, pushes changes to the remote branch (with the name equal to the local branch).
46
+ * `-m` (`--message`) - which commit message should be specified. Default to "Added index". Has no effect if the `-g` flag
47
+ is not set.
48
+ * `-a` (`--all`) - if present, will work with **all** branches of the specified directory (except for `master`).
49
+ * `-i` (`--headings`) - if present, heading images will be added to the beginning of each lesson file. If the file already
50
+ has a heading in the beginning, it will be skipped.
51
+ * `-d` (`--headings_dir`) - relative path to the directory with heading images.
52
+ Defaults to `headers`, has no effect if the `-i` flag is not set.
53
+
48
54
  ## Some Assumptions
49
55
 
50
56
  Here are some guidelines to follow when using the program:
@@ -64,6 +70,7 @@ this step will be just skipped and the corresponding warning message will be dis
64
70
  ## Testing
65
71
 
66
72
  ```
73
+ bundle install
67
74
  rspec .
68
75
  ```
69
76
 
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.license = "MIT"
12
12
 
13
13
  spec.files = `git ls-files -z`.split("\x0")
14
- spec.executables = ["lessons_indexer"]#spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.executables = ["lessons_indexer"]
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
16
  spec.require_paths = ["lib"]
17
17
 
@@ -1,3 +1,3 @@
1
1
  module LessonsIndexer
2
- VERSION = "0.0.2.1"
2
+ VERSION = "0.0.2.2"
3
3
  end
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: 0.0.2.1
4
+ version: 0.0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Bodrov