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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 718920373b973746501744cfd54d202c4a90ee26
4
- data.tar.gz: 26175657da92a942f5658d80020b995e8e60be45
3
+ metadata.gz: df94931fbc6b2820b51729cebf669d15ae11e9b3
4
+ data.tar.gz: f13667730a5454f4481527beccccdd4f19501dce
5
5
  SHA512:
6
- metadata.gz: a091de26bd58f7a6004204819ef98198d03fdd2ce4d05bae65cd3e489b30e5f4aec735cececb45771c1c37f46e0c140d3f25def8eb2ba1fbb9573a9c73633831
7
- data.tar.gz: 3ba3e2ed317e0aa6c8a7a3f17b1ef7d3d857e3acec34a65f2752bdb2ca863f2142e3aa2a3f709490dc3ced166130c94ef1ad300f41867942fe160497a23275e2
6
+ metadata.gz: 2a0aeabe8c47f1c8622b7a9c87de09abd3aee135af37f0f5226da0e3888c8710fe1e38c41e7dd2c2585d147109c8513a58d46ba06f3948bac354e037568369da
7
+ data.tar.gz: 65859c3d260497cb4e7e016c85cb71264f212267e7a24d2e6a43fc5a5022cb9c871aa339765942ca387829ffa2d68418a8add61cd3507f26c0c9efca40d2d3bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_fly (0.2.0)
4
+ ruby_fly (0.3.0)
5
5
  lino (~> 1.1)
6
6
 
7
7
  GEM
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
 
@@ -1,4 +1,6 @@
1
+ require_relative 'commands/get_pipeline'
1
2
  require_relative 'commands/set_pipeline'
3
+ require_relative 'commands/unpause_pipeline'
2
4
 
3
5
  module RubyFly
4
6
  module Commands
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RubyFly
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
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.2.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