cl 1.2.1 → 1.2.2
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/Gemfile.lock +1 -1
- data/lib/cl.rb +1 -1
- data/lib/cl/cmd.rb +4 -0
- data/lib/cl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 310fdefbe025481f507f96657b81c0b0d4b975fe
|
|
4
|
+
data.tar.gz: b62a11830d34ae171e26eec7782b9da20f0cf87c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c277d6d56b2728232bb4fafa0ca368af36fef798811c34406667f0e3d4236ea00af6b3a77fd55b4809e96486f07a81272f58effd8a35e86ae2825579758c054
|
|
7
|
+
data.tar.gz: 6b646a6350c91b113ae88e4e0474bbedeb3e57b6281dd06c70d512b332263fcc3f9e68287238d66a627aea587683f174160c7e3e923c9c5b84f38431a26a1769
|
data/Gemfile.lock
CHANGED
data/lib/cl.rb
CHANGED
data/lib/cl/cmd.rb
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
require 'registry'
|
|
2
|
+
require 'cl'
|
|
2
3
|
require 'cl/args'
|
|
3
4
|
require 'cl/dsl'
|
|
4
5
|
require 'cl/opts'
|
|
5
6
|
require 'cl/parser'
|
|
6
7
|
|
|
7
8
|
class Cl
|
|
9
|
+
singleton_class.send(:attr_accessor, :auto_register) # remove unless anyone needs this
|
|
10
|
+
|
|
8
11
|
# Base class for all command classes that can be run.
|
|
9
12
|
#
|
|
10
13
|
# Inherit your command classes from this class, use the {Cl::Cmd::Dsl} to
|
|
@@ -20,6 +23,7 @@ class Cl
|
|
|
20
23
|
include Merge, Suggest, Underscore
|
|
21
24
|
|
|
22
25
|
inherited = ->(const) do
|
|
26
|
+
return unless Cl.auto_register
|
|
23
27
|
if const.name
|
|
24
28
|
key = underscore(const.name.split('::').last)
|
|
25
29
|
key = [registry_key, key].compact.join(':') unless abstract?
|
data/lib/cl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Fuchs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: regstry
|