cpl 2.2.0 → 2.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27661f3a2e2aff2f7018e2cb0e77835ee4de88a8ee0268ec549cafa9d02dfbaa
4
- data.tar.gz: 001a114b051c3501b5449eb6d3e4c9f7dea3fa608c6e4595e2129c3bcad8f855
3
+ metadata.gz: e940c7b8482b8a169eaffb14fcbc0f1b97755f13bfa747c681d0da832b10ed52
4
+ data.tar.gz: faabae35d4c0d7adfbdac9df66c5122f25cfad62120c6dcf9a808748423d1c2f
5
5
  SHA512:
6
- metadata.gz: 38dfd9ca9aa2d28dc7df577677e5732f37740448beb857269ff156da7a8ff2f8627872c958b63e9d1d308ce091df1376e44c09aff96bc82f128edb887e1aba94
7
- data.tar.gz: 14c73bf485166dd5be51ff276b6cef8aa3152bb0482fd92b6752e47575cd43ab0bd620ba1c49de619863cff955b628477eb32188a8f76393423c50b1a81e5b07
6
+ metadata.gz: 202edacf78d176b299412660f47fcf4a5086780fd1a338f0aa15a443848e6da2a0a9dca0616e39a3ea192ee356714c4e69c4f215bd43fbca63430fd1aa8d5834
7
+ data.tar.gz: 1bd2369dc1df836d57a7e9ac18f7e006ff5843cc1298c9c3c7340d4681e762826a2fbb003a789fdb06aefd26fddd2d7d1e41f60ec16d695e51f35ec2c78b74f8
data/CHANGELOG.md CHANGED
@@ -14,6 +14,15 @@ Changes since the last non-beta release.
14
14
 
15
15
  _Please add entries here for your pull requests that have not yet been released._
16
16
 
17
+ ## [2.2.1] - 2024-06-17
18
+
19
+ ### Fixed
20
+
21
+ - Fixed issue where latest image may be incorrect. [PR 201](https://github.com/shakacode/control-plane-flow/pull/201) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
22
+ - Fixed issue where `build-image` command hangs forever waiting for image to be available. [PR 201](https://github.com/shakacode/control-plane-flow/pull/201) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
23
+
24
+ ## [2.2.0] - 2024-06-07
25
+
17
26
  ### Fixed
18
27
 
19
28
  - Fixed issue where `ps:wait` command hangs forever if workloads are suspended. [PR 198](https://github.com/shakacode/control-plane-flow/pull/198) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
@@ -230,7 +239,9 @@ _Please add entries here for your pull requests that have not yet been released.
230
239
 
231
240
  - Initial release
232
241
 
233
- [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v2.1.0...HEAD
242
+ [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v2.2.1...HEAD
243
+ [2.2.1]: https://github.com/shakacode/control-plane-flow/compare/v2.2.0...v2.2.1
244
+ [2.2.0]: https://github.com/shakacode/control-plane-flow/compare/v2.1.0...v2.2.0
234
245
  [2.1.0]: https://github.com/shakacode/control-plane-flow/compare/v2.0.2...v2.1.0
235
246
  [2.0.2]: https://github.com/shakacode/control-plane-flow/compare/v2.0.1...v2.0.2
236
247
  [2.0.1]: https://github.com/shakacode/control-plane-flow/compare/v2.0.0...v2.0.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cpl (2.2.0)
4
+ cpl (2.2.2)
5
5
  debug (~> 1.7.1)
6
6
  dotenv (~> 2.8.1)
7
7
  jwt (~> 2.8.1)
@@ -29,11 +29,11 @@ GEM
29
29
  hashdiff (1.1.0)
30
30
  iniparse (1.5.0)
31
31
  io-console (0.7.2)
32
- irb (1.13.1)
32
+ irb (1.13.2)
33
33
  rdoc (>= 4.0.0)
34
34
  reline (>= 0.4.2)
35
35
  json (2.7.2)
36
- jwt (2.8.1)
36
+ jwt (2.8.2)
37
37
  base64
38
38
  overcommit (0.60.0)
39
39
  childprocess (>= 0.6.3, < 5)
@@ -52,7 +52,7 @@ GEM
52
52
  rdoc (6.7.0)
53
53
  psych (>= 4.0.0)
54
54
  regexp_parser (2.9.0)
55
- reline (0.5.8)
55
+ reline (0.5.9)
56
56
  io-console (~> 0.5)
57
57
  rexml (3.2.6)
58
58
  rspec (3.12.0)
@@ -96,7 +96,7 @@ GEM
96
96
  simplecov_json_formatter (~> 0.1)
97
97
  simplecov-html (0.12.3)
98
98
  simplecov_json_formatter (0.1.4)
99
- stringio (3.1.0)
99
+ stringio (3.1.1)
100
100
  thor (1.2.2)
101
101
  timecop (0.9.8)
102
102
  unicode-display_width (2.5.0)
data/cpl.gemspec CHANGED
@@ -38,4 +38,8 @@ Gem::Specification.new do |spec|
38
38
  spec.executables = ["cpl"]
39
39
 
40
40
  spec.metadata["rubygems_mfa_required"] = "true"
41
+
42
+ spec.post_install_message = "DEPRECATED: The `cpl` gem has been renamed to `cpflow` " \
43
+ "and will no longer be supported. " \
44
+ "Please switch to `shakaflow` as soon as possible."
41
45
  end
@@ -41,7 +41,8 @@ module Command
41
41
  progress.puts("\nPushed image to '/org/#{config.org}/image/#{image_name}'.\n\n")
42
42
 
43
43
  step("Waiting for image to be available", retry_on_failure: true) do
44
- image_name == cp.latest_image(refresh: true)
44
+ images = cp.query_images["items"]
45
+ images.find { |image| image["name"] == image_name }
45
46
  end
46
47
  end
47
48
  end
@@ -39,9 +39,8 @@ class Controlplane # rubocop:disable Metrics/ClassLength
39
39
 
40
40
  # image
41
41
 
42
- def latest_image(a_gvc = gvc, a_org = org, refresh: false)
42
+ def latest_image(a_gvc = gvc, a_org = org)
43
43
  @latest_image ||= {}
44
- @latest_image[a_gvc] = nil if refresh
45
44
  @latest_image[a_gvc] ||=
46
45
  begin
47
46
  items = query_images(a_gvc, a_org)["items"]
@@ -69,7 +68,7 @@ class Controlplane # rubocop:disable Metrics/ClassLength
69
68
  if matching_items.empty?
70
69
  name_only ? "#{app_name}:#{NO_IMAGE_AVAILABLE}" : nil
71
70
  else
72
- latest_item = matching_items.max_by { |item| extract_image_number(item["name"]) }
71
+ latest_item = matching_items.max_by { |item| DateTime.parse(item["created"]) }
73
72
  name_only ? latest_item["name"] : latest_item
74
73
  end
75
74
  end
data/lib/cpl/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cpl
4
- VERSION = "2.2.0"
4
+ VERSION = "2.2.2"
5
5
  MIN_CPLN_VERSION = "2.0.1"
6
6
  end
data/lib/cpl.rb CHANGED
@@ -60,6 +60,7 @@ module Cpl
60
60
  def self.start(*args)
61
61
  ENV["CPLN_SKIP_UPDATE_CHECK"] = "true"
62
62
 
63
+ warn_deprecated_gem
63
64
  check_cpln_version
64
65
  check_cpl_version
65
66
  fix_help_option
@@ -67,6 +68,16 @@ module Cpl
67
68
  super(*args)
68
69
  end
69
70
 
71
+ def self.warn_deprecated_gem
72
+ return if @warned_deprecated_gem
73
+
74
+ @warned_deprecated_gem = true
75
+
76
+ ::Shell.warn_deprecated("This gem has been renamed to `cpflow` " \
77
+ "and will no longer be supported. " \
78
+ "Please switch to `cpflow` as soon as possible.")
79
+ end
80
+
70
81
  def self.check_cpln_version # rubocop:disable Metrics/MethodLength
71
82
  return if @checked_cpln_version
72
83
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-07 00:00:00.000000000 Z
12
+ date: 2024-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debug
@@ -319,7 +319,8 @@ licenses:
319
319
  - MIT
320
320
  metadata:
321
321
  rubygems_mfa_required: 'true'
322
- post_install_message:
322
+ post_install_message: 'DEPRECATED: The `cpl` gem has been renamed to `cpflow` and
323
+ will no longer be supported. Please switch to `shakaflow` as soon as possible.'
323
324
  rdoc_options: []
324
325
  require_paths:
325
326
  - lib
@@ -334,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
335
  - !ruby/object:Gem::Version
335
336
  version: '0'
336
337
  requirements: []
337
- rubygems_version: 3.5.10
338
+ rubygems_version: 3.5.13
338
339
  signing_key:
339
340
  specification_version: 4
340
341
  summary: Heroku to Control Plane