gemirro 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gemirro might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/lib/gemirro/cli/server.rb +2 -0
- data/lib/gemirro/indexer.rb +35 -6
- data/lib/gemirro/version.rb +1 -1
- data/spec/gemirro/indexer_spec.rb +6 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 777922859275d6f968d483067b6c468d6796436c
|
4
|
+
data.tar.gz: c28f06747d86a8040b0003a0a92693fe3b37cd08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2282a5753a197ade52486dd5921e5983d603076c9e3f4cd27a88329f2f2f98e0032ad4a485833a1b7da16d4a1ceb1436094972e000e87b49c113642a8635c21e
|
7
|
+
data.tar.gz: acd234a81d16c6aff952f253855e8217ff42c6d2b52dd4be5c529672e35434e9d58ec841c0e1164c2a826892770626e82a9fc27bf99d42695f34820fc4222536
|
data/.travis.yml
CHANGED
data/lib/gemirro/cli/server.rb
CHANGED
@@ -106,10 +106,12 @@ Gemirro::CLI.options.command 'server' do
|
|
106
106
|
puts "#{$PROGRAM_NAME} is running"
|
107
107
|
else
|
108
108
|
puts "#{$PROGRAM_NAME} is not running"
|
109
|
+
abort
|
109
110
|
end
|
110
111
|
end
|
111
112
|
|
112
113
|
def running?(process_id)
|
114
|
+
return false if process_id.nil?
|
113
115
|
Process.getpgid(process_id.to_i) != -1
|
114
116
|
rescue Errno::ESRCH
|
115
117
|
false
|
data/lib/gemirro/indexer.rb
CHANGED
@@ -79,6 +79,13 @@ module Gemirro
|
|
79
79
|
@files = []
|
80
80
|
end
|
81
81
|
|
82
|
+
##
|
83
|
+
# Generate indices on the destination directory
|
84
|
+
#
|
85
|
+
def install_indices
|
86
|
+
install_indicies
|
87
|
+
end
|
88
|
+
|
82
89
|
##
|
83
90
|
# Generate indicies on the destination directory
|
84
91
|
#
|
@@ -134,6 +141,15 @@ module Gemirro
|
|
134
141
|
resp.body
|
135
142
|
end
|
136
143
|
|
144
|
+
##
|
145
|
+
# Build indices
|
146
|
+
#
|
147
|
+
# @return [Array]
|
148
|
+
#
|
149
|
+
def build_indices
|
150
|
+
build_indicies
|
151
|
+
end
|
152
|
+
|
137
153
|
##
|
138
154
|
# Build indicies
|
139
155
|
#
|
@@ -145,10 +161,15 @@ module Gemirro
|
|
145
161
|
::Gem::Specification.dirs = []
|
146
162
|
::Gem::Specification.all = specs
|
147
163
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
164
|
+
if ::Gem::VERSION >= '2.5.0'
|
165
|
+
build_marshal_gemspecs specs
|
166
|
+
build_modern_indices specs if @build_modern
|
167
|
+
compress_indices
|
168
|
+
else
|
169
|
+
build_marshal_gemspecs
|
170
|
+
build_modern_indicies if @build_modern
|
171
|
+
compress_indicies
|
172
|
+
end
|
152
173
|
end
|
153
174
|
|
154
175
|
##
|
@@ -221,7 +242,11 @@ module Gemirro
|
|
221
242
|
|
222
243
|
::Gem::Specification.dirs = []
|
223
244
|
::Gem::Specification.all = *specs
|
224
|
-
|
245
|
+
if ::Gem::VERSION >= '2.5.0'
|
246
|
+
files = build_marshal_gemspecs specs
|
247
|
+
else
|
248
|
+
files = build_marshal_gemspecs
|
249
|
+
end
|
225
250
|
|
226
251
|
::Gem.time('Updated indexes') do
|
227
252
|
update_specs_index(released, @dest_specs_index, @specs_index)
|
@@ -233,7 +258,11 @@ module Gemirro
|
|
233
258
|
@prerelease_specs_index)
|
234
259
|
end
|
235
260
|
|
236
|
-
|
261
|
+
if ::Gem::VERSION >= '2.5.0'
|
262
|
+
compress_indices
|
263
|
+
else
|
264
|
+
compress_indicies
|
265
|
+
end
|
237
266
|
|
238
267
|
Utils.logger.info("Updating production dir #{@dest_directory}") if verbose
|
239
268
|
files << @specs_index
|
data/lib/gemirro/version.rb
CHANGED
@@ -34,7 +34,7 @@ module Gemirro
|
|
34
34
|
.to eq('bad')
|
35
35
|
end
|
36
36
|
|
37
|
-
it 'should install
|
37
|
+
it 'should install indices' do
|
38
38
|
dir = MirrorDirectory.new('/tmp')
|
39
39
|
dir.add_directory('test')
|
40
40
|
dir.add_directory('gem_generate_index/quick/Marshal.4.8')
|
@@ -89,12 +89,12 @@ module Gemirro
|
|
89
89
|
.with('/tmp/gem_generate_index/specs.4.8.gz')
|
90
90
|
.and_return(gzip_reader)
|
91
91
|
|
92
|
-
files = indexer.
|
92
|
+
files = indexer.install_indices
|
93
93
|
expect(files).to eq(['/tmp/gem_generate_index/specs.4.8.gz',
|
94
94
|
'/tmp/gem_generate_index/something.4.8.gz'])
|
95
95
|
end
|
96
96
|
|
97
|
-
it 'should build
|
97
|
+
it 'should build indices' do
|
98
98
|
indexer = Indexer.new('/')
|
99
99
|
dir = MirrorDirectory.new('/')
|
100
100
|
dir.add_directory('gems')
|
@@ -129,8 +129,9 @@ module Gemirro
|
|
129
129
|
allow(indexer).to receive(:build_marshal_gemspecs).once.and_return([
|
130
130
|
"#{indexer.directory}/quick/gemirro-0.0.1.gemspec.rz"])
|
131
131
|
allow(indexer).to receive(:compress_indicies).once.and_return(true)
|
132
|
+
allow(indexer).to receive(:compress_indices).once.and_return(true)
|
132
133
|
|
133
|
-
indexer.
|
134
|
+
indexer.build_indices
|
134
135
|
end
|
135
136
|
|
136
137
|
it 'should update index and exit ruby gems' do
|
@@ -169,6 +170,7 @@ module Gemirro
|
|
169
170
|
allow(indexer).to receive(:make_temp_directories)
|
170
171
|
allow(indexer).to receive(:update_specs_index)
|
171
172
|
allow(indexer).to receive(:compress_indicies)
|
173
|
+
allow(indexer).to receive(:compress_indices)
|
172
174
|
allow(indexer).to receive(:build_zlib_file)
|
173
175
|
allow(indexer).to receive(:build_marshal_gemspecs).once.and_return([
|
174
176
|
"#{indexer.directory}/quick/gemirro-0.0.1.gemspec.rz"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemirro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Rambaud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -289,8 +289,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
291
|
rubyforge_project:
|
292
|
-
rubygems_version: 2.4.
|
292
|
+
rubygems_version: 2.4.2
|
293
293
|
signing_key:
|
294
294
|
specification_version: 4
|
295
295
|
summary: Gem for easily creating your own gems mirror.
|
296
296
|
test_files: []
|
297
|
+
has_rdoc:
|