sod 2.3.0 → 2.5.0

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
  SHA256:
3
- metadata.gz: 9ee8f674abff351c9f307c6b98417682ecc89c427444233395cf16af66740ea6
4
- data.tar.gz: 26f55cdbd27b83a88b877b3c9ce30e9d1aa2f61a9712ece10cf5d66cbe2d60d0
3
+ metadata.gz: 78cc9f3f11f6a5ecdad818608ad34bd41b91ca1f5e108a2e06e9c001c5180963
4
+ data.tar.gz: 2f14cb54ce72fe5097396691bda02a7027e25f91b8d842c646ae6a3865682e52
5
5
  SHA512:
6
- metadata.gz: 11ec2bcdfa719d05e5e0207c188f3260760941170797842c11d15140cfdbba63e50936e225c4cba71e4b03049f06f1e0438baa139b9d67adf07f3daea3cf685e
7
- data.tar.gz: aa2bb153f950ff20f53c34c26e4ebdc65081e5a5c2dde3385e0c239822b3872a0475009e8da91af1c7090919276ce2936b22375f3c377c8183360b42ff2d42e4
6
+ metadata.gz: f96587379d08c88c76b5e8aaad1666a348b73a2e19accfeb6c79c2bc9b3d4dcff58e450544e33f74bf53266cb3af524dc623b50690e28da3a568d6aedc19106f
7
+ data.tar.gz: 7d10c0ecc927b34a668b82faeec202a6db7b662ddb204f5d96198116c84828c87fa29add13dd5bd29cbaebbaca3066c228d75cf5e0021975cb0108c3d134c078
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sod/action.rb CHANGED
@@ -17,11 +17,11 @@ module Sod
17
17
  @description ? fail(Error, "Description can only be defined once.") : @description = text
18
18
  end
19
19
 
20
- def self.ancillary(*lines)
20
+ def self.ancillary *lines
21
21
  @ancillary ? fail(Error, "Ancillary can only be defined once.") : @ancillary = lines
22
22
  end
23
23
 
24
- def self.on(aliases, **keywords)
24
+ def self.on aliases, **keywords
25
25
  fail Error, "On can only be defined once." if @attributes.any?
26
26
 
27
27
  @attributes.merge! keywords, aliases: Array(aliases)
data/lib/sod/command.rb CHANGED
@@ -23,7 +23,7 @@ module Sod
23
23
  @description ? fail(Error, "Description can only be defined once.") : @description = text
24
24
  end
25
25
 
26
- def self.ancillary(*lines)
26
+ def self.ancillary *lines
27
27
  @ancillary ? fail(Error, "Ancillary can only be defined once.") : @ancillary = lines
28
28
  end
29
29
 
@@ -16,7 +16,7 @@ module Sod
16
16
  \Z # End of string.
17
17
  /x
18
18
 
19
- # rubocop:todo Metrics/ParameterLists
19
+ # rubocop:todo-next Metrics/ParameterLists
20
20
  def initialize(graph, help_pattern: HELP_PATTERN, loader: Loader, **)
21
21
  super(**)
22
22
  @graph = graph
@@ -24,7 +24,6 @@ module Sod
24
24
  @help_pattern = help_pattern
25
25
  @lineage = +""
26
26
  end
27
- # rubocop:enable Metrics/ParameterLists
28
27
 
29
28
  # :reek:DuplicateMethodCall
30
29
  # :reek:TooManyStatements
@@ -66,13 +65,13 @@ module Sod
66
65
  end
67
66
  end
68
67
 
69
- def usage(*arguments)
68
+ def usage *arguments
70
69
  commands = arguments.grep_v help_pattern
71
70
  commands = lineage.split if commands.empty?
72
71
  help(*commands)
73
72
  end
74
73
 
75
- def help(*commands)
74
+ def help *commands
76
75
  graph.get_action("help").then { |action| action.call(*commands) if action }
77
76
  end
78
77
 
@@ -20,7 +20,7 @@ module Sod
20
20
 
21
21
  attr_reader :actions
22
22
 
23
- # rubocop:todo Metrics/ParameterLists
23
+ # rubocop:todo-next Metrics/ParameterLists
24
24
  def initialize(node, indent: 2, gap: 5, action_presenter: Presenters::Action, **)
25
25
  super(**)
26
26
  @node = node
@@ -29,7 +29,6 @@ module Sod
29
29
  @actions = node.actions.map { |action| action_presenter.new action.record }
30
30
  @all = actions + children.to_a
31
31
  end
32
- # rubocop:enable Metrics/ParameterLists
33
32
 
34
33
  def to_s
35
34
  [banner, body, "", *usage, "", *colored_actions, "", *colored_commands].tap(&:compact!)
data/lib/sod/shell.rb CHANGED
@@ -7,7 +7,7 @@ module Sod
7
7
  class Shell
8
8
  attr_reader :name, :banner
9
9
 
10
- # rubocop:todo Metrics/ParameterLists
10
+ # rubocop:todo-next Metrics/ParameterLists
11
11
  def initialize name = Cogger::Program.call,
12
12
  banner: nil,
13
13
  node: Graph::Node,
@@ -19,7 +19,6 @@ module Sod
19
19
  graph.instance_eval(&block) if block
20
20
  @runner = runner.new graph
21
21
  end
22
- # rubocop:enable Metrics/ParameterLists
23
22
 
24
23
  def call arguments = ARGV, process: Process
25
24
  process.setproctitle name
data/sod.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sod"
5
- spec.version = "2.3.0"
5
+ spec.version = "2.5.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/sod"
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = ">= 4.0"
26
26
 
27
27
  spec.add_dependency "cogger", "~> 2.3"
28
- spec.add_dependency "containable", "~> 2.3"
28
+ spec.add_dependency "containable", "~> 2.5"
29
29
  spec.add_dependency "infusible", "~> 5.0"
30
30
  spec.add_dependency "optparse", "~> 0.8"
31
31
  spec.add_dependency "refinements", "~> 14.0"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sod
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -55,14 +55,14 @@ dependencies:
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: '2.3'
58
+ version: '2.5'
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - "~>"
64
64
  - !ruby/object:Gem::Version
65
- version: '2.3'
65
+ version: '2.5'
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: infusible
68
68
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  - !ruby/object:Gem::Version
195
195
  version: '0'
196
196
  requirements: []
197
- rubygems_version: 4.0.12
197
+ rubygems_version: 4.0.21
198
198
  specification_version: 4
199
199
  summary: A domain specific language for creating composable command line interfaces.
200
200
  test_files: []
metadata.gz.sig CHANGED
Binary file