geminabox 1.1.1 → 1.2.0
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/README.md +4 -0
- data/lib/geminabox/proxy/splicer.rb +3 -2
- data/lib/geminabox/server.rb +22 -0
- data/lib/geminabox/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77b89503a829fdd9920415b1ef7a814ed83c7c41c00bbb2923abb5b906d5bbff
|
4
|
+
data.tar.gz: a4a597b442efdb2b33dc4cc85f99465e8d23092bdd0775b75a634d8cca3912ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a29e0c9c9d7f60bb39c961a0c040451c709eab18bc676d1e7bb4bc8349ecd2e90b794bba87d948079eda2726aca20ec4a295d32a66cc0696bfece508bc46a8b
|
7
|
+
data.tar.gz: 2f818ce266be7f996ab7cd8094df2bc4a0d14f5e1d3aa9d7bca581a89aaa3a94e3ab1aa1e50b3e833da418cf8572b60f4cd1c6c3e470c58f881b0c2150997362
|
data/README.md
CHANGED
@@ -122,6 +122,10 @@ You can also use the gem plugin:
|
|
122
122
|
|
123
123
|
gem inabox pkg/my-awesome-gem-1.0.gem
|
124
124
|
|
125
|
+
And since version 1.2.0, Geminabox supports the standard gemcutter yank API:
|
126
|
+
|
127
|
+
gem yank my-awesome-gem -v 1.0 --host HOST
|
128
|
+
|
125
129
|
Configure Gem in a box (interactive prompt to specify where to upload to):
|
126
130
|
|
127
131
|
gem inabox -c
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'tempfile'
|
2
2
|
require 'fileutils'
|
3
|
+
require 'rubygems/util'
|
3
4
|
|
4
5
|
module Geminabox
|
5
6
|
module Proxy
|
@@ -65,11 +66,11 @@ module Geminabox
|
|
65
66
|
end
|
66
67
|
|
67
68
|
def unpackage(content)
|
68
|
-
Marshal.load(Gem.gunzip(content))
|
69
|
+
Marshal.load(Gem::Util.gunzip(content))
|
69
70
|
end
|
70
71
|
|
71
72
|
def package(content)
|
72
|
-
Gem.gzip(Marshal.dump(content))
|
73
|
+
Gem::Util.gzip(Marshal.dump(content))
|
73
74
|
end
|
74
75
|
|
75
76
|
def merge_text_content
|
data/lib/geminabox/server.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'reentrant_flock'
|
2
|
+
require 'rubygems/util'
|
2
3
|
|
3
4
|
module Geminabox
|
4
5
|
|
@@ -148,6 +149,27 @@ module Geminabox
|
|
148
149
|
|
149
150
|
end
|
150
151
|
|
152
|
+
delete '/api/v1/gems/yank' do
|
153
|
+
unless self.class.allow_delete?
|
154
|
+
error_response(403, 'Gem deletion is disabled')
|
155
|
+
end
|
156
|
+
|
157
|
+
halt 400 unless request.form_data?
|
158
|
+
|
159
|
+
serialize_update do
|
160
|
+
gems = load_gems.select { |gem| request['gem_name'] == gem.name and
|
161
|
+
request['version'] == gem.number.version }
|
162
|
+
halt 404, 'Gem not found' if gems.size == 0
|
163
|
+
gems.each do |gem|
|
164
|
+
gem_path = File.expand_path(File.join(Geminabox.data, 'gems',
|
165
|
+
"#{gem.gemfile_name}.gem"))
|
166
|
+
File.delete gem_path if File.exists? gem_path
|
167
|
+
end
|
168
|
+
self.class.reindex(:force_rebuild)
|
169
|
+
return 200, 'Yanked gem and reindexed'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
151
173
|
post '/upload' do
|
152
174
|
unless self.class.allow_upload?
|
153
175
|
error_response(403, 'Gem uploading is disabled')
|
data/lib/geminabox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminabox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Lea
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2020-03-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sinatra
|
@@ -166,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
|
-
|
170
|
-
rubygems_version: 2.7.6
|
169
|
+
rubygems_version: 3.0.3
|
171
170
|
signing_key:
|
172
171
|
specification_version: 4
|
173
172
|
summary: Really simple rubygem hosting
|