gitlab-releases 0.2.3 → 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -7
- data/lib/gitlab_releases/date_calculator.rb +1 -21
- data/lib/gitlab_releases/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96b0b12edaa3ab669ff5b01e2a3ad8a699321aaec1fe1d8ba52be69db6de9e59
|
4
|
+
data.tar.gz: b4e78d554defe39d5a06d4d10d92b4d48e55ef9371ffe7823a7090620a9f6a5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e52f6976faa23b62f28edefe9fa660f138e7eb8bbd9e3b0b143152c1e727da934c73234ece5edf112151caf9020ae1da806fae5f5f64a5dbbe6a4f16fa9ca85
|
7
|
+
data.tar.gz: 404e69849913a99274acbfc016af7f0f4beca48b5cd176f8bc9fd6d2d7c9fc7147c6fc3d1c542a5cc46ec5c63530bf467c4a2eae167b1fe4073347094ba4c5a7
|
data/CHANGELOG.md
CHANGED
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.
|
15
|
+
gem 'gitlab-releases', '~> 0.2.4'
|
16
16
|
```
|
17
17
|
|
18
18
|
Install:
|
@@ -47,7 +47,7 @@ To make use of it:
|
|
47
47
|
> require 'gitlab_releases'
|
48
48
|
> GitlabReleases.upcoming_releases
|
49
49
|
=>
|
50
|
-
{
|
50
|
+
{
|
51
51
|
"16.5"=>"2023-10-22",
|
52
52
|
"16.6"=>"2023-11-16",
|
53
53
|
"16.7"=>"2023-12-21",
|
@@ -59,15 +59,16 @@ To make use of it:
|
|
59
59
|
"17.1"=>"2024-06-20",
|
60
60
|
"17.2"=>"2024-07-18",
|
61
61
|
"17.3"=>"2024-08-15",
|
62
|
-
"17.4"=>"2024-09-19"
|
62
|
+
"17.4"=>"2024-09-19"
|
63
|
+
}
|
63
64
|
> GitlabReleases.active_version
|
64
|
-
=> "16.
|
65
|
+
=> "16.6"
|
65
66
|
> GitlabReleases.current_version
|
66
|
-
=> "16.
|
67
|
+
=> "16.5"
|
67
68
|
> GitlabReleases.next_versions
|
68
|
-
=> ["16.
|
69
|
+
=> ["16.5.2", "16.4.3", "16.3.7"]
|
69
70
|
> GitlabReleases.previous_version
|
70
|
-
=> "16.
|
71
|
+
=> "16.4.2"
|
71
72
|
```
|
72
73
|
|
73
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2023-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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.
|
130
|
+
rubygems_version: 3.4.17
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Utilities for GitLab releases and versions
|