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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87fc1665041ba2af025514fe237e33f96889d2e2
4
- data.tar.gz: 9e207f65d64a0a52873c75689f32d4711b5066bd
3
+ metadata.gz: e6492761458b50fdbcb83b689108a86cb615a92d
4
+ data.tar.gz: 004af9c6c3d5ab2d3b34d31681a3e37eceaacabd
5
5
  SHA512:
6
- metadata.gz: 6d30ee18ae3e651d79c980c211dac350c72c73ab34df3ce814b3aa1c42a21ea3a6f0768cebbd7d8119f1522bc8a48305639514861fbe15875efa645c840ec121
7
- data.tar.gz: 2e3cf006537b2575f19558a815e9126f5fa4d08b23bd5f19001415449c7cfc1f668a69d812ea30d434877150cc6c9047b3ecd73319344cf694082da6c3a246a2
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(path, gems)
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 = []
@@ -1,3 +1,3 @@
1
1
  module CompactIndex
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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 |gem|
45
- gem[:versions].each do |v|
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]][gem[:name]] ||= []
48
- by_created_at[v[:created_at]][gem[:name]] << v[:number]
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|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compact_index
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fotanus@gmail.com