fa-harness-tools 1.0.2 → 1.0.3

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
  SHA256:
3
- metadata.gz: a8b62816b52a8c8cbb615df53ded387c2af166da2f3d986973d7649514ee17de
4
- data.tar.gz: 3274cc9cd5dfad6ee8a10fb2e8dc79856e83b42d16d368aa8466bddc150a3d46
3
+ metadata.gz: 9184fa096f94f549bf7f851ed9e7c97e7c3e919791d2972ace243642403d82d3
4
+ data.tar.gz: 6b40fe369961e86a94dcd2e6cdefe8f3522f86a6d27b6fb6cc9880bc9214e226
5
5
  SHA512:
6
- metadata.gz: 5c0e753eab7662c459df2940436b57fbb2131710d4b572e3e87fc18f27315420c1e73635e9164ef20b7fb5e4486e871508e932fac69f1a013c988e1b77753ada
7
- data.tar.gz: 8fe5898455f1cf835978ea810aeb1924fa75318a547590670f982d1d0e624ec04a877eca96287ef2d7536e58553083f6e5bffd35ee0bc39cd6f864f4b057d2a7
6
+ metadata.gz: 45d9f3a130ef9f2caadb2e5d62f33d9e2234627ad71f215414cfccba0e86ed6d493f927931969b95e8bb55ac9f70f914ac3a445b0e2e4f2ad85d19c41ca60418
7
+ data.tar.gz: f57aef9c5cd44cdd09abe8b4cbb2c0c9884589f57b0c0f67764c515681317f87ce9bc31084f2132b9008862e57300720480a9231d8e605cd7e3ed15eb5513f04
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa-harness-tools (1.0.2)
4
+ fa-harness-tools (1.0.3)
5
5
  octokit (~> 4.0)
6
6
  tzinfo (~> 2.0)
7
7
  tzinfo-data (~> 1.0)
@@ -34,7 +34,7 @@ module FaHarnessTools
34
34
  all_deploy_tags(prefix: @tag_prefix, environment: @context.environment).
35
35
  sort_by { |tag| tag[:name] }
36
36
 
37
- latest_allowed_tag = tags[@allowed_rollback_count * -1]
37
+ latest_allowed_tag = tags.last(@allowed_rollback_count).first
38
38
 
39
39
  if latest_allowed_tag.nil?
40
40
  # If no previous deploys we need to let it deploy otherwise it will
@@ -34,7 +34,8 @@ module FaHarnessTools
34
34
  #
35
35
  # @return [Hash] Tag data hash, or nil if none
36
36
  def last_deploy_tag(prefix:, environment:)
37
- last_tag = all_deploy_tags.sort_by { |tag| tag[:name] }.last
37
+ last_tag = all_deploy_tags(prefix: prefix, environment: environment).
38
+ sort_by { |tag| tag[:name] }.last
38
39
  last_tag ? last_tag : nil
39
40
  end
40
41
 
@@ -1,3 +1,3 @@
1
1
  module FaHarnessTools
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fa-harness-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - FreeAgent
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit