ruby_fly 0.23.0 → 0.24.0.pre.1
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/commands.rb +1 -0
- data/lib/ruby_fly/commands/base.rb +1 -0
- data/lib/ruby_fly/commands/get_pipeline.rb +5 -0
- data/lib/ruby_fly/commands/login.rb +42 -0
- data/lib/ruby_fly/commands/mixins/environment.rb +29 -0
- data/lib/ruby_fly/commands/set_pipeline.rb +5 -0
- data/lib/ruby_fly/commands/unpause_pipeline.rb +5 -0
- data/lib/ruby_fly/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b926dd167cbf0156ba4b47080990fadfd565aea77fab53a1f42ef16fee641a
|
4
|
+
data.tar.gz: a9b0e981ec9c68fa5d20c4e3c0aa574b3c471d5185b9d079088ac4b35a3b0804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c908d892ebf255cc874abb2e2db9245b076e5b20f323618e26dfed8b4f1b6966bd6d3d54cc574e3563b1decf3780e3071f437bbd11d4f6b3f66f8b4e2f79a04
|
7
|
+
data.tar.gz: 0170606241bb949fa67920b761bf384aebb1a8bb4ffb0cc683c88e8bf6ac0bb8ea6284026696a4ddff97ff4a56390ff8fc8a57aa7442b2066d64d83cdc1e2b1b
|
data/Gemfile.lock
CHANGED
data/lib/ruby_fly/commands.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
require 'lino'
|
2
2
|
require_relative 'base'
|
3
|
+
require_relative 'mixins/environment'
|
3
4
|
|
4
5
|
module RubyFly
|
5
6
|
module Commands
|
6
7
|
class GetPipeline < Base
|
8
|
+
include Mixins::Environment
|
9
|
+
|
7
10
|
def configure_command(builder, opts)
|
11
|
+
builder = super(builder, opts)
|
12
|
+
|
8
13
|
missing_params = [
|
9
14
|
:target,
|
10
15
|
:pipeline
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'lino'
|
2
|
+
require_relative 'base'
|
3
|
+
require_relative 'mixins/environment'
|
4
|
+
|
5
|
+
module RubyFly
|
6
|
+
module Commands
|
7
|
+
class Login < Base
|
8
|
+
include Mixins::Environment
|
9
|
+
|
10
|
+
def configure_command(builder, opts)
|
11
|
+
builder = super(builder, opts)
|
12
|
+
|
13
|
+
missing_params = [
|
14
|
+
:target
|
15
|
+
].select { |param| opts[param].nil? }
|
16
|
+
|
17
|
+
unless missing_params.empty?
|
18
|
+
description = missing_params.map { |p| "'#{p}'" }.join(', ')
|
19
|
+
raise(
|
20
|
+
ArgumentError,
|
21
|
+
"Error: #{description} required but not provided.")
|
22
|
+
end
|
23
|
+
|
24
|
+
target = opts[:target]
|
25
|
+
concourse_url = opts[:concourse_url]
|
26
|
+
username = opts[:username]
|
27
|
+
password = opts[:password]
|
28
|
+
team = opts[:team]
|
29
|
+
|
30
|
+
builder
|
31
|
+
.with_subcommand('login') do |sub|
|
32
|
+
sub = sub.with_option('-t', target)
|
33
|
+
sub = sub.with_option('-c', concourse_url) if concourse_url
|
34
|
+
sub = sub.with_option('-u', username) if username
|
35
|
+
sub = sub.with_option('-p', password) if password
|
36
|
+
sub = sub.with_option('-n', team) if team
|
37
|
+
sub
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module RubyFly
|
2
|
+
module Commands
|
3
|
+
module Mixins
|
4
|
+
module Environment
|
5
|
+
def initialize(opts={})
|
6
|
+
super(opts)
|
7
|
+
@environment = opts[:environment]
|
8
|
+
end
|
9
|
+
|
10
|
+
def for_environment(environment)
|
11
|
+
@environment = environment
|
12
|
+
self
|
13
|
+
end
|
14
|
+
|
15
|
+
def configure_command(builder, opts)
|
16
|
+
builder = super(builder, opts)
|
17
|
+
environment = opts[:environment] || @environment
|
18
|
+
if environment
|
19
|
+
builder = environment.to_a
|
20
|
+
.inject(builder) do |b, environment_variable|
|
21
|
+
b.with_environment_variable(*environment_variable)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
builder
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,10 +1,15 @@
|
|
1
1
|
require 'lino'
|
2
2
|
require_relative 'base'
|
3
|
+
require_relative 'mixins/environment'
|
3
4
|
|
4
5
|
module RubyFly
|
5
6
|
module Commands
|
6
7
|
class SetPipeline < Base
|
8
|
+
include Mixins::Environment
|
9
|
+
|
7
10
|
def configure_command(builder, opts)
|
11
|
+
builder = super(builder, opts)
|
12
|
+
|
8
13
|
missing_params = [
|
9
14
|
:target,
|
10
15
|
:pipeline,
|
@@ -1,10 +1,15 @@
|
|
1
1
|
require 'lino'
|
2
2
|
require_relative 'base'
|
3
|
+
require_relative 'mixins/environment'
|
3
4
|
|
4
5
|
module RubyFly
|
5
6
|
module Commands
|
6
7
|
class UnpausePipeline < Base
|
8
|
+
include Mixins::Environment
|
9
|
+
|
7
10
|
def configure_command(builder, opts)
|
11
|
+
builder = super(builder, opts)
|
12
|
+
|
8
13
|
missing_params = [
|
9
14
|
:target,
|
10
15
|
:pipeline
|
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.24.0.pre.1
|
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-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lino
|
@@ -184,6 +184,8 @@ files:
|
|
184
184
|
- lib/ruby_fly/commands.rb
|
185
185
|
- lib/ruby_fly/commands/base.rb
|
186
186
|
- lib/ruby_fly/commands/get_pipeline.rb
|
187
|
+
- lib/ruby_fly/commands/login.rb
|
188
|
+
- lib/ruby_fly/commands/mixins/environment.rb
|
187
189
|
- lib/ruby_fly/commands/set_pipeline.rb
|
188
190
|
- lib/ruby_fly/commands/unpause_pipeline.rb
|
189
191
|
- lib/ruby_fly/commands/version.rb
|
@@ -204,9 +206,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
206
|
version: '2.6'
|
205
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
208
|
requirements:
|
207
|
-
- - "
|
209
|
+
- - ">"
|
208
210
|
- !ruby/object:Gem::Version
|
209
|
-
version:
|
211
|
+
version: 1.3.1
|
210
212
|
requirements: []
|
211
213
|
rubygems_version: 3.0.1
|
212
214
|
signing_key:
|