ruby_fly 0.28.0.pre.1 → 0.33.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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/ruby_fly.rb +4 -0
- data/lib/ruby_fly/commands.rb +1 -0
- data/lib/ruby_fly/commands/base.rb +12 -6
- data/lib/ruby_fly/commands/destroy_pipeline.rb +37 -0
- data/lib/ruby_fly/commands/status.rb +8 -0
- data/lib/ruby_fly/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8342a925be431d44e80153152464a344fd13877d320ea3d06f13dc5749994b
|
4
|
+
data.tar.gz: c9645b0b2456f0b0374ed4e4b419ed54705faa7e07a44ac7f57c901611e20c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4db435ba5cdc94d3dda232e268a0a1bcd88bd4a118002f27c6a95ac6e767177a3e1030a6305868fd3c7fd05905cc3e47a309f3047ff31f05ab2064682198a1e3
|
7
|
+
data.tar.gz: 264b442435168d278662cd1d7d46f36730fecce36ca52d001b55d810a4d97c1bbd9a698206c05339ae7c4f63ab0fd9b5870f6d112ba1b885f0b431279cc91c52
|
data/Gemfile.lock
CHANGED
data/lib/ruby_fly.rb
CHANGED
data/lib/ruby_fly/commands.rb
CHANGED
@@ -3,6 +3,7 @@ require_relative 'commands/status'
|
|
3
3
|
require_relative 'commands/get_pipeline'
|
4
4
|
require_relative 'commands/set_pipeline'
|
5
5
|
require_relative 'commands/unpause_pipeline'
|
6
|
+
require_relative 'commands/destroy_pipeline'
|
6
7
|
require_relative 'commands/version'
|
7
8
|
|
8
9
|
module RubyFly
|
@@ -16,12 +16,14 @@ module RubyFly
|
|
16
16
|
builder = instantiate_builder
|
17
17
|
|
18
18
|
do_before(opts)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
do_around(opts) do |new_opts|
|
20
|
+
configure_command(builder, new_opts)
|
21
|
+
.build
|
22
|
+
.execute(
|
23
|
+
stdin: stdin,
|
24
|
+
stdout: stdout,
|
25
|
+
stderr: stderr)
|
26
|
+
end
|
25
27
|
do_after(opts)
|
26
28
|
end
|
27
29
|
|
@@ -34,6 +36,10 @@ module RubyFly
|
|
34
36
|
def do_before(opts)
|
35
37
|
end
|
36
38
|
|
39
|
+
def do_around(opts, &block)
|
40
|
+
block.call(opts)
|
41
|
+
end
|
42
|
+
|
37
43
|
def configure_command(builder, opts)
|
38
44
|
builder
|
39
45
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
require_relative 'mixins/environment'
|
4
|
+
|
5
|
+
module RubyFly
|
6
|
+
module Commands
|
7
|
+
class DestroyPipeline < Base
|
8
|
+
include Mixins::Environment
|
9
|
+
|
10
|
+
def configure_command(builder, opts)
|
11
|
+
builder = super(builder, opts)
|
12
|
+
|
13
|
+
missing_params = [
|
14
|
+
:target,
|
15
|
+
:pipeline
|
16
|
+
].select { |param| opts[param].nil? }
|
17
|
+
|
18
|
+
unless missing_params.empty?
|
19
|
+
description = missing_params.map { |p| "'#{p}'" }.join(', ')
|
20
|
+
raise(
|
21
|
+
ArgumentError,
|
22
|
+
"Error: #{description} required but not provided.")
|
23
|
+
end
|
24
|
+
|
25
|
+
target = opts[:target]
|
26
|
+
pipeline = opts[:pipeline]
|
27
|
+
|
28
|
+
builder
|
29
|
+
.with_subcommand('destroy-pipeline') do |sub|
|
30
|
+
sub = sub.with_option('-t', target)
|
31
|
+
sub = sub.with_option('-p', pipeline)
|
32
|
+
sub
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -38,6 +38,14 @@ module RubyFly
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
def do_around(opts, &block)
|
42
|
+
begin
|
43
|
+
block.call(opts)
|
44
|
+
rescue Open4::SpawnError => e
|
45
|
+
raise e unless e.status.exitstatus == 1
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
41
49
|
def do_after(opts)
|
42
50
|
output = stdout.string
|
43
51
|
error = stderr.string
|
data/lib/ruby_fly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_fly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lino
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- lib/ruby_fly.rb
|
184
184
|
- lib/ruby_fly/commands.rb
|
185
185
|
- lib/ruby_fly/commands/base.rb
|
186
|
+
- lib/ruby_fly/commands/destroy_pipeline.rb
|
186
187
|
- lib/ruby_fly/commands/get_pipeline.rb
|
187
188
|
- lib/ruby_fly/commands/login.rb
|
188
189
|
- lib/ruby_fly/commands/mixins/environment.rb
|
@@ -207,9 +208,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
208
|
version: '2.6'
|
208
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
210
|
requirements:
|
210
|
-
- - "
|
211
|
+
- - ">="
|
211
212
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
213
|
+
version: '0'
|
213
214
|
requirements: []
|
214
215
|
rubygems_version: 3.0.1
|
215
216
|
signing_key:
|