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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0868a84071e98e61b6af2bbb7016ce0c790f009
4
- data.tar.gz: 580cd103fc7cbe10b8cbb027fc3755f2e2f6b7cf
3
+ metadata.gz: 310fdefbe025481f507f96657b81c0b0d4b975fe
4
+ data.tar.gz: b62a11830d34ae171e26eec7782b9da20f0cf87c
5
5
  SHA512:
6
- metadata.gz: 4206c429e046981a709764ffe08f1187d22d947887e24bb1f9b9dce5eaab8e06fa189af7e44a78ac1118b8771748b2189926d2afa2c08770af313e4c4ebd13a0
7
- data.tar.gz: 6cb0a53c526041a7dca3d397095e5413fa4cdcd4729475355345538f0cbc82ca567e4b92eefce8af659ba46619776ab3991d40948d8ec39e6744e439cc92b17d
6
+ metadata.gz: 4c277d6d56b2728232bb4fafa0ca368af36fef798811c34406667f0e3d4236ea00af6b3a77fd55b4809e96486f07a81272f58effd8a35e86ae2825579758c054
7
+ data.tar.gz: 6b646a6350c91b113ae88e4e0474bbedeb3e57b6281dd06c70d512b332263fcc3f9e68287238d66a627aea587683f174160c7e3e923c9c5b84f38431a26a1769
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cl (1.2.0)
4
+ cl (1.2.1)
5
5
  regstry (~> 1.0.3)
6
6
 
7
7
  GEM
data/lib/cl.rb CHANGED
@@ -4,7 +4,7 @@ require 'cl/runner'
4
4
  require 'cl/errors'
5
5
 
6
6
  class Cl
7
- singleton_class.send(:attr_accessor, :flag_values) # remove unless Dpl needs this
7
+ singleton_class.send(:attr_accessor, :flag_values) # remove unless Dpl needs this
8
8
 
9
9
  attr_reader :ctx, :name, :opts
10
10
 
@@ -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?
@@ -1,3 +1,3 @@
1
1
  class Cl
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
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.1
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-01-14 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: regstry