compact_index 0.1.0 → 0.2.0

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: 245906f9f51eec8f2921a83587840d375be27d6d
4
- data.tar.gz: de264fd5bdc08186916f0b9427f7b3e58d30677c
3
+ metadata.gz: 057af6bb8ef8c7251c6d7d22fc714db46285cd9e
4
+ data.tar.gz: 3ef2a4c6081ca4c61e1f730a8b68e6e6081d7ae2
5
5
  SHA512:
6
- metadata.gz: 4f7fd35bfbcce315c91f8efd93466b2ede5a6c85218c270a4858995d33700209556f7cfa0657b642239089f36652e5dbf9f02f31408637346574d38efd7989b7
7
- data.tar.gz: d962db2efe1f17c163335d3c578ce3360cd9bce38aa27e86f88b2c410469db317c663cededcbf3e4314271a4c874861f594b9280b6f05017e90178a98095bc67
6
+ metadata.gz: 9d7c04c51b9d424f2aa36d2c8b7d30b130c91d39fca80667ea75e561b03499279bb3e4cd5a264fd725c214712a11638c233ad31ce9c4512b415546152cb94314
7
+ data.tar.gz: b972136984bfe3e5f3fb5b4d835a0816166d37457c473552ea81e49a9a2b91ddffc8dd182593e8338c32a514e894d7c5e78d6013a9d019113f158292d06cadf0
data/.travis.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  language: ruby
2
- rvm:
3
- - 2.2.2
2
+ rvm: 2.1.5
3
+ script: bundle exec rspec
4
+ before_script: cp spec/config.yml.example spec/config.yml
5
+
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/bundler/compact_index.svg)](https://travis-ci.org/bundler/compact_index)
2
+
1
3
  # CompactIndex
2
4
 
3
5
  Backend for bundler compact index. Used by rubygems.org and bundler-api
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.9"
21
+ spec.add_dependency "sequel"
22
+ spec.add_dependency "pg"
22
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3"
23
25
  end
data/lib/compact_index.rb CHANGED
@@ -1,5 +1,34 @@
1
1
  require "compact_index/version"
2
+ require "compact_index/versions_file"
3
+ require "compact_index/gem_info"
2
4
 
3
5
  module CompactIndex
4
- # Your code goes here...
6
+ def self.names(conn)
7
+ "---\n" + GemInfo.new(conn).names.join("\n") + "\n"
8
+ end
9
+
10
+ def self.versions(conn)
11
+ VersionsFile.new(conn).with_new_gems
12
+ end
13
+
14
+ def self.info(conn, name)
15
+ output = "---\n"
16
+ name = [name] if name.kind_of? String
17
+ GemInfo.new(conn).deps_for(name).each do |row|
18
+ output << version_line(row) << "\n"
19
+ end
20
+ output
21
+ end
22
+
23
+ private
24
+ def self.version_line(row)
25
+ deps = row[:dependencies].map do |d|
26
+ [d.first, d.last.gsub(/, /, "&")].join(":")
27
+ end
28
+
29
+ line = row[:number].to_s
30
+ line << "-#{row[:platform]}" unless row[:platform] == "ruby"
31
+ line << " " << deps.join(",") if deps.any?
32
+ line
33
+ end
5
34
  end
@@ -1,3 +1,3 @@
1
1
  module CompactIndex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -15,7 +15,7 @@ class CompactIndex::VersionsFile
15
15
  end
16
16
 
17
17
  def create
18
- content = Time.now.to_i.to_s
18
+ content = "created_at: #{Time.now.iso8601}"
19
19
  content += "\n---\n"
20
20
  content += gems_for_new_file
21
21
 
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compact_index
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fotanus@gmail.com
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-21 00:00:00.000000000 Z
11
+ date: 2015-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: sequel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
20
- type: :development
19
+ version: '0'
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pg
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: '1.9'
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,20 @@ dependencies:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
54
  version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3'
41
69
  description:
42
70
  email:
43
71
  - Felipe Tanus
@@ -67,7 +95,6 @@ files:
67
95
  - lib/compact_index/gem_info.rb
68
96
  - lib/compact_index/version.rb
69
97
  - lib/compact_index/versions_file.rb
70
- - versions.list
71
98
  homepage: https://github.com/bundler/compact_index
72
99
  licenses:
73
100
  - MIT
data/versions.list DELETED
@@ -1,4 +0,0 @@
1
- 1433423251
2
- ---
3
- a 0.0.1
4
- b 0.0.2,0.1.1-java,0.1.2