lessons_indexer 1.1.0 → 1.2.0

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: f793d2c80b4ec88c038e6a62cd5fd370bda0eeff
4
- data.tar.gz: 04f95e63497298e61a3a9c0c024acc294cbab813
3
+ metadata.gz: 04ae609f9983a53a79e668bf10c4f7589779b308
4
+ data.tar.gz: 8271bcda2f67cb2ab9cd359e21a500faa2e1f852
5
5
  SHA512:
6
- metadata.gz: 906f130d13874fb3723307e82920fa53fdf0de25614e0ae6a9a54b01c4ac85390d6f9173cf96f7156ffc28f3e39499079055e9fb6ab34a602665ed96ac260a2d
7
- data.tar.gz: e222988ff131ff03152a46a53482467cc10ef76a1d80f56e3b977001b7bbd5affd49ecfb5d052de7503b42295d5065bbda7ae9d0439d5a4153e6259493166d19
6
+ metadata.gz: 8a79810dcc74a046e5c2a048f870cfde00e4e6627cc691de2ed1dd308d5c12690f01f773b4841c2ceaaef97576a43da0532c5bc624106031721c497263070d76
7
+ data.tar.gz: ce24344cdffb20bbd9794904d8e43e844f6a6be0f733958715a285db5fd8fa65f7f1192b4f631d6d734dad583554f07408dc615f4f87180dc1ef2b22a1b98a6d
@@ -7,7 +7,7 @@ module LessonsIndexer
7
7
  class Messenger
8
8
  include MessagesDictionary
9
9
  has_messages_dictionary file: 'messages.yml',
10
- dir: 'lib/lessons_indexer/messages',
10
+ dir: File.join(File.dirname(__FILE__), 'lessons_indexer/messages'),
11
11
  transform: ->(msg) {msg}
12
12
  end
13
13
  end
@@ -1,40 +1,40 @@
1
- module LessonsIndexer
2
- class Options < Messenger
3
- def initialize(argv)
4
- parse_args(argv).each do |k, v|
5
- # attr_accessor for each possible option
6
- self.class.class_eval do
7
- attr_accessor k
8
- end
9
-
10
- # setting each option as instance variable
11
- self.instance_variable_set "@#{k}", v
12
- end
13
- end
14
-
15
- private
16
-
17
- def parse_args(argv)
18
- begin
19
- Slop.parse argv do |o|
20
- o.string '-p', '--path', pou('options.path'), default: pou('options.default.path')
21
- o.bool '-s', '--skip_index', pou('options.skip_index'), default: false
22
- o.string '-o', '--output', pou('options.output'), default: pou('options.default.output')
23
- o.bool '-g', '--git', pou('options.git'), default: false
24
- o.string '-m', '--message', pou('options.message'), default: pou('options.default.message')
25
- o.bool '-a', '--all', pou('options.all'), default: false
26
- o.bool '-i', '--headings', pou('options.headings'), default: false
27
- o.string '-d', '--headings_dir', pou('options.headings_dir'), default: pou('options.default.headings_dir')
28
- o.bool '-f', '--pdf', pou('options.pdf'), default: false
29
- o.array '-l', '--lessons', pou('options.lessons'), default: []
30
- o.on '--help' do
31
- puts o
32
- exit
33
- end
34
- end.to_hash
35
- rescue Slop::Error => e
36
- exit_msg e.message
37
- end
38
- end
39
- end
1
+ module LessonsIndexer
2
+ class Options < Messenger
3
+ def initialize(argv)
4
+ parse_args(argv).each do |k, v|
5
+ # attr_accessor for each possible option
6
+ self.class.class_eval do
7
+ attr_accessor k
8
+ end
9
+
10
+ # setting each option as instance variable
11
+ self.instance_variable_set "@#{k}", v
12
+ end
13
+ end
14
+
15
+ private
16
+
17
+ def parse_args(argv)
18
+ begin
19
+ Slop.parse argv do |o|
20
+ o.string '-p', '--path', pou('options.path'), default: pou('options.default.path')
21
+ o.bool '-s', '--skip_index', pou('options.skip_index'), default: false
22
+ o.string '-o', '--output', pou('options.output'), default: pou('options.default.output')
23
+ o.bool '-g', '--git', pou('options.git'), default: false
24
+ o.string '-m', '--message', pou('options.message'), default: pou('options.default.message')
25
+ o.bool '-a', '--all', pou('options.all'), default: false
26
+ o.bool '-i', '--headings', pou('options.headings'), default: false
27
+ o.string '-d', '--headings_dir', pou('options.headings_dir'), default: pou('options.default.headings_dir')
28
+ o.bool '-f', '--pdf', pou('options.pdf'), default: false
29
+ o.array '-l', '--lessons', pou('options.lessons'), default: []
30
+ o.on '--help' do
31
+ puts o
32
+ exit
33
+ end
34
+ end.to_hash
35
+ rescue Slop::Error => e
36
+ exit_msg e.message
37
+ end
38
+ end
39
+ end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module LessonsIndexer
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lessons_indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Bodrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.6.3
195
+ rubygems_version: 2.6.4
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Lessons Indexer for Learnable
@@ -212,4 +212,3 @@ test_files:
212
212
  - spec/support/spec_files_setup.rb
213
213
  - spec/support/spec_samples.rb
214
214
  - spec/support/spec_utils.rb
215
- has_rdoc: