simple-cli 0.3.12 → 0.3.13

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
  SHA256:
3
- metadata.gz: 156fbfd11f78c47d66f43a6c6158377ec51f5f20061e16fa5c5b853a1d622fcc
4
- data.tar.gz: aa0e7b9585e559377362197e6a094f8023a0e8293d6974d175f335bd99ed75ed
3
+ metadata.gz: 8f4816a86d6b802c97493e9961b17d2a3db19c3f00de186fe59b40b4de53a8cc
4
+ data.tar.gz: dc86cba3ab4c96a2c071f6bdf517c5db19e7186caaee9e8962954484139ce1ca
5
5
  SHA512:
6
- metadata.gz: fdb819a5b2fd0cebc5f3359ddbd18992b690779eee27fe673018c659372f232c8b70839f6dbdb33f71901bf9242da3a70e3792234df5e6d5e2aaab2d64949dd9
7
- data.tar.gz: 1c81fd6b778df6e551a055074b7cb3c38cfb120d27f9f4e25cf74e17d6d33036f1663a0b8d611407efd719ab10c45730061bbab813a09a045c86ca078f7a38de
6
+ metadata.gz: df10c1919a31273bedac7729af01334743854afceff9feb138daf880424db897fcc006812296334d0ab08036152d4a25ac7f8a88093e1a205d0dbc935f5b1929
7
+ data.tar.gz: cc4be6f1c00b1c91664847444f31b3cfd0065df07f85d1d9a4cf8083984cf59f30b0c7aded89da189de319452fda1a063d22b315af4d0b1a62d0999367186875
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.12
1
+ 0.3.13
@@ -0,0 +1,19 @@
1
+ module ::Simple::CLI::Deprecations
2
+ SELF = self
3
+
4
+ def logger
5
+ SELF.deprecated! "Simple::CLI#logger", alternative: "Simple::CLI.logger"
6
+ end
7
+
8
+ def run!(*_)
9
+ SELF.deprecated! "Simple::CLI#run!", alternative: "Simple::CLI.run!(Your::CLI)"
10
+ end
11
+
12
+ def self.deprecated!(what, alternative: nil)
13
+ Simple::CLI.logger.error "'#{what}' was removed."
14
+ if alternative
15
+ Simple::CLI.logger.info "You probably want to use '#{alternative}' instead."
16
+ end
17
+ exit 1
18
+ end
19
+ end
data/lib/simple/cli.rb CHANGED
@@ -13,6 +13,7 @@ require_relative "cli/adapter"
13
13
  require_relative "cli/logger"
14
14
  require_relative "cli/on_exception"
15
15
  require_relative "cli/helpers"
16
+ require_relative "cli/deprecations"
16
17
 
17
18
  require "simple/service"
18
19
 
@@ -29,6 +30,11 @@ module Simple::CLI
29
30
  def self.included(base)
30
31
  base.include(::Simple::Service)
31
32
  base.include(::Simple::CLI::Helpers)
33
+
34
+ # When going from 0.2 to 0.3 we removed some helpers that originally had been
35
+ # mixed into the target CLI module. The ::Simple::CLI::Deprecations module
36
+ # makes sure to print deprecation warnings.
37
+ base.extend(::Simple::CLI::Deprecations)
32
38
  end
33
39
 
34
40
  # Runs the service with the current command line arguments.
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
8
8
  - mediapeers GmbH
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-15 00:00:00.000000000 Z
12
+ date: 2022-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simple-service
@@ -45,6 +45,7 @@ files:
45
45
  - lib/simple/cli.rb
46
46
  - lib/simple/cli/adapter.rb
47
47
  - lib/simple/cli/default_options.rb
48
+ - lib/simple/cli/deprecations.rb
48
49
  - lib/simple/cli/helper.rb
49
50
  - lib/simple/cli/helper/help.rb
50
51
  - lib/simple/cli/helper/help_on_command.rb
@@ -66,7 +67,7 @@ files:
66
67
  homepage: http://github.com/radiospiel/simple-cli
67
68
  licenses: []
68
69
  metadata: {}
69
- post_install_message:
70
+ post_install_message:
70
71
  rdoc_options: []
71
72
  require_paths:
72
73
  - lib
@@ -82,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
83
  version: '0'
83
84
  requirements: []
84
85
  rubygems_version: 3.1.4
85
- signing_key:
86
+ signing_key:
86
87
  specification_version: 4
87
88
  summary: Simple CLI builder for ruby
88
89
  test_files: