compact_index 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/compact_index.rb +2 -3
- data/lib/compact_index/version.rb +1 -1
- data/lib/compact_index/versions_file.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6492761458b50fdbcb83b689108a86cb615a92d
|
4
|
+
data.tar.gz: 004af9c6c3d5ab2d3b34d31681a3e37eceaacabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80543b634e539cc4027c0242b156416f4ca24d810ce62357808d30c3a8fa58547a4459016695fd7593d574b1a3d1a26e2af47bf0e38b634d82f3b7988c6e1d67
|
7
|
+
data.tar.gz: 65230c95d25f3f4c51f0caf6805cd516ed51c67b6dd6a2e82179fb569fb607cda69d8e1ab89e0eed3e97708ae80b7435da593cacf98eb242c76526560e4ef9b1
|
data/lib/compact_index.rb
CHANGED
@@ -7,8 +7,7 @@ module CompactIndex
|
|
7
7
|
"---\n" + gem_names.join("\n") + "\n"
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.versions(
|
11
|
-
versions_file = VersionsFile.new(path)
|
10
|
+
def self.versions(versions_file, gems)
|
12
11
|
versions_file.contents(gems)
|
13
12
|
end
|
14
13
|
|
@@ -28,7 +27,7 @@ module CompactIndex
|
|
28
27
|
[
|
29
28
|
d[:gem],
|
30
29
|
d[:version].gsub(/, /, "&")
|
31
|
-
].join
|
30
|
+
].join(':')
|
32
31
|
end
|
33
32
|
else
|
34
33
|
deps = []
|
@@ -41,11 +41,11 @@ class CompactIndex::VersionsFile
|
|
41
41
|
|
42
42
|
def format_by_created_time(gems)
|
43
43
|
by_created_at = {}
|
44
|
-
gems.each do |
|
45
|
-
|
44
|
+
gems.each do |name, versions|
|
45
|
+
versions.each do |v|
|
46
46
|
by_created_at[v[:created_at]] ||= {}
|
47
|
-
by_created_at[v[:created_at]][
|
48
|
-
by_created_at[v[:created_at]][
|
47
|
+
by_created_at[v[:created_at]][name] ||= []
|
48
|
+
by_created_at[v[:created_at]][name] << v[:number]
|
49
49
|
end
|
50
50
|
end
|
51
51
|
by_created_at.sort.map do |_,gems|
|