gemstash 1.0.3 → 1.0.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/lib/gemstash/db/version.rb +11 -2
- data/lib/gemstash/gem_source/private_source.rb +5 -4
- data/lib/gemstash/specs_builder.rb +11 -3
- data/lib/gemstash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c86611f04efabc000653d70884cd2cad313b98a
|
4
|
+
data.tar.gz: 9d720ecfb8eafa60ec05829d8beb2c92b50b88c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99decbbafb9c1062cbdd600f7e45cec081121f6925dd4171ed2304899e102cb134805e1dd23182c2f6987406346663a19c9db49cbc3d95c6cbb781027a21bc6a
|
7
|
+
data.tar.gz: 05de14fa477ee16db9c0c1f249cf6c1efad0e5f1785a5154ae9e1ad23fcc3b5cde465cc9b24218132ca39fcda7cf28ebe1f243abf3d53cc2a67aae07204ff431
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 1.0.4 (2017-01-27)
|
2
|
+
|
3
|
+
### Features
|
4
|
+
|
5
|
+
- Backport `latest_specs.4.8.gz` endpoint for private gems to the 1.0 branch ([#134](https://github.com/bundler/gemstash/pull/134), [@randycoulman](https://github.com/randycoulman), [@smellsblue](https://github.com/smellsblue))
|
6
|
+
- Improve CHANGELOG generation and prepare for `1.0.4` release ([#135](https://github.com/bundler/gemstash/pull/135), [@smellsblue](https://github.com/smellsblue))
|
7
|
+
|
1
8
|
## 1.0.3 (2016-10-15)
|
2
9
|
|
3
10
|
### Bugfixes
|
@@ -16,6 +23,7 @@
|
|
16
23
|
- Fix broken JRuby build ([#91](https://github.com/bundler/gemstash/pull/91), [@smellsblue](https://github.com/smellsblue))
|
17
24
|
- Drop www.rubygems.org in favor of rubygems.org ([#101](https://github.com/bundler/gemstash/pull/101), [@smellsblue](https://github.com/smellsblue))
|
18
25
|
- Redirect /versions and /info/* to index.rubygems.org ([#102](https://github.com/bundler/gemstash/pull/102), [@smellsblue](https://github.com/smellsblue))
|
26
|
+
- Backports to the 1.0 branch ([#103](https://github.com/bundler/gemstash/pull/103), [@smellsblue](https://github.com/smellsblue))
|
19
27
|
|
20
28
|
## 1.0.1 (2016-02-23)
|
21
29
|
|
@@ -79,3 +87,27 @@
|
|
79
87
|
- Push, yank, and unyank private gems
|
80
88
|
- Zero setup dependencies
|
81
89
|
- Optionally use Memcached for caching or PostgreSQL for the database
|
90
|
+
- Pull strategies and storage from bundler-api ([#5](https://github.com/bundler/gemstash/pull/5), [@pcarranza](https://github.com/pcarranza))
|
91
|
+
- Defer db connection test until sqlite db file exists ([#8](https://github.com/bundler/gemstash/pull/8), [@carpodaster](https://github.com/carpodaster))
|
92
|
+
- Integration specs ([#9](https://github.com/bundler/gemstash/pull/9), [@smellsblue](https://github.com/smellsblue))
|
93
|
+
- Logging all the things to a file ([#10](https://github.com/bundler/gemstash/pull/10), [@pcarranza](https://github.com/pcarranza))
|
94
|
+
- Gem sources ([#11](https://github.com/bundler/gemstash/pull/11), [@smellsblue](https://github.com/smellsblue))
|
95
|
+
- Forward http user agent to the upstream server ([#23](https://github.com/bundler/gemstash/pull/23), [@pcarranza](https://github.com/pcarranza))
|
96
|
+
- Documentation ([#25](https://github.com/bundler/gemstash/pull/25), [@smellsblue](https://github.com/smellsblue), [@pcarranza](https://github.com/pcarranza))
|
97
|
+
- Avoid filesystem limits using a trie ([#26](https://github.com/bundler/gemstash/pull/26), [@smellsblue](https://github.com/smellsblue))
|
98
|
+
- A few tweaks: enable setting the host to bind to, and reduced access for some attributes ([#28](https://github.com/bundler/gemstash/pull/28), [@pcarranza](https://github.com/pcarranza))
|
99
|
+
- Handle upstream connection error correctly and die with dignity ([#29](https://github.com/bundler/gemstash/pull/29), [@pcarranza](https://github.com/pcarranza))
|
100
|
+
- Add many ruby versions to travis configuration ([#31](https://github.com/bundler/gemstash/pull/31), [@pcarranza](https://github.com/pcarranza))
|
101
|
+
- Add rubygems version enforcement ([#32](https://github.com/bundler/gemstash/pull/32), [@pcarranza](https://github.com/pcarranza))
|
102
|
+
- Older RubyGems and Ruby 2.0.0 ([#33](https://github.com/bundler/gemstash/pull/33), [@smellsblue](https://github.com/smellsblue))
|
103
|
+
- Various fixes ([#34](https://github.com/bundler/gemstash/pull/34), [@smellsblue](https://github.com/smellsblue))
|
104
|
+
- Yanking gems ([#36](https://github.com/bundler/gemstash/pull/36), [@smellsblue](https://github.com/smellsblue))
|
105
|
+
- Use Sequel::Model ([#37](https://github.com/bundler/gemstash/pull/37), [@smellsblue](https://github.com/smellsblue))
|
106
|
+
- Build against JRuby ([#38](https://github.com/bundler/gemstash/pull/38), [@smellsblue](https://github.com/smellsblue))
|
107
|
+
- Unyanking gems ([#39](https://github.com/bundler/gemstash/pull/39), [@smellsblue](https://github.com/smellsblue))
|
108
|
+
- Add status command ([#40](https://github.com/bundler/gemstash/pull/40), [@smellsblue](https://github.com/smellsblue))
|
109
|
+
- Cache if gem is indexed in Gemstash::Storage ([#44](https://github.com/bundler/gemstash/pull/44), [@smellsblue](https://github.com/smellsblue))
|
110
|
+
- Full index bundling ([#45](https://github.com/bundler/gemstash/pull/45), [@smellsblue](https://github.com/smellsblue))
|
111
|
+
- Various fixes 2 ([#47](https://github.com/bundler/gemstash/pull/47), [@smellsblue](https://github.com/smellsblue))
|
112
|
+
- Various fixes 3 ([#49](https://github.com/bundler/gemstash/pull/49), [@smellsblue](https://github.com/smellsblue))
|
113
|
+
- Add Gemtash logo ([#50](https://github.com/bundler/gemstash/pull/50), [@jonathanrieta](https://github.com/jonathanrieta))
|
data/lib/gemstash/db/version.rb
CHANGED
@@ -19,8 +19,17 @@ module Gemstash
|
|
19
19
|
[rubygem.name, Gem::Version.new(number), platform]
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.for_spec_collection(prerelease: false)
|
23
|
-
where(indexed: true, prerelease: prerelease).association_join(:rubygem)
|
22
|
+
def self.for_spec_collection(prerelease: false, latest: false)
|
23
|
+
versions = where(indexed: true, prerelease: prerelease).association_join(:rubygem)
|
24
|
+
latest ? select_latest(versions) : versions
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.select_latest(versions)
|
28
|
+
versions.
|
29
|
+
all.
|
30
|
+
group_by {|version| [version.rubygem_id, version.platform] }.
|
31
|
+
values.
|
32
|
+
map {|gem_versions| gem_versions.max_by {|version| Gem::Version.new(version.number) } }
|
24
33
|
end
|
25
34
|
|
26
35
|
def self.find_by_spec(gem_id, spec)
|
@@ -85,15 +85,16 @@ module Gemstash
|
|
85
85
|
gem.content(:gem)
|
86
86
|
end
|
87
87
|
|
88
|
-
def serve_latest_specs
|
89
|
-
halt 403, "Not yet supported"
|
90
|
-
end
|
91
|
-
|
92
88
|
def serve_specs
|
93
89
|
content_type "application/octet-stream"
|
94
90
|
Gemstash::SpecsBuilder.all
|
95
91
|
end
|
96
92
|
|
93
|
+
def serve_latest_specs
|
94
|
+
content_type "application/octet-stream"
|
95
|
+
Gemstash::SpecsBuilder.latest
|
96
|
+
end
|
97
|
+
|
97
98
|
def serve_prerelease_specs
|
98
99
|
content_type "application/octet-stream"
|
99
100
|
Gemstash::SpecsBuilder.prerelease
|
@@ -20,14 +20,20 @@ module Gemstash
|
|
20
20
|
new(prerelease: true).build
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.latest
|
24
|
+
new(latest: true).build
|
25
|
+
end
|
26
|
+
|
23
27
|
def self.invalidate_stored
|
24
28
|
storage = Gemstash::Storage.for("private").for("specs_collection")
|
25
29
|
storage.resource("specs.4.8.gz").delete(:specs)
|
30
|
+
storage.resource("latest_specs.4.8.gz").delete(:specs)
|
26
31
|
storage.resource("prerelease_specs.4.8.gz").delete(:specs)
|
27
32
|
end
|
28
33
|
|
29
|
-
def initialize(prerelease: false)
|
34
|
+
def initialize(prerelease: false, latest: false)
|
30
35
|
@prerelease = prerelease
|
36
|
+
@latest = latest
|
31
37
|
end
|
32
38
|
|
33
39
|
def build
|
@@ -47,7 +53,9 @@ module Gemstash
|
|
47
53
|
end
|
48
54
|
|
49
55
|
def fetch_resource
|
50
|
-
if @
|
56
|
+
if @latest
|
57
|
+
storage.resource("latest_specs.4.8.gz")
|
58
|
+
elsif @prerelease
|
51
59
|
storage.resource("prerelease_specs.4.8.gz")
|
52
60
|
else
|
53
61
|
storage.resource("specs.4.8.gz")
|
@@ -64,7 +72,7 @@ module Gemstash
|
|
64
72
|
end
|
65
73
|
|
66
74
|
def fetch_versions
|
67
|
-
@versions = Gemstash::DB::Version.for_spec_collection(prerelease: @prerelease).map(&:to_spec)
|
75
|
+
@versions = Gemstash::DB::Version.for_spec_collection(prerelease: @prerelease, latest: @latest).map(&:to_spec)
|
68
76
|
end
|
69
77
|
|
70
78
|
def marshal
|
data/lib/gemstash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Arko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|