rubygems-mini_mirror 1.0.0 → 1.0.1
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.
@@ -7,17 +7,21 @@ module Gem
|
|
7
7
|
super()
|
8
8
|
end
|
9
9
|
|
10
|
+
def fetch_deps(dep)
|
11
|
+
with_sources dep.sources do
|
12
|
+
found, errors = @spec_fetcher.fetch_with_errors dep, dep.respond_to?(:all) ? dep.all? : false , false
|
13
|
+
found.each do |spec,source_uri|
|
14
|
+
next if is_in_specs?(spec)
|
15
|
+
add_to_specs(spec,source_uri)
|
16
|
+
add_to_deps(*spec.runtime_dependencies)
|
17
|
+
add_to_deps(*spec.development_dependencies) if dep.development?
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
10
22
|
def find_all_specs
|
11
23
|
@dependencies.each do |dep|
|
12
|
-
|
13
|
-
found, errors = @spec_fetcher.fetch_with_errors dep, true, false
|
14
|
-
found.each do |spec,source_uri|
|
15
|
-
next if is_in_specs?(spec)
|
16
|
-
add_to_specs(spec,source_uri)
|
17
|
-
add_to_deps(*spec.runtime_dependencies)
|
18
|
-
add_to_deps(*spec.development_dependencies) if dep.development?
|
19
|
-
end
|
20
|
-
end
|
24
|
+
fetch_deps(dep)
|
21
25
|
end
|
22
26
|
end
|
23
27
|
|
@@ -33,7 +37,7 @@ module Gem
|
|
33
37
|
def add_to_deps(*deps)
|
34
38
|
deps.each do |dep|
|
35
39
|
next if is_in_deps?(dep)
|
36
|
-
dep = Gem::MiniMirror::Dependency.new(dep.name, dep.requirement,dep.respond_to?(:sources) ? dep.sources : Gem.sources, {:development => dep.respond_to?(:development?) ? dep.development? : false})
|
40
|
+
dep = Gem::MiniMirror::Dependency === dep ? dep : Gem::MiniMirror::Dependency.new(dep.name, dep.requirement,dep.respond_to?(:sources) ? dep.sources : Gem.sources, {:development => dep.respond_to?(:development?) ? dep.development? : false})
|
37
41
|
@dependencies_list[dep.name.to_s][dep.requirement.to_s] = true
|
38
42
|
@dependencies.push(dep)
|
39
43
|
end
|
@@ -17,7 +17,7 @@ module Gem
|
|
17
17
|
@resources = []
|
18
18
|
@resources_signatures = {}
|
19
19
|
@pool = Gem::MiniMirror::Pool.new(options[:pool_size] || Gem::MiniMirror::POOL_SIZE)
|
20
|
-
@gems_dir = options[:gems_dir] || DEFAULT_GEMS_DIR
|
20
|
+
@gems_dir = File.expand_path(options[:gems_dir] || DEFAULT_GEMS_DIR)
|
21
21
|
@fetcher = Gem::MiniMirror::Fetcher.new
|
22
22
|
super
|
23
23
|
end
|
@@ -41,7 +41,7 @@ module Gem
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def existing_gems
|
44
|
-
Dir[to('gems','
|
44
|
+
Dir[to('gems','*.gem')].entries.map{|f| File.basename(f)}
|
45
45
|
end
|
46
46
|
|
47
47
|
def gems_with_sources
|
@@ -102,8 +102,6 @@ module Gem
|
|
102
102
|
find_all_specs
|
103
103
|
end
|
104
104
|
|
105
|
-
|
106
|
-
|
107
105
|
end
|
108
106
|
end
|
109
107
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-mini_mirror
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ramihajamalala Hery
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-27 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|