apmate 0.3.1 → 0.4.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: 0031cde482f550f6b997f8fbf388bc0eabeb9194
4
- data.tar.gz: 41a47c5deea8f532404a2ac467f15ba2e31ab7a8
3
+ metadata.gz: 48fb29f3369c91d7f198329c9d56970d16ed86c4
4
+ data.tar.gz: d1f48cbff536affe35281e9a2569527d66731e19
5
5
  SHA512:
6
- metadata.gz: f121e15934f41a58de8c44054d9141898327ee43d976059be4d0e8544c1e8bcf808e22b14c95a730b24186112df8f187c29ccf0be6a629335f31bbea0f7e28db
7
- data.tar.gz: 714eb3c8cb9ac4cf5507458a1813ddb0dec77df1a8acac8a9e6cbf96bfbbb56c0a931eacbffd31a4d6ee8a46a72d1eb27f181babe965b9a05e69590fa920a985
6
+ metadata.gz: b5fbd1465e4179e41a98fad45160543978cc7c7d69120a5ab66c67fa633007ecfe6c61af2f0acfd84ee6837431470897dc5edf287b4375fc770b6fc7d4b2144b
7
+ data.tar.gz: ad610c19fda43eb310822d021cd39a03a8a930f94fd20901666eafbd254befef79bf2d4dd31a515648fb793f1d327ccb7578c253c8c598116937515240d7959d
data/lib/apmate/cli.rb CHANGED
@@ -106,13 +106,13 @@ class Apmate::CLI
106
106
  log_output(output, opts)
107
107
  end
108
108
 
109
- def self.apmate_promote(env_from, env_to, opts)
109
+ def self.apmate_promote(env_from, env_to, artifact, opts)
110
110
  Apmate::Logger.logger.debug "Beginning post request."
111
111
 
112
112
  uri = URI("#{Apmate::CLI::APMATE_URL}#{ENDPOINTS[:promote_environment]}")
113
113
  Apmate::Logger.logger.debug "uri: #{uri}"
114
114
 
115
- payload = { environment_from: env_from, environment_to: env_to }
115
+ payload = { environment_from: env_from, environment_to: env_to, artifact: artifact }
116
116
  Apmate::Logger.logger.debug "payload: #{payload}"
117
117
 
118
118
  request = Net::HTTP::Post.new(uri)
@@ -1,9 +1,13 @@
1
1
  module Apmate::CLI::Command
2
2
  PROMOTE = Cri::Command.define do
3
3
  name 'promote'
4
- usage 'promote <environment_from> <environment_to>'
5
- summary 'Promotes values from one environment to another environment.'
6
- description 'Promotes values from one environment to another environment.'
4
+ usage 'promote <environment_from> <environment_to> [artifact]'
5
+ summary 'Promotes artifact environment values from one environment to another environment.'
6
+ description %q(
7
+ Promotes artifact environment values from one environment to another environment.
8
+ Default behavior promotes all artifact environment values from one environment to another environment.
9
+ Optionally, you may specify a single artifact to be promoted.
10
+ )
7
11
 
8
12
  flag :h, :help, 'show help for this command' do |value, cmd|
9
13
  puts cmd.help
@@ -16,8 +20,9 @@ module Apmate::CLI::Command
16
20
  Apmate::Logger.logger.debug "opts: #{opts}"
17
21
  Apmate::Logger.logger.debug "args: #{args}"
18
22
  Apmate::Logger.logger.debug "cmd: #{cmd.to_s}"
19
- cmd.run(['-h']) unless args.count == 2
20
- Apmate::CLI.apmate_promote(args[0], args[1], opts)
23
+ cmd.run(['-h']) unless (args.count == 2 || args.count == 3)
24
+ artifact = args[2] || nil
25
+ Apmate::CLI.apmate_promote(args[0], args[1], artifact, opts)
21
26
  end
22
27
  end
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module Apmate
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apmate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Baldridge
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-13 00:00:00.000000000 Z
11
+ date: 2018-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri