ruby_fly 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruby_fly.rb +8 -0
- data/lib/ruby_fly/commands.rb +2 -0
- data/lib/ruby_fly/commands/get_pipeline.rb +32 -0
- data/lib/ruby_fly/commands/unpause_pipeline.rb +32 -0
- data/lib/ruby_fly/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df94931fbc6b2820b51729cebf669d15ae11e9b3
|
4
|
+
data.tar.gz: f13667730a5454f4481527beccccdd4f19501dce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a0aeabe8c47f1c8622b7a9c87de09abd3aee135af37f0f5226da0e3888c8710fe1e38c41e7dd2c2585d147109c8513a58d46ba06f3948bac354e037568369da
|
7
|
+
data.tar.gz: 65859c3d260497cb4e7e016c85cb71264f212267e7a24d2e6a43fc5a5022cb9c871aa339765942ca387829ffa2d68418a8add61cd3507f26c0c9efca40d2d3bb
|
data/Gemfile.lock
CHANGED
data/lib/ruby_fly.rb
CHANGED
@@ -16,9 +16,17 @@ module RubyFly
|
|
16
16
|
end
|
17
17
|
|
18
18
|
module ClassMethods
|
19
|
+
def get_pipeline(opts = {})
|
20
|
+
Commands::GetPipeline.new.execute(opts)
|
21
|
+
end
|
22
|
+
|
19
23
|
def set_pipeline(opts = {})
|
20
24
|
Commands::SetPipeline.new.execute(opts)
|
21
25
|
end
|
26
|
+
|
27
|
+
def unpause_pipeline(opts = {})
|
28
|
+
Commands::UnpausePipeline.new.execute(opts)
|
29
|
+
end
|
22
30
|
end
|
23
31
|
extend ClassMethods
|
24
32
|
|
data/lib/ruby_fly/commands.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
|
4
|
+
module RubyFly
|
5
|
+
module Commands
|
6
|
+
class GetPipeline < Base
|
7
|
+
def configure_command(builder, opts)
|
8
|
+
missing_params = [
|
9
|
+
:target,
|
10
|
+
:pipeline
|
11
|
+
].select { |param| opts[param].nil? }
|
12
|
+
|
13
|
+
unless missing_params.empty?
|
14
|
+
description = missing_params.map { |p| "'#{p}'" }.join(', ')
|
15
|
+
raise(
|
16
|
+
ArgumentError,
|
17
|
+
"Error: #{description} required but not provided.")
|
18
|
+
end
|
19
|
+
|
20
|
+
target = opts[:target]
|
21
|
+
pipeline = opts[:pipeline]
|
22
|
+
|
23
|
+
builder
|
24
|
+
.with_subcommand('get-pipeline') do |sub|
|
25
|
+
sub = sub.with_option('-t', target)
|
26
|
+
sub = sub.with_option('-p', pipeline)
|
27
|
+
sub
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
|
4
|
+
module RubyFly
|
5
|
+
module Commands
|
6
|
+
class UnpausePipeline < Base
|
7
|
+
def configure_command(builder, opts)
|
8
|
+
missing_params = [
|
9
|
+
:target,
|
10
|
+
:pipeline
|
11
|
+
].select { |param| opts[param].nil? }
|
12
|
+
|
13
|
+
unless missing_params.empty?
|
14
|
+
description = missing_params.map { |p| "'#{p}'" }.join(', ')
|
15
|
+
raise(
|
16
|
+
ArgumentError,
|
17
|
+
"Error: #{description} required but not provided.")
|
18
|
+
end
|
19
|
+
|
20
|
+
target = opts[:target]
|
21
|
+
pipeline = opts[:pipeline]
|
22
|
+
|
23
|
+
builder
|
24
|
+
.with_subcommand('unpause-pipeline') do |sub|
|
25
|
+
sub = sub.with_option('-t', target)
|
26
|
+
sub = sub.with_option('-p', pipeline)
|
27
|
+
sub
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/ruby_fly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_fly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -102,7 +102,9 @@ files:
|
|
102
102
|
- lib/ruby_fly.rb
|
103
103
|
- lib/ruby_fly/commands.rb
|
104
104
|
- lib/ruby_fly/commands/base.rb
|
105
|
+
- lib/ruby_fly/commands/get_pipeline.rb
|
105
106
|
- lib/ruby_fly/commands/set_pipeline.rb
|
107
|
+
- lib/ruby_fly/commands/unpause_pipeline.rb
|
106
108
|
- lib/ruby_fly/version.rb
|
107
109
|
- ruby_fly.gemspec
|
108
110
|
homepage: https://github.com/tobyclemson/ruby_fly
|