gemirro 0.16.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -0
- data/gemirro.gemspec +2 -1
- data/lib/gemirro.rb +9 -9
- data/lib/gemirro/gem.rb +2 -2
- data/lib/gemirro/gems_fetcher.rb +4 -2
- data/lib/gemirro/server.rb +2 -1
- data/lib/gemirro/version.rb +1 -1
- data/lib/gemirro/versions_file.rb +1 -1
- data/spec/gemirro/gems_fetcher_spec.rb +4 -3
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 809eb09ef1da4fd33100b1455f0acf3b068a97b27d4ed9f01bd72c2d6724b68d
|
4
|
+
data.tar.gz: 23334e2ba6c56dc17d0f008e1de09dbc9923d5bd61d98264751a214a71224774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 347d4a085fee470c4f9b437fc0e1d8ae486947cbda75a27d910f8695bdf49699bd31e052b8522db5d496e21ff5adb5293adb48cc46da827aa0d6b2f7d1c9f11e
|
7
|
+
data.tar.gz: 86db43bee5247cfaea9708027128756a47c4e50ef27ca130b6c9f02cc949b25a164f23b6ed66b0a47230a797b82c43f8291becd6c69b596b3cdc485d14c2aa94
|
data/.rubocop.yml
CHANGED
data/gemirro.gemspec
CHANGED
@@ -15,8 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.files = File.read(File.expand_path('../MANIFEST', __FILE__)).split("\n")
|
17
17
|
|
18
|
-
s.required_ruby_version = '>=
|
18
|
+
s.required_ruby_version = '>= 2.2'
|
19
19
|
|
20
|
+
s.add_dependency 'addressable', '~>2.5'
|
20
21
|
s.add_dependency 'builder', '~>3.2'
|
21
22
|
s.add_dependency 'confstruct', '~>1.0'
|
22
23
|
s.add_dependency 'erubis', '~>2.7'
|
data/lib/gemirro.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/user_interaction'
|
3
|
-
require 'rubygems/indexer'
|
4
|
-
require 'slop'
|
5
|
-
require 'fileutils'
|
6
|
-
require 'digest/sha2'
|
7
1
|
require 'confstruct'
|
8
|
-
require '
|
2
|
+
require 'digest/sha2'
|
3
|
+
require 'fileutils'
|
9
4
|
require 'httpclient'
|
10
|
-
require 'logger'
|
11
|
-
require 'stringio'
|
12
5
|
require 'json'
|
6
|
+
require 'logger'
|
13
7
|
require 'parallel'
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rubygems/indexer'
|
10
|
+
require 'rubygems/user_interaction'
|
11
|
+
require 'slop'
|
12
|
+
require 'stringio'
|
14
13
|
require 'tempfile'
|
14
|
+
require 'zlib'
|
15
15
|
|
16
16
|
unless $LOAD_PATH.include?(File.expand_path('../', __FILE__))
|
17
17
|
$LOAD_PATH.unshift(File.expand_path('../', __FILE__))
|
data/lib/gemirro/gem.rb
CHANGED
data/lib/gemirro/gems_fetcher.rb
CHANGED
@@ -25,7 +25,9 @@ module Gemirro
|
|
25
25
|
#
|
26
26
|
def fetch
|
27
27
|
@source.gems.each do |gem|
|
28
|
-
versions_for(gem).each do |
|
28
|
+
versions_for(gem).each do |versions|
|
29
|
+
gem.platform = versions[1] if versions
|
30
|
+
version = versions[0] if versions
|
29
31
|
if gem.gemspec?
|
30
32
|
gemfile = fetch_gemspec(gem, version)
|
31
33
|
if gemfile
|
@@ -55,7 +57,7 @@ module Gemirro
|
|
55
57
|
return [available.last] if gem.only_latest?
|
56
58
|
|
57
59
|
versions = available.select do |v|
|
58
|
-
gem.requirement.satisfied_by?(v)
|
60
|
+
gem.requirement.satisfied_by?(v[0])
|
59
61
|
end
|
60
62
|
|
61
63
|
versions = [available.last] if versions.empty?
|
data/lib/gemirro/server.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'sinatra/base'
|
2
2
|
require 'thin'
|
3
3
|
require 'uri'
|
4
|
+
require 'addressable/uri'
|
4
5
|
|
5
6
|
module Gemirro
|
6
7
|
##
|
@@ -280,7 +281,7 @@ module Gemirro
|
|
280
281
|
# @return [String]
|
281
282
|
#
|
282
283
|
def homepage(spec)
|
283
|
-
URI.parse(URI.escape(spec.homepage))
|
284
|
+
URI.parse(Addressable::URI.escape(spec.homepage))
|
284
285
|
end
|
285
286
|
end
|
286
287
|
end
|
data/lib/gemirro/version.rb
CHANGED
@@ -125,9 +125,10 @@ module Gemirro
|
|
125
125
|
it 'should retrieve versions for specific gem' do
|
126
126
|
gem = Gem.new('gemirro', '0.0.2')
|
127
127
|
allow(@versions_file).to receive(:versions_for)
|
128
|
-
.once.with('gemirro')
|
129
|
-
|
130
|
-
|
128
|
+
.once.with('gemirro')
|
129
|
+
.and_return([[::Gem::Version.new('0.0.1'), 'ruby'],
|
130
|
+
[::Gem::Version.new('0.0.2'), 'ruby']])
|
131
|
+
expect(@fetcher.versions_for(gem)).to eq([[::Gem::Version.new('0.0.2'), 'ruby']])
|
131
132
|
end
|
132
133
|
|
133
134
|
it 'should fetch all gems and log debug if gem is not satisfied' do
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemirro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Rambaud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: addressable
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.5'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: builder
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -295,7 +309,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
309
|
requirements:
|
296
310
|
- - ">="
|
297
311
|
- !ruby/object:Gem::Version
|
298
|
-
version:
|
312
|
+
version: '2.2'
|
299
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
314
|
requirements:
|
301
315
|
- - ">="
|
@@ -303,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
317
|
version: '0'
|
304
318
|
requirements: []
|
305
319
|
rubyforge_project:
|
306
|
-
rubygems_version: 2.
|
320
|
+
rubygems_version: 2.7.4
|
307
321
|
signing_key:
|
308
322
|
specification_version: 4
|
309
323
|
summary: Gem for easily creating your own gems mirror.
|