latest_ruby 2.0.0 → 3.1.0
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 +22 -0
- data/VERSION +1 -1
- data/lib/latest_ruby/retrievers/rubinius_retriever.rb +3 -10
- data/lib/latest_ruby/rubies/rubinius.rb +6 -6
- data/lib/latest_ruby.rb +9 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78fd30461df8e4b2cb0daffd755f819f9b77258180ba478da683cd9c22cd18d3
|
4
|
+
data.tar.gz: 8e2109bb04c3e2b360c8d7c332381baa31c955edba543fd646409cbacc18797d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37148dc186b474d65c49490aa7b70bb11893f95a4d0db2cf31702eaa029d5b692b5551fca368fdb7fb00694c8e4a99f44fd788609b1c7d7336f8a522d3ff116b
|
7
|
+
data.tar.gz: e308d8cab04ec9a41ef382523550ed605e50f9b33e4195185fceb56e897966169b929d1694aab1fcd607b48364d0b6123302dfaa42a93396fc55efde64d36177
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
Latest Ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
### v3.1.0 (December 26, 2021)
|
5
|
+
|
6
|
+
* Added support for Ruby 3.1
|
7
|
+
([#21](https://github.com/kyrylo/latest_ruby/pull/21))
|
8
|
+
|
9
|
+
### v3.0.2 (September 9, 2021)
|
10
|
+
|
11
|
+
* Fixed support for Rubinius
|
12
|
+
([#19](https://github.com/kyrylo/latest_ruby/pull/19))
|
13
|
+
* Dropped `rexml` dependency
|
14
|
+
([#19](https://github.com/kyrylo/latest_ruby/pull/19))
|
15
|
+
|
16
|
+
### v3.0.1 (December 31, 2020)
|
17
|
+
|
18
|
+
* Fixed support for Ruby 3.0
|
19
|
+
([#17](https://github.com/kyrylo/latest_ruby/pull/17))
|
20
|
+
|
21
|
+
### v3.0.0 (December 26, 2020)
|
22
|
+
|
23
|
+
* Added support for Ruby 3.0
|
24
|
+
([#15](https://github.com/kyrylo/latest_ruby/pull/15))
|
25
|
+
|
4
26
|
### v2.0.0 (December 24, 2019)
|
5
27
|
|
6
28
|
* Added support for Ruby 2.7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
@@ -1,18 +1,11 @@
|
|
1
|
-
require '
|
1
|
+
require 'json'
|
2
2
|
|
3
3
|
module Latest
|
4
4
|
class RubiniusRetriever
|
5
|
-
|
6
|
-
include REXML
|
7
|
-
|
8
5
|
def retrieve(rbx)
|
9
6
|
page = Net::HTTP.get(URI(rbx.source))
|
10
|
-
|
11
|
-
|
12
|
-
candidates = all_versions.find_all { |v| v =~ /\Arubinius-/ }
|
13
|
-
stables = candidates.flat_map { |v| v.scan(/-(\d\.\d\.\d)\.tar/) }.flatten
|
14
|
-
stables.map { |v| RubyVersion.new(v) }.max
|
7
|
+
latest_version = JSON.parse(page)
|
8
|
+
RubyVersion.new(latest_version['tag_name'].scan(/\d.\d/).first)
|
15
9
|
end
|
16
|
-
|
17
10
|
end
|
18
11
|
end
|
@@ -1,23 +1,23 @@
|
|
1
1
|
module Latest
|
2
2
|
class Rubinius
|
3
|
-
|
4
|
-
SOURCE = '
|
5
|
-
AVAILABLE_EXTS = ['.tar.
|
3
|
+
WEB_SOURCE = 'https://api.github.com/repos/rubinius/rubinius/releases/latest'
|
4
|
+
SOURCE = 'https://github.com/rubinius/rubinius/releases/download'
|
5
|
+
AVAILABLE_EXTS = ['.tar.bz2']
|
6
6
|
|
7
7
|
attr_reader :source
|
8
8
|
|
9
9
|
def initialize(retriever)
|
10
10
|
@retriever = retriever
|
11
|
-
@source =
|
11
|
+
@source = WEB_SOURCE
|
12
12
|
end
|
13
13
|
|
14
14
|
def version
|
15
15
|
@version ||= @retriever.retrieve(self)
|
16
16
|
end
|
17
17
|
|
18
|
-
def link(ext = '.tar.
|
18
|
+
def link(ext = '.tar.bz2')
|
19
19
|
if AVAILABLE_EXTS.include?(ext)
|
20
|
-
|
20
|
+
"#{SOURCE}/v#{version}/rubinius-#{version}#{ext}"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
data/lib/latest_ruby.rb
CHANGED
@@ -21,6 +21,14 @@ module Latest
|
|
21
21
|
File.read(VERSION_FILE).chomp : '(could not find VERSION file)'
|
22
22
|
|
23
23
|
class << self
|
24
|
+
def ruby31
|
25
|
+
Ruby.new(MRI.new('3.1', MRIRetriever.new))
|
26
|
+
end
|
27
|
+
|
28
|
+
def ruby30
|
29
|
+
Ruby.new(MRI.new('3.0', MRIRetriever.new))
|
30
|
+
end
|
31
|
+
|
24
32
|
def ruby27
|
25
33
|
Ruby.new(MRI.new('2.7', MRIRetriever.new))
|
26
34
|
end
|
@@ -34,7 +42,7 @@ module Latest
|
|
34
42
|
end
|
35
43
|
|
36
44
|
# The latest Ruby version by default.
|
37
|
-
alias_method :ruby, :
|
45
|
+
alias_method :ruby, :ruby31
|
38
46
|
|
39
47
|
def ruby24
|
40
48
|
Ruby.new(MRI.new('2.4', MRIRetriever.new))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latest_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyrylo Silin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -71,7 +71,7 @@ homepage: https://github.com/kyrylo/latest_ruby
|
|
71
71
|
licenses:
|
72
72
|
- zlib
|
73
73
|
metadata: {}
|
74
|
-
post_install_message:
|
74
|
+
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|
77
77
|
- lib
|
@@ -86,9 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
|
90
|
-
|
91
|
-
signing_key:
|
89
|
+
rubygems_version: 3.2.15
|
90
|
+
signing_key:
|
92
91
|
specification_version: 4
|
93
92
|
summary: Answers the question of what the latest Ruby version is
|
94
93
|
test_files: []
|