tocer 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -4
- data.tar.gz.sig +0 -0
- data/bin/tocer +1 -1
- data/lib/tasks/reek.rake +8 -0
- data/lib/tocer.rb +1 -0
- data/lib/tocer/cli.rb +23 -17
- data/lib/tocer/identity.rb +1 -1
- metadata +39 -10
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 468f874390c280d7b2a29d1b39906cd8e36305c3
|
4
|
+
data.tar.gz: 424e6a2cce31d202954f4d55ec0bb9674a87cff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cc0588ca937128f74c80543063fbf9b9c70f3b07d980327fd32fc06722adda6e7a24e1de0ce8661fcfcc0ae97ada0bb7e0c6520f5e12b455bb14c705af7d203
|
7
|
+
data.tar.gz: d903de0794a12beed0c5e5567d63d6b539f335b2ca11128cfa6e8a57479eb8e1c3e6e560b173b2b39b923d7ee4cf7126cd9e906137a0f5a115e271fb22efcb2c
|
checksums.yaml.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
{�
|
2
|
-
|
3
|
-
ә�8�0�%f#���ԇ����V'N9����(]K�J��g�-��C(81Z7�3m�h���P嬺$#�i����g�d#��"h��e�2�O������b�"*�n���;�K~��uf��
|
4
|
-
'�l���\.
|
1
|
+
AD�h�Npq�@��W��[+!�u�{�����D�X�N
|
2
|
+
�#�Ep��b���K��t�د%d�K�*��;�
|
5
3
|
Ʒ�{_�&�š>7˓/T
|
4
|
+
y`IL��0���2?/\�F�L���8F�Z����
|
data.tar.gz.sig
CHANGED
Binary file
|
data/bin/tocer
CHANGED
data/lib/tasks/reek.rake
ADDED
data/lib/tocer.rb
CHANGED
data/lib/tocer/cli.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "yaml"
|
4
3
|
require "thor"
|
5
4
|
require "thor/actions"
|
6
5
|
require "thor_plus/actions"
|
@@ -12,32 +11,41 @@ module Tocer
|
|
12
11
|
include Thor::Actions
|
13
12
|
include ThorPlus::Actions
|
14
13
|
|
15
|
-
package_name
|
14
|
+
package_name Identity.version_label
|
16
15
|
|
17
|
-
def self.
|
18
|
-
|
16
|
+
def self.configuration
|
17
|
+
Runcom::Configuration.new file_name: Identity.file_name, defaults: {
|
18
|
+
label: "# Table of Contents"
|
19
|
+
}
|
19
20
|
end
|
20
21
|
|
21
22
|
def initialize args = [], options = {}, config = {}
|
22
23
|
super args, options, config
|
23
|
-
@configuration = Runcom::Configuration.new file_name: Tocer::Identity.file_name, defaults: self.class.defaults
|
24
24
|
end
|
25
25
|
|
26
26
|
desc "-g, [--generate=PATH]", "Generate table of contents."
|
27
27
|
map %w[-g --generate] => :generate
|
28
|
-
method_option :label, aliases: "-l", desc: "
|
28
|
+
method_option :label, aliases: "-l", desc: "Label", type: :string, default: configuration.to_h.fetch(:label)
|
29
29
|
def generate path
|
30
|
-
Writer.new(path, label:
|
30
|
+
Writer.new(path, label: options.label).write
|
31
31
|
say "Generated table of contents: #{path}."
|
32
32
|
end
|
33
33
|
|
34
|
-
desc "-c, [--config]",
|
34
|
+
desc "-c, [--config]", %(Manage gem configuration ("#{configuration.computed_path}").)
|
35
35
|
map %w[-c --config] => :config
|
36
|
-
method_option :edit,
|
37
|
-
|
36
|
+
method_option :edit,
|
37
|
+
aliases: "-e",
|
38
|
+
desc: "Edit gem configuration.",
|
39
|
+
type: :boolean, default: false
|
40
|
+
method_option :info,
|
41
|
+
aliases: "-i",
|
42
|
+
desc: "Print gem configuration.",
|
43
|
+
type: :boolean, default: false
|
38
44
|
def config
|
39
|
-
|
40
|
-
|
45
|
+
path = self.class.configuration.computed_path
|
46
|
+
|
47
|
+
if options.edit? then `#{editor} #{path}`
|
48
|
+
elsif options.info? then say(path)
|
41
49
|
else help(:config)
|
42
50
|
end
|
43
51
|
end
|
@@ -45,7 +53,7 @@ module Tocer
|
|
45
53
|
desc "-v, [--version]", "Show gem version."
|
46
54
|
map %w[-v --version] => :version
|
47
55
|
def version
|
48
|
-
say
|
56
|
+
say Identity.version_label
|
49
57
|
end
|
50
58
|
|
51
59
|
desc "-h, [--help=COMMAND]", "Show this message or get help for a command."
|
@@ -56,11 +64,9 @@ module Tocer
|
|
56
64
|
|
57
65
|
private
|
58
66
|
|
59
|
-
attr_reader :configuration
|
60
|
-
|
61
67
|
def compute_label label
|
62
|
-
configured_label = configuration.to_h.fetch :label
|
63
|
-
label ==
|
68
|
+
configured_label = self.class.configuration.to_h.fetch :label
|
69
|
+
label == configured_label ? label : configured_label
|
64
70
|
end
|
65
71
|
end
|
66
72
|
end
|
data/lib/tocer/identity.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tocer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
|
31
31
|
3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-11-
|
33
|
+
date: 2016-11-13 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: thor
|
@@ -52,42 +52,42 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '4.
|
55
|
+
version: '4.1'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '4.
|
62
|
+
version: '4.1'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: refinements
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '3.
|
69
|
+
version: '3.1'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '3.
|
76
|
+
version: '3.1'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: runcom
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
83
|
+
version: '0.3'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0.
|
90
|
+
version: '0.3'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rake
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,6 +102,20 @@ dependencies:
|
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '11.0'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: gemsmith
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '8.0'
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '8.0'
|
105
119
|
- !ruby/object:Gem::Dependency
|
106
120
|
name: pry
|
107
121
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,6 +256,20 @@ dependencies:
|
|
242
256
|
- - "~>"
|
243
257
|
- !ruby/object:Gem::Version
|
244
258
|
version: '0.0'
|
259
|
+
- !ruby/object:Gem::Dependency
|
260
|
+
name: reek
|
261
|
+
requirement: !ruby/object:Gem::Requirement
|
262
|
+
requirements:
|
263
|
+
- - "~>"
|
264
|
+
- !ruby/object:Gem::Version
|
265
|
+
version: '4.5'
|
266
|
+
type: :development
|
267
|
+
prerelease: false
|
268
|
+
version_requirements: !ruby/object:Gem::Requirement
|
269
|
+
requirements:
|
270
|
+
- - "~>"
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: '4.5'
|
245
273
|
- !ruby/object:Gem::Dependency
|
246
274
|
name: rubocop
|
247
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -262,14 +290,14 @@ dependencies:
|
|
262
290
|
requirements:
|
263
291
|
- - "~>"
|
264
292
|
- !ruby/object:Gem::Version
|
265
|
-
version: '0
|
293
|
+
version: '1.0'
|
266
294
|
type: :development
|
267
295
|
prerelease: false
|
268
296
|
version_requirements: !ruby/object:Gem::Requirement
|
269
297
|
requirements:
|
270
298
|
- - "~>"
|
271
299
|
- !ruby/object:Gem::Version
|
272
|
-
version: '0
|
300
|
+
version: '1.0'
|
273
301
|
description:
|
274
302
|
email:
|
275
303
|
- brooke@alchemists.io
|
@@ -283,6 +311,7 @@ files:
|
|
283
311
|
- LICENSE.md
|
284
312
|
- README.md
|
285
313
|
- bin/tocer
|
314
|
+
- lib/tasks/reek.rake
|
286
315
|
- lib/tasks/rspec.rake
|
287
316
|
- lib/tasks/rubocop.rake
|
288
317
|
- lib/tocer.rb
|
metadata.gz.sig
CHANGED
Binary file
|