gitlab-releases 0.2.2 → 0.2.4

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: b10be5cb0c5473975dc47663829232d2770cc358a0b5dd2ae31ca852dc4b1d6a
4
- data.tar.gz: e04dfb8cfff3b457f9753d59a66174df1e6e979037fafe3c72745be7f17a508e
3
+ metadata.gz: 96b0b12edaa3ab669ff5b01e2a3ad8a699321aaec1fe1d8ba52be69db6de9e59
4
+ data.tar.gz: b4e78d554defe39d5a06d4d10d92b4d48e55ef9371ffe7823a7090620a9f6a5f
5
5
  SHA512:
6
- metadata.gz: 6b01dd5ebaf8d3d5364a4090ab0aa9800ee7d8070c3fb956dac21326da274728e5bfda3fae7a26a1bf8e17a4d0aa1751737380fc3aa58375753e7ff2c4875acf
7
- data.tar.gz: ceccfb597902bc3579014ed9bba9ee095245777a64e7956ae0c8a2dd0a86565c198375efed7d3379fb56bdef58af251154084f80cbe9f4f9f8eee4720bb7a685
6
+ metadata.gz: 6e52f6976faa23b62f28edefe9fa660f138e7eb8bbd9e3b0b143152c1e727da934c73234ece5edf112151caf9020ae1da806fae5f5f64a5dbbe6a4f16fa9ca85
7
+ data.tar.gz: 404e69849913a99274acbfc016af7f0f4beca48b5cd176f8bc9fd6d2d7c9fc7147c6fc3d1c542a5cc46ec5c63530bf467c4a2eae167b1fe4073347094ba4c5a7
data/CHANGELOG.md CHANGED
@@ -28,3 +28,11 @@
28
28
  ## [0.2.2] - 2023-10-02
29
29
 
30
30
  - Fixed `previous_version` to return the latest patch of the previous minor version.
31
+
32
+ ## [0.2.3] - 2023-10-11
33
+
34
+ - Update ActiveSupport gem and loosen version restriction
35
+
36
+ ## [0.2.4] - 2023-11-03
37
+
38
+ - Remove logic for static release date. All release dates will be calculated based on the third Thursday of the month.
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in gitlab-releases.gemspec
6
6
  gemspec
7
7
 
8
- gem 'activesupport', '~> 7.0.0'
8
+ gem 'activesupport', '~> 7.1'
9
9
  gem 'gitlab', '~> 4.19.0'
10
10
  gem 'http', '~> 5.1.0'
11
11
  gem 'rake', '~> 13.0'
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-releases (0.2.2)
5
- activesupport (~> 7.0.0)
4
+ gitlab-releases (0.2.3)
5
+ activesupport (~> 7.1)
6
6
  gitlab (~> 4.19.0)
7
7
  http (~> 5.1.0)
8
8
  retriable (~> 3.1.2)
@@ -11,24 +11,34 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (7.0.6)
14
+ activesupport (7.1.0)
15
+ base64
16
+ bigdecimal
15
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ connection_pool (>= 2.2.5)
19
+ drb
16
20
  i18n (>= 1.6, < 2)
17
21
  minitest (>= 5.1)
22
+ mutex_m
18
23
  tzinfo (~> 2.0)
19
24
  addressable (2.8.5)
20
25
  public_suffix (>= 2.0.2, < 6.0)
21
26
  ast (2.4.2)
27
+ base64 (0.1.1)
28
+ bigdecimal (3.1.4)
22
29
  binding_of_caller (1.0.0)
23
30
  debug_inspector (>= 0.0.1)
24
31
  coderay (1.1.3)
25
32
  concurrent-ruby (1.2.2)
33
+ connection_pool (2.4.1)
26
34
  crack (0.4.5)
27
35
  rexml
28
36
  debug_inspector (1.1.0)
29
37
  diff-lcs (1.5.0)
30
38
  domain_name (0.5.20190701)
31
39
  unf (>= 0.0.5, < 1.0.0)
40
+ drb (2.1.1)
41
+ ruby2_keywords
32
42
  ffi (1.15.5)
33
43
  ffi-compiler (1.0.1)
34
44
  ffi (>= 1.0.0)
@@ -57,8 +67,9 @@ GEM
57
67
  rake (~> 13.0)
58
68
  method_source (1.0.0)
59
69
  mini_mime (1.1.2)
60
- minitest (5.19.0)
70
+ minitest (5.20.0)
61
71
  multi_xml (0.6.0)
72
+ mutex_m (0.1.2)
62
73
  parallel (1.23.0)
63
74
  parser (3.2.2.3)
64
75
  ast (~> 2.4.1)
@@ -115,6 +126,7 @@ GEM
115
126
  rubocop-ast (1.29.0)
116
127
  parser (>= 3.2.1.0)
117
128
  ruby-progressbar (1.13.0)
129
+ ruby2_keywords (0.0.5)
118
130
  terminal-table (3.0.2)
119
131
  unicode-display_width (>= 1.1.1, < 3)
120
132
  timecop (0.9.8)
@@ -140,7 +152,7 @@ PLATFORMS
140
152
  x86_64-darwin-22
141
153
 
142
154
  DEPENDENCIES
143
- activesupport (~> 7.0.0)
155
+ activesupport (~> 7.1)
144
156
  gitlab (~> 4.19.0)
145
157
  gitlab-releases!
146
158
  http (~> 5.1.0)
data/README.md CHANGED
@@ -12,7 +12,7 @@ Library to interact with GitLab releases and versions. The information is fetche
12
12
  Gemfile:
13
13
 
14
14
  ```
15
- gem 'gitlab-releases', '~> 0.2.0'
15
+ gem 'gitlab-releases', '~> 0.2.4'
16
16
  ```
17
17
 
18
18
  Install:
@@ -20,15 +20,22 @@ Install:
20
20
  $ gem install gitlab-releases
21
21
  ```
22
22
 
23
+ or alternatively to automatically initialize the gem in your bundler project:
24
+
25
+ ```ruby
26
+ # add to your Gemfile
27
+ gem 'gitlab-releases', require: 'gitlab_releases'
28
+ ```
29
+
23
30
  ## Usage
24
31
 
25
32
  There are different methods available:
26
33
 
27
34
  * `upcoming_releases` - Returns the GitLab release date and the associated version for the next 12 months.
28
35
  * `active_version` - Returns the active GitLab version.
29
- * `current_version` - Returns the current GitLab version.
36
+ * `current_version` - Returns the current GitLab minor version.
30
37
  * `next_versions` - Returns the next GitLab patch versions (for patch and security releases).
31
- * `previous_version` - Returns the n-1 GitLab version
38
+ * `previous_version` - Returns the return the latest patch of the previous minor version.
32
39
 
33
40
  To make use of it:
34
41
 
@@ -38,12 +45,9 @@ To make use of it:
38
45
 
39
46
  ```ruby
40
47
  > require 'gitlab_releases'
41
- > releases = GitlabReleases
42
- > releases.upcoming_releases
48
+ > GitlabReleases.upcoming_releases
43
49
  =>
44
- {"16.2"=>"2023-07-22",
45
- "16.3"=>"2023-08-22",
46
- "16.4"=>"2023-09-22",
50
+ {
47
51
  "16.5"=>"2023-10-22",
48
52
  "16.6"=>"2023-11-16",
49
53
  "16.7"=>"2023-12-21",
@@ -53,16 +57,18 @@ To make use of it:
53
57
  "16.11"=>"2024-04-18",
54
58
  "17.0"=>"2024-05-16",
55
59
  "17.1"=>"2024-06-20",
56
- "17.2"=>"2024-07-18"}
57
-
58
- > releases.active_version
59
- => "16.3"
60
- > releases.current_version
61
- => "16.2"
62
- > releases.next_versions
63
- => ["16.2.5", "16.1.5", "16.0.9"]
64
- > releases.previous_version
65
- => 16.2.4
60
+ "17.2"=>"2024-07-18",
61
+ "17.3"=>"2024-08-15",
62
+ "17.4"=>"2024-09-19"
63
+ }
64
+ > GitlabReleases.active_version
65
+ => "16.6"
66
+ > GitlabReleases.current_version
67
+ => "16.5"
68
+ > GitlabReleases.next_versions
69
+ => ["16.5.2", "16.4.3", "16.3.7"]
70
+ > GitlabReleases.previous_version
71
+ => "16.4.2"
66
72
  ```
67
73
 
68
74
  ## Contributing
@@ -3,12 +3,6 @@
3
3
  require 'active_support/all'
4
4
 
5
5
  class DateCalculator
6
- # Represents the minimum version that uses the new release date
7
- RELEASE_VERSION = '16.6'
8
-
9
- # Represents the minimum date that uses the new release date
10
- RELEASE_DATE = Date.parse('2023-11-16')
11
-
12
6
  # @param version [ReleaseVersion]
13
7
  # @param candidate_date [Date] - The month to calculate the release date. It should be
14
8
  # the first day of the month.
@@ -18,27 +12,13 @@ class DateCalculator
18
12
  end
19
13
 
20
14
  def execute
21
- result_date = if before_new_release_date?
22
- twenty_second_of_the_month
23
- else
24
- calculate_third_thursday_of_month
25
- end
26
-
27
- result_date.strftime('%Y-%m-%d')
15
+ calculate_third_thursday_of_month.strftime('%Y-%m-%d')
28
16
  end
29
17
 
30
18
  private
31
19
 
32
20
  attr_reader :next_version, :candidate_date
33
21
 
34
- def before_new_release_date?
35
- next_version.to_f < RELEASE_VERSION.to_f && candidate_date < RELEASE_DATE
36
- end
37
-
38
- def twenty_second_of_the_month
39
- Date.parse("#{candidate_date.year}-#{candidate_date.month}-22")
40
- end
41
-
42
22
  # If the first day of the month is a Thursday, it fetches the subsequent Two thursdays,
43
23
  # if not searches for the 3rd Thursday of the month.
44
24
  def calculate_third_thursday_of_month
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabReleases
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.4"
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.2
4
+ version: 0.2.4
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-10-02 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 7.0.0
19
+ version: '7.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 7.0.0
26
+ version: '7.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gitlab
29
29
  requirement: !ruby/object:Gem::Requirement