sod 0.20.0 → 1.0.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 +0 -0
- data/README.adoc +3 -3
- data/lib/sod/command.rb +1 -1
- data/lib/sod/{import.rb → dependencies.rb} +1 -1
- data/lib/sod/graph/loader.rb +1 -1
- data/lib/sod/graph/runner.rb +1 -1
- data/lib/sod/prefabs/actions/config/create.rb +13 -15
- data/lib/sod/prefabs/actions/config/delete.rb +1 -1
- data/lib/sod/prefabs/actions/config/edit.rb +1 -1
- data/lib/sod/prefabs/actions/config/view.rb +1 -1
- data/lib/sod/prefabs/actions/dry_run.rb +25 -0
- data/lib/sod/prefabs/actions/help.rb +1 -1
- data/lib/sod/prefabs/actions/version.rb +1 -1
- data/lib/sod/presenters/action.rb +1 -1
- data/lib/sod/presenters/node.rb +1 -1
- data/sod.gemspec +7 -7
- data.tar.gz.sig +0 -0
- metadata +16 -22
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13f9f431b1108b3f3715df5fad37459e9687c7cbe8bff00c88c34e9b92635264
|
4
|
+
data.tar.gz: 8983b1811d932b75baef2959e621ef0e20fc0c319ac5da72f61cc0452ba4887c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73caceac551412da369e5fc8bc07660a368d2e7905f9abb3eb2ee7f9ae52ef2b426664e9d935ee7418e742cb2a9342e43cf159de0c846e33c68fe287281415b6
|
7
|
+
data.tar.gz: 4a8b72f3153b78d7ac30de1307777bca4cc9038b1b7f8f6201af3a882a6b8e32476cb691b2d28648bfa8a87ce20ccfeed7183081e1912699b953bd1e00d5c1ba
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -947,7 +947,7 @@ gemfile true do
|
|
947
947
|
end
|
948
948
|
|
949
949
|
class Start < Sod::Action
|
950
|
-
include Sod::
|
950
|
+
include Sod::Dependencies[:logger]
|
951
951
|
|
952
952
|
description "Start database."
|
953
953
|
|
@@ -957,7 +957,7 @@ class Start < Sod::Action
|
|
957
957
|
end
|
958
958
|
|
959
959
|
class Stop < Sod::Action
|
960
|
-
include Sod::
|
960
|
+
include Sod::Dependencies[:logger]
|
961
961
|
|
962
962
|
description "Stop database."
|
963
963
|
|
@@ -967,7 +967,7 @@ class Stop < Sod::Action
|
|
967
967
|
end
|
968
968
|
|
969
969
|
class Echo < Sod::Action
|
970
|
-
include Sod::
|
970
|
+
include Sod::Dependencies[:io]
|
971
971
|
|
972
972
|
description "Echo input as output."
|
973
973
|
|
data/lib/sod/command.rb
CHANGED
data/lib/sod/graph/loader.rb
CHANGED
data/lib/sod/graph/runner.rb
CHANGED
@@ -8,7 +8,7 @@ module Sod
|
|
8
8
|
module Config
|
9
9
|
# Creates project configuration.
|
10
10
|
class Create < Action
|
11
|
-
include
|
11
|
+
include Dependencies[:kernel, :logger]
|
12
12
|
|
13
13
|
using Refinements::Pathname
|
14
14
|
|
@@ -18,10 +18,10 @@ module Sod
|
|
18
18
|
|
19
19
|
on %w[-c --create]
|
20
20
|
|
21
|
-
def initialize(
|
21
|
+
def initialize(path = nil, xdg_config: nil, **)
|
22
22
|
super(**)
|
23
23
|
@xdg_config = context[xdg_config, :xdg_config]
|
24
|
-
@
|
24
|
+
@path = Pathname context[path, :defaults_path]
|
25
25
|
end
|
26
26
|
|
27
27
|
def call(*)
|
@@ -31,12 +31,12 @@ module Sod
|
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
-
attr_reader :
|
34
|
+
attr_reader :path, :xdg_config
|
35
35
|
|
36
36
|
def check_defaults
|
37
|
-
return true if
|
37
|
+
return true if path.exist?
|
38
38
|
|
39
|
-
logger.abort "Default configuration doesn't exist: #{
|
39
|
+
logger.abort "Default configuration doesn't exist: #{path.to_s.inspect}."
|
40
40
|
false
|
41
41
|
end
|
42
42
|
|
@@ -53,15 +53,13 @@ module Sod
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# :reek:TooManyStatements
|
56
|
-
def create
|
57
|
-
path_info =
|
58
|
-
|
59
|
-
if
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
logger.info { "Created: #{path_info}." }
|
64
|
-
end
|
56
|
+
def create xdg_path
|
57
|
+
path_info = xdg_path.to_s.inspect
|
58
|
+
|
59
|
+
return logger.warn { "Skipped. Configuration exists: #{path_info}." } if xdg_path.exist?
|
60
|
+
|
61
|
+
path.copy xdg_path.make_ancestors
|
62
|
+
logger.info { "Created: #{path_info}." }
|
65
63
|
end
|
66
64
|
|
67
65
|
def quit
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sod
|
4
|
+
module Prefabs
|
5
|
+
module Actions
|
6
|
+
# Displays help (usage) information.
|
7
|
+
class DryRun < Action
|
8
|
+
description "Simulate execution without making changes."
|
9
|
+
|
10
|
+
on %w[-n --dry_run]
|
11
|
+
|
12
|
+
def initialize(settings: Struct.new(:dry_run).new(dry_run: false), **)
|
13
|
+
super(**)
|
14
|
+
@settings = settings
|
15
|
+
end
|
16
|
+
|
17
|
+
def call = settings.dry_run = true
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
attr_reader :settings
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/sod/presenters/node.rb
CHANGED
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 = "0.
|
5
|
+
spec.version = "1.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/sod"
|
@@ -22,13 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version = "
|
26
|
-
spec.add_dependency "cogger", "~> 0
|
27
|
-
spec.add_dependency "containable", "~> 0
|
28
|
-
spec.add_dependency "infusible", "~>
|
25
|
+
spec.required_ruby_version = "~> 3.4"
|
26
|
+
spec.add_dependency "cogger", "~> 1.0"
|
27
|
+
spec.add_dependency "containable", "~> 1.0"
|
28
|
+
spec.add_dependency "infusible", "~> 4.0"
|
29
29
|
spec.add_dependency "optparse", "~> 0.6"
|
30
|
-
spec.add_dependency "refinements", "~>
|
31
|
-
spec.add_dependency "tone", "~>
|
30
|
+
spec.add_dependency "refinements", "~> 13.0"
|
31
|
+
spec.add_dependency "tone", "~> 2.0"
|
32
32
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
33
33
|
|
34
34
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain:
|
11
10
|
- |
|
@@ -35,7 +34,7 @@ cert_chain:
|
|
35
34
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
35
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
36
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
37
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
39
38
|
dependencies:
|
40
39
|
- !ruby/object:Gem::Dependency
|
41
40
|
name: cogger
|
@@ -43,42 +42,42 @@ dependencies:
|
|
43
42
|
requirements:
|
44
43
|
- - "~>"
|
45
44
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0
|
45
|
+
version: '1.0'
|
47
46
|
type: :runtime
|
48
47
|
prerelease: false
|
49
48
|
version_requirements: !ruby/object:Gem::Requirement
|
50
49
|
requirements:
|
51
50
|
- - "~>"
|
52
51
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0
|
52
|
+
version: '1.0'
|
54
53
|
- !ruby/object:Gem::Dependency
|
55
54
|
name: containable
|
56
55
|
requirement: !ruby/object:Gem::Requirement
|
57
56
|
requirements:
|
58
57
|
- - "~>"
|
59
58
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0
|
59
|
+
version: '1.0'
|
61
60
|
type: :runtime
|
62
61
|
prerelease: false
|
63
62
|
version_requirements: !ruby/object:Gem::Requirement
|
64
63
|
requirements:
|
65
64
|
- - "~>"
|
66
65
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0
|
66
|
+
version: '1.0'
|
68
67
|
- !ruby/object:Gem::Dependency
|
69
68
|
name: infusible
|
70
69
|
requirement: !ruby/object:Gem::Requirement
|
71
70
|
requirements:
|
72
71
|
- - "~>"
|
73
72
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
73
|
+
version: '4.0'
|
75
74
|
type: :runtime
|
76
75
|
prerelease: false
|
77
76
|
version_requirements: !ruby/object:Gem::Requirement
|
78
77
|
requirements:
|
79
78
|
- - "~>"
|
80
79
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
80
|
+
version: '4.0'
|
82
81
|
- !ruby/object:Gem::Dependency
|
83
82
|
name: optparse
|
84
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,28 +98,28 @@ dependencies:
|
|
99
98
|
requirements:
|
100
99
|
- - "~>"
|
101
100
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
101
|
+
version: '13.0'
|
103
102
|
type: :runtime
|
104
103
|
prerelease: false
|
105
104
|
version_requirements: !ruby/object:Gem::Requirement
|
106
105
|
requirements:
|
107
106
|
- - "~>"
|
108
107
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
108
|
+
version: '13.0'
|
110
109
|
- !ruby/object:Gem::Dependency
|
111
110
|
name: tone
|
112
111
|
requirement: !ruby/object:Gem::Requirement
|
113
112
|
requirements:
|
114
113
|
- - "~>"
|
115
114
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
115
|
+
version: '2.0'
|
117
116
|
type: :runtime
|
118
117
|
prerelease: false
|
119
118
|
version_requirements: !ruby/object:Gem::Requirement
|
120
119
|
requirements:
|
121
120
|
- - "~>"
|
122
121
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
122
|
+
version: '2.0'
|
124
123
|
- !ruby/object:Gem::Dependency
|
125
124
|
name: zeitwerk
|
126
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +134,6 @@ dependencies:
|
|
135
134
|
- - "~>"
|
136
135
|
- !ruby/object:Gem::Version
|
137
136
|
version: '2.7'
|
138
|
-
description:
|
139
137
|
email:
|
140
138
|
- brooke@alchemists.io
|
141
139
|
executables: []
|
@@ -151,17 +149,18 @@ files:
|
|
151
149
|
- lib/sod/command.rb
|
152
150
|
- lib/sod/container.rb
|
153
151
|
- lib/sod/context.rb
|
152
|
+
- lib/sod/dependencies.rb
|
154
153
|
- lib/sod/error.rb
|
155
154
|
- lib/sod/graph/loader.rb
|
156
155
|
- lib/sod/graph/node.rb
|
157
156
|
- lib/sod/graph/runner.rb
|
158
|
-
- lib/sod/import.rb
|
159
157
|
- lib/sod/models/action.rb
|
160
158
|
- lib/sod/models/command.rb
|
161
159
|
- lib/sod/prefabs/actions/config/create.rb
|
162
160
|
- lib/sod/prefabs/actions/config/delete.rb
|
163
161
|
- lib/sod/prefabs/actions/config/edit.rb
|
164
162
|
- lib/sod/prefabs/actions/config/view.rb
|
163
|
+
- lib/sod/prefabs/actions/dry_run.rb
|
165
164
|
- lib/sod/prefabs/actions/help.rb
|
166
165
|
- lib/sod/prefabs/actions/version.rb
|
167
166
|
- lib/sod/prefabs/commands/config.rb
|
@@ -182,16 +181,12 @@ metadata:
|
|
182
181
|
label: Sod
|
183
182
|
rubygems_mfa_required: 'true'
|
184
183
|
source_code_uri: https://github.com/bkuhlmann/sod
|
185
|
-
post_install_message:
|
186
184
|
rdoc_options: []
|
187
185
|
require_paths:
|
188
186
|
- lib
|
189
187
|
required_ruby_version: !ruby/object:Gem::Requirement
|
190
188
|
requirements:
|
191
|
-
- - "
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '3.3'
|
194
|
-
- - "<="
|
189
|
+
- - "~>"
|
195
190
|
- !ruby/object:Gem::Version
|
196
191
|
version: '3.4'
|
197
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -200,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
195
|
- !ruby/object:Gem::Version
|
201
196
|
version: '0'
|
202
197
|
requirements: []
|
203
|
-
rubygems_version: 3.
|
204
|
-
signing_key:
|
198
|
+
rubygems_version: 3.6.2
|
205
199
|
specification_version: 4
|
206
200
|
summary: A domain specific language for creating composable command line interfaces.
|
207
201
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|