apt-spy2 0.4.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ require 'apt/spy2/launchpad'
2
+
3
+ class LaunchpadTest < Minitest::Test
4
+ def setup
5
+ @download_fixture = File.read(File.expand_path(File.dirname(__FILE__) + "/fixtures/launchpad.html"))
6
+ end
7
+
8
+ def test_german_mirrors
9
+ lp = Apt::Spy2::Launchpad.new(@download_fixture)
10
+ mirrors = lp.get_mirrors('Germany')
11
+ assert_equal(false, mirrors.empty?)
12
+ end
13
+ end
@@ -0,0 +1,250 @@
1
+ Country Name;ISO 3166-1-alpha-2 code
2
+ AFGHANISTAN;AF
3
+ ÅLAND ISLANDS;AX
4
+ ALBANIA;AL
5
+ ALGERIA;DZ
6
+ AMERICAN SAMOA;AS
7
+ ANDORRA;AD
8
+ ANGOLA;AO
9
+ ANGUILLA;AI
10
+ ANTARCTICA;AQ
11
+ ANTIGUA AND BARBUDA;AG
12
+ ARGENTINA;AR
13
+ ARMENIA;AM
14
+ ARUBA;AW
15
+ AUSTRALIA;AU
16
+ AUSTRIA;AT
17
+ AZERBAIJAN;AZ
18
+ BAHAMAS;BS
19
+ BAHRAIN;BH
20
+ BANGLADESH;BD
21
+ BARBADOS;BB
22
+ BELARUS;BY
23
+ BELGIUM;BE
24
+ BELIZE;BZ
25
+ BENIN;BJ
26
+ BERMUDA;BM
27
+ BHUTAN;BT
28
+ BOLIVIA, PLURINATIONAL STATE OF;BO
29
+ BONAIRE, SINT EUSTATIUS AND SABA;BQ
30
+ BOSNIA AND HERZEGOVINA;BA
31
+ BOTSWANA;BW
32
+ BOUVET ISLAND;BV
33
+ BRAZIL;BR
34
+ BRITISH INDIAN OCEAN TERRITORY;IO
35
+ BRUNEI DARUSSALAM;BN
36
+ BULGARIA;BG
37
+ BURKINA FASO;BF
38
+ BURUNDI;BI
39
+ CAMBODIA;KH
40
+ CAMEROON;CM
41
+ CANADA;CA
42
+ CAPE VERDE;CV
43
+ CAYMAN ISLANDS;KY
44
+ CENTRAL AFRICAN REPUBLIC;CF
45
+ CHAD;TD
46
+ CHILE;CL
47
+ CHINA;CN
48
+ CHRISTMAS ISLAND;CX
49
+ COCOS (KEELING) ISLANDS;CC
50
+ COLOMBIA;CO
51
+ COMOROS;KM
52
+ CONGO;CG
53
+ CONGO, THE DEMOCRATIC REPUBLIC OF THE;CD
54
+ COOK ISLANDS;CK
55
+ COSTA RICA;CR
56
+ CÔTE D'IVOIRE;CI
57
+ CROATIA;HR
58
+ CUBA;CU
59
+ CURAÇAO;CW
60
+ CYPRUS;CY
61
+ CZECH REPUBLIC;CZ
62
+ DENMARK;DK
63
+ DJIBOUTI;DJ
64
+ DOMINICA;DM
65
+ DOMINICAN REPUBLIC;DO
66
+ ECUADOR;EC
67
+ EGYPT;EG
68
+ EL SALVADOR;SV
69
+ EQUATORIAL GUINEA;GQ
70
+ ERITREA;ER
71
+ ESTONIA;EE
72
+ ETHIOPIA;ET
73
+ FALKLAND ISLANDS (MALVINAS);FK
74
+ FAROE ISLANDS;FO
75
+ FIJI;FJ
76
+ FINLAND;FI
77
+ FRANCE;FR
78
+ FRENCH GUIANA;GF
79
+ FRENCH POLYNESIA;PF
80
+ FRENCH SOUTHERN TERRITORIES;TF
81
+ GABON;GA
82
+ GAMBIA;GM
83
+ GEORGIA;GE
84
+ GERMANY;DE
85
+ GHANA;GH
86
+ GIBRALTAR;GI
87
+ GREECE;GR
88
+ GREENLAND;GL
89
+ GRENADA;GD
90
+ GUADELOUPE;GP
91
+ GUAM;GU
92
+ GUATEMALA;GT
93
+ GUERNSEY;GG
94
+ GUINEA;GN
95
+ GUINEA-BISSAU;GW
96
+ GUYANA;GY
97
+ HAITI;HT
98
+ HEARD ISLAND AND MCDONALD ISLANDS;HM
99
+ HOLY SEE (VATICAN CITY STATE);VA
100
+ HONDURAS;HN
101
+ HONG KONG;HK
102
+ HUNGARY;HU
103
+ ICELAND;IS
104
+ INDIA;IN
105
+ INDONESIA;ID
106
+ IRAN, ISLAMIC REPUBLIC OF;IR
107
+ IRAQ;IQ
108
+ IRELAND;IE
109
+ ISLE OF MAN;IM
110
+ ISRAEL;IL
111
+ ITALY;IT
112
+ JAMAICA;JM
113
+ JAPAN;JP
114
+ JERSEY;JE
115
+ JORDAN;JO
116
+ KAZAKHSTAN;KZ
117
+ KENYA;KE
118
+ KIRIBATI;KI
119
+ KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF;KP
120
+ KOREA, REPUBLIC OF;KR
121
+ KUWAIT;KW
122
+ KYRGYZSTAN;KG
123
+ LAO PEOPLE'S DEMOCRATIC REPUBLIC;LA
124
+ LATVIA;LV
125
+ LEBANON;LB
126
+ LESOTHO;LS
127
+ LIBERIA;LR
128
+ LIBYA;LY
129
+ LIECHTENSTEIN;LI
130
+ LITHUANIA;LT
131
+ LUXEMBOURG;LU
132
+ MACAO;MO
133
+ MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF;MK
134
+ MADAGASCAR;MG
135
+ MALAWI;MW
136
+ MALAYSIA;MY
137
+ MALDIVES;MV
138
+ MALI;ML
139
+ MALTA;MT
140
+ MARSHALL ISLANDS;MH
141
+ MARTINIQUE;MQ
142
+ MAURITANIA;MR
143
+ MAURITIUS;MU
144
+ MAYOTTE;YT
145
+ MEXICO;MX
146
+ MICRONESIA, FEDERATED STATES OF;FM
147
+ MOLDOVA, REPUBLIC OF;MD
148
+ MONACO;MC
149
+ MONGOLIA;MN
150
+ MONTENEGRO;ME
151
+ MONTSERRAT;MS
152
+ MOROCCO;MA
153
+ MOZAMBIQUE;MZ
154
+ MYANMAR;MM
155
+ NAMIBIA;NA
156
+ NAURU;NR
157
+ NEPAL;NP
158
+ NETHERLANDS;NL
159
+ NEW CALEDONIA;NC
160
+ NEW ZEALAND;NZ
161
+ NICARAGUA;NI
162
+ NIGER;NE
163
+ NIGERIA;NG
164
+ NIUE;NU
165
+ NORFOLK ISLAND;NF
166
+ NORTHERN MARIANA ISLANDS;MP
167
+ NORWAY;NO
168
+ OMAN;OM
169
+ PAKISTAN;PK
170
+ PALAU;PW
171
+ PALESTINE, STATE OF;PS
172
+ PANAMA;PA
173
+ PAPUA NEW GUINEA;PG
174
+ PARAGUAY;PY
175
+ PERU;PE
176
+ PHILIPPINES;PH
177
+ PITCAIRN;PN
178
+ POLAND;PL
179
+ PORTUGAL;PT
180
+ PUERTO RICO;PR
181
+ QATAR;QA
182
+ RÉUNION;RE
183
+ ROMANIA;RO
184
+ RUSSIAN FEDERATION;RU
185
+ RWANDA;RW
186
+ SAINT BARTHÉLEMY;BL
187
+ SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA;SH
188
+ SAINT KITTS AND NEVIS;KN
189
+ SAINT LUCIA;LC
190
+ SAINT MARTIN (FRENCH PART);MF
191
+ SAINT PIERRE AND MIQUELON;PM
192
+ SAINT VINCENT AND THE GRENADINES;VC
193
+ SAMOA;WS
194
+ SAN MARINO;SM
195
+ SAO TOME AND PRINCIPE;ST
196
+ SAUDI ARABIA;SA
197
+ SENEGAL;SN
198
+ SERBIA;RS
199
+ SEYCHELLES;SC
200
+ SIERRA LEONE;SL
201
+ SINGAPORE;SG
202
+ SINT MAARTEN (DUTCH PART);SX
203
+ SLOVAKIA;SK
204
+ SLOVENIA;SI
205
+ SOLOMON ISLANDS;SB
206
+ SOMALIA;SO
207
+ SOUTH AFRICA;ZA
208
+ SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS;GS
209
+ SOUTH SUDAN;SS
210
+ SPAIN;ES
211
+ SRI LANKA;LK
212
+ SUDAN;SD
213
+ SURINAME;SR
214
+ SVALBARD AND JAN MAYEN;SJ
215
+ SWAZILAND;SZ
216
+ SWEDEN;SE
217
+ SWITZERLAND;CH
218
+ SYRIAN ARAB REPUBLIC;SY
219
+ TAIWAN, PROVINCE OF CHINA;TW
220
+ TAJIKISTAN;TJ
221
+ TANZANIA, UNITED REPUBLIC OF;TZ
222
+ THAILAND;TH
223
+ TIMOR-LESTE;TL
224
+ TOGO;TG
225
+ TOKELAU;TK
226
+ TONGA;TO
227
+ TRINIDAD AND TOBAGO;TT
228
+ TUNISIA;TN
229
+ TURKEY;TR
230
+ TURKMENISTAN;TM
231
+ TURKS AND CAICOS ISLANDS;TC
232
+ TUVALU;TV
233
+ UGANDA;UG
234
+ UKRAINE;UA
235
+ UNITED ARAB EMIRATES;AE
236
+ UNITED KINGDOM;GB
237
+ UNITED STATES;US
238
+ UNITED STATES MINOR OUTLYING ISLANDS;UM
239
+ URUGUAY;UY
240
+ UZBEKISTAN;UZ
241
+ VANUATU;VU
242
+ VENEZUELA, BOLIVARIAN REPUBLIC OF;VE
243
+ VIET NAM;VN
244
+ VIRGIN ISLANDS, BRITISH;VG
245
+ VIRGIN ISLANDS, U.S.;VI
246
+ WALLIS AND FUTUNA;WF
247
+ WESTERN SAHARA;EH
248
+ YEMEN;YE
249
+ ZAMBIA;ZM
250
+ ZIMBABWE;ZW
metadata CHANGED
@@ -1,96 +1,147 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apt-spy2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 0.7.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - till
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-29 00:00:00.000000000 Z
11
+ date: 2021-12-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: thor
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.18.1
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.18.1
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: colored
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '1.2'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '1.2'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: json
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: nokogiri
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '1.13'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '1.6'
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.13'
62
75
  - !ruby/object:Gem::Dependency
63
76
  name: bundler
64
77
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
78
  requirements:
67
- - - ~>
79
+ - - "~>"
68
80
  - !ruby/object:Gem::Version
69
- version: '1.3'
81
+ version: '2.0'
70
82
  type: :development
71
83
  prerelease: false
72
84
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
85
  requirements:
75
- - - ~>
86
+ - - "~>"
76
87
  - !ruby/object:Gem::Version
77
- version: '1.3'
88
+ version: '2.0'
78
89
  - !ruby/object:Gem::Dependency
79
90
  name: rake
80
91
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
92
  requirements:
83
- - - ! '>='
93
+ - - ">="
84
94
  - !ruby/object:Gem::Version
85
95
  version: '0'
86
96
  type: :development
87
97
  prerelease: false
88
98
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
99
  requirements:
91
- - - ! '>='
100
+ - - ">="
92
101
  - !ruby/object:Gem::Version
93
102
  version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: minitest
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: 5.15.0
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: 5.15.0
117
+ - !ruby/object:Gem::Dependency
118
+ name: simplecov
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '0.18'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '0.18'
131
+ - !ruby/object:Gem::Dependency
132
+ name: simplecov-lcov
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: 0.8.0
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: 0.8.0
94
145
  description: Keep your /etc/apt/sources.list up to date
95
146
  email:
96
147
  - till@php.net
@@ -99,40 +150,53 @@ executables:
99
150
  extensions: []
100
151
  extra_rdoc_files: []
101
152
  files:
102
- - .gitignore
153
+ - ".dockerignore"
154
+ - ".github/dependabot.yml"
155
+ - ".github/workflows/pr.yml"
156
+ - ".gitignore"
157
+ - ".ruby_version"
158
+ - CONTRIBUTING.md
159
+ - Dockerfile
103
160
  - Gemfile
104
161
  - Gemfile.lock
162
+ - LICENSE
163
+ - Makefile
105
164
  - README.md
106
165
  - Rakefile
107
- - Vagrantfile
108
166
  - apt-spy2.gemspec
109
167
  - bin/apt-spy2
110
168
  - lib/apt/spy2.rb
169
+ - lib/apt/spy2/country.rb
170
+ - lib/apt/spy2/downloader.rb
171
+ - lib/apt/spy2/launchpad.rb
172
+ - lib/apt/spy2/ubuntu_mirrors.rb
111
173
  - lib/apt/spy2/version.rb
112
174
  - lib/apt/spy2/writer.rb
175
+ - tests/country_test.rb
176
+ - tests/fixtures/launchpad.html
177
+ - tests/launchpad_test.rb
178
+ - var/country-names.txt
113
179
  homepage: https://github.com/lagged/apt-spy2
114
180
  licenses:
115
- - BSD
116
- post_install_message:
181
+ - BSD-2-Clause
182
+ metadata: {}
183
+ post_install_message:
117
184
  rdoc_options: []
118
185
  require_paths:
119
186
  - lib
120
187
  required_ruby_version: !ruby/object:Gem::Requirement
121
- none: false
122
188
  requirements:
123
- - - ! '>='
189
+ - - ">="
124
190
  - !ruby/object:Gem::Version
125
191
  version: '0'
126
192
  required_rubygems_version: !ruby/object:Gem::Requirement
127
- none: false
128
193
  requirements:
129
- - - ! '>='
194
+ - - ">="
130
195
  - !ruby/object:Gem::Version
131
196
  version: '0'
132
197
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 1.8.23
135
- signing_key:
136
- specification_version: 3
198
+ rubygems_version: 3.2.32
199
+ signing_key:
200
+ specification_version: 4
137
201
  summary: apt-spy2, or apt-spy for ubuntu
138
202
  test_files: []
data/Vagrantfile DELETED
@@ -1,11 +0,0 @@
1
- Vagrant::Config.run do |config|
2
-
3
- config.vm.box = "precise64"
4
- config.vm.box_url = "http://dl.dropbox.com/u/1537815/precise64.box"
5
-
6
- config.vm.customize [
7
- "modifyvm", :id,
8
- "--name", "apt-spy2 testbox",
9
- "--memory", "128"
10
- ]
11
- end