apt-spy2 0.7.3 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/pr.yml +19 -3
- data/.github/workflows/release.yml +2 -1
- data/Dockerfile +10 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +30 -8
- data/Makefile +21 -3
- data/README.md +16 -14
- data/Rakefile +10 -17
- data/apt-spy2.gemspec +21 -18
- data/bin/apt-spy2 +3 -2
- data/lib/apt/spy2/country.rb +8 -9
- data/lib/apt/spy2/downloader.rb +14 -17
- data/lib/apt/spy2/launchpad.rb +5 -6
- data/lib/apt/spy2/request.rb +33 -0
- data/lib/apt/spy2/ubuntu_mirrors.rb +5 -7
- data/lib/apt/spy2/url.rb +28 -0
- data/lib/apt/spy2/version.rb +3 -1
- data/lib/apt/spy2/writer.rb +17 -20
- data/lib/apt/spy2.rb +74 -66
- data/test_helper.rb +30 -0
- data/tests/country_test.rb +7 -5
- data/tests/downloader_test.rb +10 -7
- data/tests/launchpad_test.rb +7 -3
- data/tests/ubuntu_mirrors_test.rb +15 -0
- data/tests/url_test.rb +23 -0
- data/tests/writer_test.rb +27 -0
- metadata +48 -33
data/lib/apt/spy2/version.rb
CHANGED
data/lib/apt/spy2/writer.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'colored'
|
2
4
|
require 'json'
|
3
5
|
|
4
6
|
module Apt
|
5
7
|
module Spy2
|
8
|
+
# abstracted puts or json
|
6
9
|
class Writer
|
7
10
|
def initialize(format)
|
8
|
-
|
9
|
-
if !["json", "shell"].include?(format)
|
10
|
-
raise "Unknown format: #{format}"
|
11
|
-
end
|
11
|
+
raise "Unknown format: #{format}" unless %w[json shell].include?(format)
|
12
12
|
|
13
13
|
@format = format
|
14
14
|
@complete = []
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
17
|
+
def complete(complete)
|
18
18
|
@complete = complete
|
19
19
|
end
|
20
20
|
|
@@ -24,32 +24,29 @@ module Apt
|
|
24
24
|
return
|
25
25
|
end
|
26
26
|
|
27
|
-
print "Mirror: #{data[
|
27
|
+
print "Mirror: #{data['mirror']} - "
|
28
28
|
|
29
|
-
case data[
|
30
|
-
when
|
31
|
-
puts data[
|
32
|
-
when
|
33
|
-
puts data[
|
34
|
-
when
|
35
|
-
puts data[
|
29
|
+
case data['status']
|
30
|
+
when 'up'
|
31
|
+
puts data['status'].upcase.green
|
32
|
+
when 'down'
|
33
|
+
puts data['status'].upcase.red
|
34
|
+
when 'broken'
|
35
|
+
puts data['status'].upcase.yellow
|
36
36
|
else
|
37
|
-
puts "Unknown status: #{data[
|
37
|
+
puts "Unknown status: #{data['status']}".white_on_red
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
def json?
|
42
|
-
if @format == 'json'
|
43
|
-
return true
|
44
|
-
end
|
42
|
+
return true if @format == 'json'
|
45
43
|
|
46
|
-
|
44
|
+
false
|
47
45
|
end
|
48
46
|
|
49
|
-
def to_json
|
47
|
+
def to_json(*_args)
|
50
48
|
JSON.generate(@complete)
|
51
49
|
end
|
52
|
-
|
53
50
|
end
|
54
51
|
end
|
55
52
|
end
|
data/lib/apt/spy2.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'thor'
|
2
|
-
require 'open-uri'
|
3
4
|
require 'colored'
|
4
5
|
require 'fileutils'
|
5
6
|
require 'apt/spy2/writer'
|
@@ -7,120 +8,130 @@ require 'apt/spy2/country'
|
|
7
8
|
require 'apt/spy2/downloader'
|
8
9
|
require 'apt/spy2/ubuntu_mirrors'
|
9
10
|
require 'apt/spy2/launchpad'
|
11
|
+
require 'apt/spy2/request'
|
12
|
+
require 'apt/spy2/url'
|
10
13
|
|
14
|
+
# apt-spy2 command interface
|
11
15
|
class AptSpy2 < Thor
|
12
|
-
package_name
|
16
|
+
package_name 'apt-spy2'
|
17
|
+
class_option :country, default: 'mirrors'
|
18
|
+
class_option :launchpad, type: :boolean, banner: "Use launchpad's mirror list"
|
13
19
|
|
14
|
-
desc
|
15
|
-
option :
|
16
|
-
option :
|
17
|
-
option :launchpad, :type => :boolean, :banner => "Use launchpad's mirror list"
|
20
|
+
desc 'fix', 'Set the closest/fastest mirror'
|
21
|
+
option :commit, type: :boolean
|
22
|
+
option :strict, type: :boolean
|
18
23
|
def fix
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
update(working[0])
|
24
|
+
mirrors = retrieve(options[:country], use_launchpad?(options))
|
25
|
+
working = filter(mirrors, options[:strict], false)
|
26
|
+
print 'The closest mirror is: '
|
27
|
+
puts (working[0]).to_s.bold.magenta
|
28
|
+
unless options[:commit]
|
29
|
+
puts 'Run with --commit to adjust /etc/apt/sources.list'.yellow
|
30
|
+
return
|
27
31
|
end
|
32
|
+
|
33
|
+
puts 'Updating /etc/apt/sources.list'.yellow
|
34
|
+
update(working[0])
|
28
35
|
end
|
29
36
|
|
30
|
-
desc
|
31
|
-
option :
|
32
|
-
option :
|
33
|
-
option :
|
34
|
-
option :launchpad, :type => :boolean, :banner => "Use launchpad's mirror list"
|
37
|
+
desc 'check', 'Evaluate mirrors'
|
38
|
+
option :output, type: :boolean, default: true
|
39
|
+
option :format, default: 'shell'
|
40
|
+
option :strict, type: :boolean
|
35
41
|
def check
|
36
|
-
|
37
42
|
@writer = Apt::Spy2::Writer.new(options[:format])
|
38
43
|
|
39
44
|
mirrors = retrieve(options[:country], use_launchpad?(options))
|
40
|
-
filter(mirrors, options[:output])
|
45
|
+
filter(mirrors, options[:strict], options[:output])
|
41
46
|
|
42
47
|
puts @writer.to_json if @writer.json?
|
43
48
|
end
|
44
49
|
|
45
|
-
desc
|
46
|
-
option :
|
47
|
-
option :format, :default => "shell"
|
48
|
-
option :launchpad, :type => :boolean, :banner => "Use launchpad's mirror list"
|
50
|
+
desc 'list', 'List the currently available mirrors'
|
51
|
+
option :format, default: 'shell'
|
49
52
|
def list
|
50
53
|
mirrors = retrieve(options[:country], use_launchpad?(options))
|
51
54
|
|
52
55
|
@writer = Apt::Spy2::Writer.new(options[:format])
|
53
56
|
|
54
|
-
@writer.
|
57
|
+
@writer.complete(mirrors)
|
55
58
|
|
56
59
|
puts @writer.to_json if @writer.json?
|
57
|
-
puts mirrors
|
60
|
+
puts mirrors unless @writer.json?
|
58
61
|
end
|
59
62
|
|
60
|
-
desc
|
63
|
+
desc 'version', 'Show which version of apt-spy2 is installed'
|
61
64
|
def version
|
62
65
|
puts Apt::Spy2::VERSION
|
63
66
|
exit
|
64
67
|
end
|
65
68
|
|
66
69
|
private
|
67
|
-
def retrieve(country = "mirrors", launchpad = false)
|
68
70
|
|
71
|
+
def retrieve(country = 'mirrors', launchpad = false)
|
69
72
|
downloader = Apt::Spy2::Downloader.new
|
70
73
|
|
71
|
-
if launchpad
|
72
|
-
csv_path = File.expand_path(File.dirname(__FILE__)
|
74
|
+
if launchpad
|
75
|
+
csv_path = File.expand_path("#{File.dirname(__FILE__)}/../../var/country-names.txt")
|
73
76
|
country = Apt::Spy2::Country.new(csv_path)
|
74
77
|
name = country.to_country_name(options[:country])
|
75
78
|
|
76
79
|
launchpad = Apt::Spy2::Launchpad.new(downloader.do_download('https://launchpad.net/ubuntu/+archivemirrors'))
|
77
|
-
return launchpad.
|
80
|
+
return launchpad.mirrors(name)
|
78
81
|
end
|
79
82
|
|
80
83
|
country.upcase! if country.length == 2
|
81
84
|
|
82
85
|
ubuntu_mirrors = Apt::Spy2::UbuntuMirrors.new(downloader.do_download("http://mirrors.ubuntu.com/#{country}.txt"))
|
83
|
-
|
84
|
-
return mirrors
|
85
|
-
|
86
|
+
ubuntu_mirrors.mirrors(country)
|
86
87
|
end
|
87
88
|
|
88
|
-
|
89
|
-
def filter(mirrors, output = true)
|
89
|
+
def filter(mirrors, strict = false, output = true)
|
90
90
|
# f me :)
|
91
91
|
|
92
92
|
working_mirrors = []
|
93
93
|
|
94
|
+
url = Apt::Spy2::Url.new(strict)
|
95
|
+
|
94
96
|
mirrors.each do |mirror|
|
95
|
-
data = {
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
data["status"] = "down"
|
105
|
-
end
|
97
|
+
data = { 'mirror' => mirror }
|
98
|
+
|
99
|
+
check = url.adjust!(mirror)
|
100
|
+
|
101
|
+
status = broken?(check)
|
102
|
+
|
103
|
+
data['status'] = status
|
104
|
+
|
105
|
+
working_mirrors << mirror if status == 'up'
|
106
106
|
|
107
107
|
@writer.echo(data) if output
|
108
108
|
end
|
109
109
|
|
110
|
-
|
110
|
+
working_mirrors
|
111
|
+
end
|
112
|
+
|
113
|
+
def broken?(url)
|
114
|
+
begin
|
115
|
+
req = Apt::Spy2::Request.new(url)
|
116
|
+
response = req.head
|
117
|
+
return 'up' if response.code == '200'
|
118
|
+
|
119
|
+
return 'broken' if response.code == '404'
|
120
|
+
rescue StandardError
|
121
|
+
# connection errors, ssl errors, etc.
|
122
|
+
end
|
111
123
|
|
124
|
+
'down'
|
112
125
|
end
|
113
126
|
|
114
|
-
private
|
115
127
|
def update(mirror)
|
116
|
-
|
117
128
|
t = Time.now
|
118
|
-
r = `lsb_release -c`.split(
|
119
|
-
sources = "## Updated on #{t
|
120
|
-
sources
|
121
|
-
sources
|
122
|
-
sources
|
123
|
-
sources
|
129
|
+
r = `lsb_release -c`.split(' ')[1]
|
130
|
+
sources = "## Updated on #{t} by apt-spy2\n"
|
131
|
+
sources += "deb #{mirror} #{r} main restricted universe multiverse\n"
|
132
|
+
sources += "deb #{mirror} #{r}-updates main restricted universe multiverse\n"
|
133
|
+
sources += "deb #{mirror} #{r}-backports main restricted universe multiverse\n"
|
134
|
+
sources += "deb #{mirror} #{r}-security main restricted universe multiverse\n"
|
124
135
|
|
125
136
|
apt_sources = '/etc/apt/sources.list'
|
126
137
|
|
@@ -129,26 +140,23 @@ class AptSpy2 < Thor
|
|
129
140
|
File.open(apt_sources, 'w') do |f|
|
130
141
|
f.write(sources)
|
131
142
|
end
|
132
|
-
rescue
|
143
|
+
rescue StandardError
|
133
144
|
msg = "Failed updating #{apt_sources}!"
|
134
|
-
msg
|
145
|
+
msg += 'You probably need sudo!'
|
135
146
|
raise msg
|
136
147
|
end
|
137
148
|
|
138
149
|
puts "Updated '#{apt_sources}' with #{mirror}".green
|
139
|
-
puts
|
150
|
+
puts 'Run `apt-get update` to update'.black_on_yellow
|
140
151
|
end
|
141
152
|
|
142
|
-
private
|
143
153
|
def use_launchpad?(options)
|
144
|
-
|
145
|
-
return false
|
146
|
-
end
|
154
|
+
return false unless options[:launchpad]
|
147
155
|
|
148
156
|
if options[:country] && options[:country] == 'mirrors'
|
149
|
-
raise
|
157
|
+
raise 'Please supply a `--country=foo`. Launchpad cannot guess!'
|
150
158
|
end
|
151
159
|
|
152
|
-
|
160
|
+
true
|
153
161
|
end
|
154
162
|
end
|
data/test_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
require 'simplecov-lcov'
|
5
|
+
|
6
|
+
if ENV['CI']
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
|
8
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
9
|
+
c.output_directory = './coverage'
|
10
|
+
c.report_with_single_file = true
|
11
|
+
c.single_report_path = './coverage/lcov.info'
|
12
|
+
end
|
13
|
+
else
|
14
|
+
SimpleCov.formatter SimpleCov::Formatter::MultiFormatter.new([
|
15
|
+
SimpleCov::Formatter::SimpleFormatter,
|
16
|
+
SimpleCov::Formatter::HTMLFormatter
|
17
|
+
])
|
18
|
+
end
|
19
|
+
|
20
|
+
SimpleCov.profiles.define 'apt-spy2' do
|
21
|
+
add_filter '/tests/'
|
22
|
+
add_filter '/pkg/'
|
23
|
+
add_filter '/vendor/'
|
24
|
+
add_filter '/var'
|
25
|
+
|
26
|
+
add_group 'lib', 'lib/apt'
|
27
|
+
add_group 'bin', 'bin'
|
28
|
+
end
|
29
|
+
SimpleCov.start 'apt-spy2'
|
30
|
+
require 'minitest/autorun'
|
data/tests/country_test.rb
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/country'
|
5
|
+
|
6
|
+
# test the name resolution
|
3
7
|
class CountryTest < Minitest::Test
|
4
8
|
def setup
|
5
|
-
@country_list = File.expand_path(File.dirname(__FILE__)
|
9
|
+
@country_list = File.expand_path("#{File.dirname(__FILE__)}/../var/country-names.txt")
|
6
10
|
end
|
7
11
|
|
8
|
-
def test_tld_to_name
|
9
|
-
|
12
|
+
def test_tld_to_name
|
10
13
|
# fixtures for people who don't want to read about rails
|
11
14
|
data = {
|
12
15
|
'de' => 'Germany',
|
@@ -22,6 +25,5 @@ class CountryTest < Minitest::Test
|
|
22
25
|
data.each_pair do |code, expected|
|
23
26
|
assert_equal(expected, c.to_country_name(code))
|
24
27
|
end
|
25
|
-
|
26
28
|
end
|
27
29
|
end
|
data/tests/downloader_test.rb
CHANGED
@@ -1,15 +1,18 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/downloader'
|
5
|
+
|
6
|
+
# this is an integration test (needs interwebs)
|
3
7
|
class DownloaderTest < Minitest::Test
|
4
|
-
|
5
|
-
def test_do()
|
8
|
+
def test_do
|
6
9
|
downloader = Apt::Spy2::Downloader.new
|
7
|
-
data = downloader.do_download(
|
8
|
-
assert(!data.empty?,
|
10
|
+
data = downloader.do_download('http://mirrors.ubuntu.com/DE.txt')
|
11
|
+
assert(!data.empty?, 'There should have been a response, unless the mirrors are down.')
|
9
12
|
end
|
10
13
|
|
11
|
-
def test_do_wrong_countrys
|
14
|
+
def test_do_wrong_countrys
|
12
15
|
downloader = Apt::Spy2::Downloader.new
|
13
|
-
assert_raises(RuntimeError) { downloader.do_download(
|
16
|
+
assert_raises(RuntimeError) { downloader.do_download('http://mirrors.ubuntu.com/de.txt') }
|
14
17
|
end
|
15
18
|
end
|
data/tests/launchpad_test.rb
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/launchpad'
|
5
|
+
|
6
|
+
# test to confirm launchpad format (HTML) is parsed
|
3
7
|
class LaunchpadTest < Minitest::Test
|
4
8
|
def setup
|
5
|
-
@download_fixture = File.read(File.expand_path(File.dirname(__FILE__)
|
9
|
+
@download_fixture = File.read(File.expand_path("#{File.dirname(__FILE__)}/fixtures/launchpad.html"))
|
6
10
|
end
|
7
11
|
|
8
12
|
def test_german_mirrors
|
9
13
|
lp = Apt::Spy2::Launchpad.new(@download_fixture)
|
10
|
-
mirrors = lp.
|
14
|
+
mirrors = lp.mirrors('Germany')
|
11
15
|
assert_equal(false, mirrors.empty?)
|
12
16
|
end
|
13
17
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/ubuntu_mirrors'
|
5
|
+
|
6
|
+
# test to confirm launchpad format (HTML) is parsed
|
7
|
+
class UbuntuMirrorsTest < Minitest::Test
|
8
|
+
def test_mirrors
|
9
|
+
expected = ['http://example.org', 'http://example.de']
|
10
|
+
fixture = expected.join("\n")
|
11
|
+
|
12
|
+
m = Apt::Spy2::UbuntuMirrors.new(fixture)
|
13
|
+
assert_equal(expected, m.mirrors('country'))
|
14
|
+
end
|
15
|
+
end
|
data/tests/url_test.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/url'
|
5
|
+
|
6
|
+
# test to check request lib
|
7
|
+
class UrlTest < Minitest::Test
|
8
|
+
def test_non_strict
|
9
|
+
expected = 'http://example.org'
|
10
|
+
|
11
|
+
url = Apt::Spy2::Url.new(false)
|
12
|
+
assert_equal(expected, url.adjust!(expected))
|
13
|
+
end
|
14
|
+
|
15
|
+
# def strict
|
16
|
+
# skip "Test only runs on ubuntu" if OS.unix? and not OS.mac?
|
17
|
+
|
18
|
+
# expected = 'http://example.org'
|
19
|
+
|
20
|
+
# url = Apt::Spy2::Url.new(true)
|
21
|
+
# assert_not_equal(expected, url.mirror)
|
22
|
+
# end
|
23
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../test_helper'
|
4
|
+
require_relative '../lib/apt/spy2/writer'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
# test to check request lib
|
8
|
+
class WriterTest < Minitest::Test
|
9
|
+
def test_json
|
10
|
+
fixture = { 'mirror': 'http://example.org', 'status': 'up' }
|
11
|
+
|
12
|
+
w = Apt::Spy2::Writer.new('json')
|
13
|
+
w.echo(fixture)
|
14
|
+
|
15
|
+
# json string
|
16
|
+
j = w.to_json
|
17
|
+
|
18
|
+
assert_equal(true, w.json?)
|
19
|
+
assert_equal(true, j.is_a?(String))
|
20
|
+
assert_equal(true, JSON.parse(j).is_a?(Array))
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_no_json
|
24
|
+
w = Apt::Spy2::Writer.new('shell')
|
25
|
+
assert_equal(false, w.json?)
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,77 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apt-spy2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- till
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: colored
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.2'
|
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:
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.14.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.14.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
- - "<"
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: '1.13'
|
61
|
+
version: 0.18.1
|
65
62
|
type: :runtime
|
66
63
|
prerelease: false
|
67
64
|
version_requirements: !ruby/object:Gem::Requirement
|
68
65
|
requirements:
|
69
66
|
- - ">="
|
70
67
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
-
- - "<"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.13'
|
68
|
+
version: 0.18.1
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: bundler
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +80,20 @@ dependencies:
|
|
86
80
|
- - "~>"
|
87
81
|
- !ruby/object:Gem::Version
|
88
82
|
version: '2.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 5.15.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 5.15.0
|
89
97
|
- !ruby/object:Gem::Dependency
|
90
98
|
name: rake
|
91
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,19 +109,19 @@ dependencies:
|
|
101
109
|
- !ruby/object:Gem::Version
|
102
110
|
version: '0'
|
103
111
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
112
|
+
name: rubocop
|
105
113
|
requirement: !ruby/object:Gem::Requirement
|
106
114
|
requirements:
|
107
|
-
- - "
|
115
|
+
- - ">="
|
108
116
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
117
|
+
version: '0'
|
110
118
|
type: :development
|
111
119
|
prerelease: false
|
112
120
|
version_requirements: !ruby/object:Gem::Requirement
|
113
121
|
requirements:
|
114
|
-
- - "
|
122
|
+
- - ">="
|
115
123
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
124
|
+
version: '0'
|
117
125
|
- !ruby/object:Gem::Dependency
|
118
126
|
name: simplecov
|
119
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,6 +160,7 @@ extra_rdoc_files: []
|
|
152
160
|
files:
|
153
161
|
- ".dockerignore"
|
154
162
|
- ".github/dependabot.yml"
|
163
|
+
- ".github/workflows/codeql-analysis.yml"
|
155
164
|
- ".github/workflows/pr.yml"
|
156
165
|
- ".github/workflows/release.yml"
|
157
166
|
- ".gitignore"
|
@@ -170,19 +179,25 @@ files:
|
|
170
179
|
- lib/apt/spy2/country.rb
|
171
180
|
- lib/apt/spy2/downloader.rb
|
172
181
|
- lib/apt/spy2/launchpad.rb
|
182
|
+
- lib/apt/spy2/request.rb
|
173
183
|
- lib/apt/spy2/ubuntu_mirrors.rb
|
184
|
+
- lib/apt/spy2/url.rb
|
174
185
|
- lib/apt/spy2/version.rb
|
175
186
|
- lib/apt/spy2/writer.rb
|
187
|
+
- test_helper.rb
|
176
188
|
- tests/country_test.rb
|
177
189
|
- tests/downloader_test.rb
|
178
190
|
- tests/fixtures/launchpad.html
|
179
191
|
- tests/launchpad_test.rb
|
192
|
+
- tests/ubuntu_mirrors_test.rb
|
193
|
+
- tests/url_test.rb
|
194
|
+
- tests/writer_test.rb
|
180
195
|
- var/country-names.txt
|
181
196
|
homepage: https://github.com/lagged/apt-spy2
|
182
197
|
licenses:
|
183
198
|
- BSD-2-Clause
|
184
199
|
metadata: {}
|
185
|
-
post_install_message:
|
200
|
+
post_install_message:
|
186
201
|
rdoc_options: []
|
187
202
|
require_paths:
|
188
203
|
- lib
|
@@ -190,18 +205,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
205
|
requirements:
|
191
206
|
- - ">="
|
192
207
|
- !ruby/object:Gem::Version
|
193
|
-
version: '2.
|
208
|
+
version: '2.7'
|
194
209
|
- - "<"
|
195
210
|
- !ruby/object:Gem::Version
|
196
|
-
version: '3.
|
211
|
+
version: '3.3'
|
197
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
213
|
requirements:
|
199
214
|
- - ">="
|
200
215
|
- !ruby/object:Gem::Version
|
201
216
|
version: '0'
|
202
217
|
requirements: []
|
203
|
-
rubygems_version: 3.2
|
204
|
-
signing_key:
|
218
|
+
rubygems_version: 3.4.2
|
219
|
+
signing_key:
|
205
220
|
specification_version: 4
|
206
221
|
summary: apt-spy2, or apt-spy for ubuntu
|
207
222
|
test_files: []
|