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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 836bd37bcd65885bdd10b4faaa752084fb15aa82
4
- data.tar.gz: 672147cad4d0d681e103a9c791fc8cd807a14365
3
+ metadata.gz: 777922859275d6f968d483067b6c468d6796436c
4
+ data.tar.gz: c28f06747d86a8040b0003a0a92693fe3b37cd08
5
5
  SHA512:
6
- metadata.gz: c416be87d6a284fcf752b39cfac3f203e291a0dc7022294a090a844acb5cdb1da829b18878f2decd553d545a5cba11c0defaa56f8062ba166ef18a6b554af229
7
- data.tar.gz: 96a558e31033dee1f7f58f84edea8c5ffbab24ee2ad0394346624abb92eb8510b4406ad294128893ba8ffc564ad01398d45741ca4de1ddcc26b57e21ca616237
6
+ metadata.gz: 2282a5753a197ade52486dd5921e5983d603076c9e3f4cd27a88329f2f2f98e0032ad4a485833a1b7da16d4a1ceb1436094972e000e87b49c113642a8635c21e
7
+ data.tar.gz: acd234a81d16c6aff952f253855e8217ff42c6d2b52dd4be5c529672e35434e9d58ec841c0e1164c2a826892770626e82a9fc27bf99d42695f34820fc4222536
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
5
4
  - 2.1.0
6
5
 
@@ -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
@@ -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
- build_marshal_gemspecs
149
- build_modern_indicies if @build_modern
150
-
151
- compress_indicies
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
- files = build_marshal_gemspecs
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
- compress_indicies
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
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Gemirro Version
3
3
  module Gemirro
4
- VERSION = '0.13.1'
4
+ VERSION = '0.13.2'
5
5
  end
@@ -34,7 +34,7 @@ module Gemirro
34
34
  .to eq('bad')
35
35
  end
36
36
 
37
- it 'should install indicies' do
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.install_indicies
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 indicies' do
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.build_indicies
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.1
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-05 00:00:00.000000000 Z
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.8
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: