gitlab-releases 0.2.0 → 0.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: 6b714bf4ec97c53e2345b9e37ca6ebd80ad25b0ca2b2eca602565e912a0d8304
4
- data.tar.gz: 595b3cf4d281e55b5b538a3e3d2c93f1cf93540043388bff53360e2ec730e4ff
3
+ metadata.gz: b10be5cb0c5473975dc47663829232d2770cc358a0b5dd2ae31ca852dc4b1d6a
4
+ data.tar.gz: e04dfb8cfff3b457f9753d59a66174df1e6e979037fafe3c72745be7f17a508e
5
5
  SHA512:
6
- metadata.gz: 5a9fa9d47462aac1a1a4ade789bd852ff5e328efedddf20227ce4e7f63cdd5a4977687017c3909797107e0b31ddfa9f0ba7a74dc6495873dd8a97b75c35ec1a0
7
- data.tar.gz: 36371646feb42520150c63983a1664c22697e6dcb387cbe3ba4cca6c7d96607c6d470a2269eb8209b1dc37a0e6a839fe981e32dd89a36b278e77c2cfe7eb050b
6
+ metadata.gz: 6b01dd5ebaf8d3d5364a4090ab0aa9800ee7d8070c3fb956dac21326da274728e5bfda3fae7a26a1bf8e17a4d0aa1751737380fc3aa58375753e7ff2c4875acf
7
+ data.tar.gz: ceccfb597902bc3579014ed9bba9ee095245777a64e7956ae0c8a2dd0a86565c198375efed7d3379fb56bdef58af251154084f80cbe9f4f9f8eee4720bb7a685
data/CHANGELOG.md CHANGED
@@ -20,3 +20,11 @@
20
20
 
21
21
  - Gem renamed to `gitlab-releases` to align with GitLab gem naming conventions
22
22
  - PRODUCTION_TOKEN renamed to RELEASES_GITLAB_READ_TOKEN
23
+
24
+ ## [0.2.1] - 2023-09-25
25
+
26
+ - `GitlabReleases.active_version` was updated to consider dates equal than the date provided. This mirrors the logic used in release-tools.
27
+
28
+ ## [0.2.2] - 2023-10-02
29
+
30
+ - Fixed `previous_version` to return the latest patch of the previous minor version.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-releases (0.2.0)
4
+ gitlab-releases (0.2.2)
5
5
  activesupport (~> 7.0.0)
6
6
  gitlab (~> 4.19.0)
7
7
  http (~> 5.1.0)
@@ -136,6 +136,7 @@ GEM
136
136
 
137
137
  PLATFORMS
138
138
  arm64-darwin-21
139
+ arm64-darwin-22
139
140
  x86_64-darwin-22
140
141
 
141
142
  DEPENDENCIES
data/README.md CHANGED
@@ -67,7 +67,7 @@ To make use of it:
67
67
 
68
68
  ## Contributing
69
69
 
70
- Bug reports and feature requests are welcome on the [Delivery team tracker]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://gitlab.com/gitlab-org/delivery/gitlab-releases/blob/main/CODE_OF_CONDUCT.md).
70
+ Bug reports and feature requests are welcome on the [Delivery team tracker]. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/CODE_OF_CONDUCT.md).
71
71
 
72
72
  ## License
73
73
 
@@ -75,6 +75,6 @@ The gem is available as open source under the terms of the [MIT License](https:/
75
75
 
76
76
  ## Code of Conduct
77
77
 
78
- Everyone interacting in the Releases project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/gitlab-org/delivery/gitlab-releases/main/CODE_OF_CONDUCT.md).
78
+ Everyone interacting in the Releases project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/CODE_OF_CONDUCT.md).
79
79
 
80
80
  [Delivery team tracker]: https://gitlab.com/gitlab-com/gl-infra/delivery
@@ -89,25 +89,25 @@ class ReleaseVersions
89
89
  # | 16.7 | December 21st |
90
90
  #
91
91
  # * For August 21st, the release should be 16.3
92
- # * For August 22nd, the release should be 16.4
92
+ # * For August 22nd, the release should be 16.3
93
93
  # * For August 23rd, the release should be 16.4
94
94
  # * For November 17th, the release should be 16.7
95
95
  return nil if releases_yaml.empty?
96
96
 
97
- row = releases_yaml.find { |release| release['date'] > date }
97
+ row = releases_yaml.find { |release| release['date'] >= date.to_date }
98
98
 
99
99
  ReleaseVersion.new(row['version'])
100
100
  end
101
101
 
102
- # Returns the N-1 version supported based on the current_list
102
+ # Returns the last patch of the previous minor version
103
+ #
104
+ # For example, if the current version is 16.4, then
105
+ # the previous version would be 16.3 and the last registered patch is 16.3.5
103
106
  #
104
- # For example:
105
- # => current_list
106
- # => ["16.3.0", "16.2.4", "16.1.4", "16.2.3"]
107
107
  # => previous_version
108
- # => ['16.2.4']
108
+ # => '16.3.5'
109
109
  def self.previous_version
110
- ReleaseVersion.new(sort(current_list).reverse[1])
110
+ next_versions.second.previous_patch
111
111
  end
112
112
 
113
113
  def self.sort(versions)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabReleases
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-releases
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mayra Cabrera
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -105,13 +105,13 @@ files:
105
105
  - lib/gitlab_releases/version.rb
106
106
  - lib/gitlab_releases/version_calculator.rb
107
107
  - sig/release_dates.rbs
108
- homepage: https://gitlab.com/gitlab-org/delivery/releases
108
+ homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases
109
109
  licenses:
110
110
  - MIT
111
111
  metadata:
112
- homepage_uri: https://gitlab.com/gitlab-org/delivery/releases
113
- source_code_uri: https://gitlab.com/gitlab-org/delivery/gitlab-releases
114
- changelog_uri: https://gitlab.com/gitlab-org/delivery/gitlab-releases/CHANGELOG.md
112
+ homepage_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases
113
+ source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases
114
+ changelog_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/CHANGELOG.md
115
115
  post_install_message:
116
116
  rdoc_options: []
117
117
  require_paths:
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  requirements: []
130
- rubygems_version: 3.3.13
130
+ rubygems_version: 3.4.17
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Utilities for GitLab releases and versions