geminabox 2.1.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3afde9bba2ed91992e99d5e95ff71eb6a111d7a4b4362c1857e75a01dfdb671a
4
- data.tar.gz: 360da5ba51676bd8d78ae6139c782b52d9f83f31ca7a5497c06c6d38394fd5b9
3
+ metadata.gz: 12356dade9bded5c65e544736b210902fc950aecb8760b6d65804d8dac4046f9
4
+ data.tar.gz: 2be1eac2ca7122ce5bc5e02ef80024b06e27ed80a5e1f249787bb032f5d37ca3
5
5
  SHA512:
6
- metadata.gz: 2a2dc5c9d5109dd36b987066ec29f620e9d646dacd7a39813447b84ab03ffa6edde2bec1c50b341b1d0604d1317f740900c26f5bd72f40ba076893e00aee9b9e
7
- data.tar.gz: 44befa817d8a56f87be69c1c3ec06f75caed8c74a85e892207a5f06e43cb629da418db51eec3ac95fb081043c7066b7e64ab13edcfe5a7711a1020843f503d15
6
+ metadata.gz: 1d8018a7ba17aa3f5a206775b24810ed20a4b26028e50b6107d4f0601b2ea639d2c34039eb609661f39235727422f33a2a46e83e0ade625d1313b3210bb6d0ce
7
+ data.tar.gz: aaf7aec9ca78b79a56742843c63b4e19ba76fec05f2f2863cb2ef445c6837c6e4ac6e43912f74436cc8f40178c03cd4aed1ddcbb7ae80a79f9ea40133b76b351
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
+ [![](https://repository-images.githubusercontent.com/463074/c53c4131-3d92-42db-85b0-52f1e88c219a)](https://github.com/geminabox)
2
+
1
3
  # Gem in a Box – Really simple rubygem hosting
4
+
2
5
  [![Ruby](https://github.com/geminabox/geminabox/actions/workflows/ruby.yml/badge.svg)](https://github.com/geminabox/geminabox/actions/workflows/ruby.yml?query=branch%3Amaster)
3
6
  [![Gem Version](https://badge.fury.io/rb/geminabox.svg)](http://badge.fury.io/rb/geminabox)
4
7
  [![Code Climate](https://codeclimate.com/github/geminabox/geminabox/badges/gpa.svg)](https://codeclimate.com/github/geminabox/geminabox)
@@ -12,10 +15,16 @@ For basic auth, try [Rack::Auth](http://www.rubydoc.info/github/rack/rack/Rack/A
12
15
 
13
16
  ## System Requirements
14
17
 
15
- - Ruby 2.3 through 3.1 (Ruby 2.7, 3.0, or 3.1 is highly recommended)
16
- - RubyGems 2.4 through 3.3 (2.5.2 or higher is highly recommended)
18
+ - Ruby 2.3 through 3.4 (Ruby 3.2+ is highly recommended)
19
+ - RubyGems 2.5 or later (latest version recommended)
20
+ - **Ruby 3.3+ users:** You must also install the `rubygems-generate_index` gem.
21
+ `Gem::Indexer` was extracted from RubyGems in 3.3 and geminabox requires it
22
+ to function. Add it to your Gemfile or install it directly:
17
23
 
18
- Use RubyGems the latest version (at least 2.5.2) for as an end-user full features like [`gem yank --host`](https://github.com/rubygems/rubygems/pull/1361).
24
+ gem install rubygems-generate_index
25
+
26
+ **Note:** Ruby 2.x support is deprecated. geminabox 3.0 will require Ruby >= 3.0.
27
+ Pin to `gem 'geminabox', '~> 2.2'` if you cannot upgrade yet.
19
28
 
20
29
  ## Server Setup
21
30
 
@@ -179,6 +188,7 @@ Your Gemfile only needs:
179
188
  source 'https://rubygems.org'
180
189
 
181
190
  gem 'geminabox'
191
+ gem 'rubygems-generate_index' # Required for Ruby 3.3+
182
192
  ```
183
193
 
184
194
  From there
@@ -193,6 +203,17 @@ docker run -d -p 9292:9292 geminabox:latest
193
203
 
194
204
  Your server should now be running!
195
205
 
206
+
207
+ ## Running the tests
208
+
209
+ Running `rake` will run the complete test suite.
210
+
211
+ The test suite uses
212
+ [minitest-reporters](https://github.com/minitest-reporters/minitest-reporters)
213
+ with the default reporter. To get more detailed test output, use `rake
214
+ MINITEST_REPORTER=SpecReporter`. With this setting, output of the Geminabox
215
+ server that is started for integration tests is sent to `stdout` as well.
216
+
196
217
  ## Licence
197
218
 
198
219
  [MIT_LICENSE](./MIT-LICENSE)
@@ -15,7 +15,7 @@ module Geminabox
15
15
  when :combine_local_and_remote_gem_versions
16
16
  CombineLocalAndRemoteGemVersions
17
17
  else
18
- raise ArgumentError, "Merge strategy must be :local_gems_take_precedence_over_remote_gems (default) or :merge_local_and_remote_gem_versions"
18
+ raise ArgumentError, "Merge strategy must be :local_gems_take_precedence_over_remote_gems (default) or :combine_local_and_remote_gem_versions"
19
19
  end
20
20
  end
21
21
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'geminabox'
4
- require 'rubygems/indexer'
5
4
 
6
5
  module Geminabox::Indexer
7
6
  def self.updated_gemspecs(indexer)
@@ -164,7 +164,7 @@ module Geminabox
164
164
  gems.each do |gem|
165
165
  gem_path = File.expand_path(File.join(Geminabox.data, 'gems',
166
166
  "#{gem.gemfile_name}.gem"))
167
- File.delete gem_path if File.exists? gem_path
167
+ File.delete gem_path if File.exist? gem_path
168
168
  end
169
169
  self.class.reindex(:force_rebuild)
170
170
  return 200, 'Yanked gem and reindexed'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geminabox
4
- VERSION = '2.1.0' unless defined? VERSION
4
+ VERSION = '2.2.0' unless defined? VERSION
5
5
  end
data/lib/geminabox.rb CHANGED
@@ -5,7 +5,19 @@ require 'digest/md5'
5
5
  require 'builder'
6
6
  require 'sinatra/base'
7
7
  require 'rubygems/user_interaction'
8
- require 'rubygems/indexer'
8
+ # Gem::Indexer was extracted from RubyGems in 3.3+.
9
+ # On Ruby 3.3+, require the rubygems-generate_index gem instead.
10
+ begin
11
+ require 'rubygems/indexer'
12
+ rescue LoadError
13
+ begin
14
+ require 'rubygems-generate_index'
15
+ rescue LoadError
16
+ raise LoadError,
17
+ "Ruby 3.3+ requires the 'rubygems-generate_index' gem. " \
18
+ "Add it to your Gemfile or run: gem install rubygems-generate_index"
19
+ end
20
+ end
9
21
  require 'rubygems/package'
10
22
  require 'tempfile'
11
23
  require 'json'
@@ -13,6 +25,11 @@ require 'tilt/erb'
13
25
  require 'rack/protection'
14
26
 
15
27
  module Geminabox
28
+ if RUBY_VERSION < '3.0'
29
+ warn "DEPRECATION: geminabox 3.0 will require Ruby >= 3.0. " \
30
+ "You are running Ruby #{RUBY_VERSION}. Please plan your upgrade. " \
31
+ "Pin to gem 'geminabox', '~> 2.2' if you cannot upgrade yet."
32
+ end
16
33
 
17
34
  class Error < StandardError ; end
18
35
 
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: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
@@ -9,10 +9,9 @@ authors:
9
9
  - Rob Nichols
10
10
  - Naotoshi Seo
11
11
  - Takuya Noguchi
12
- autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2022-06-28 00:00:00.000000000 Z
14
+ date: 1980-01-02 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: sinatra
@@ -159,7 +158,6 @@ metadata:
159
158
  homepage_uri: https://github.com/geminabox/geminabox
160
159
  source_code_uri: https://github.com/geminabox/geminabox
161
160
  changelog_uri: https://github.com/geminabox/geminabox/releases
162
- post_install_message:
163
161
  rdoc_options:
164
162
  - "--main"
165
163
  - README.md
@@ -174,10 +172,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
172
  requirements:
175
173
  - - ">="
176
174
  - !ruby/object:Gem::Version
177
- version: 2.4.0
175
+ version: 2.5.0
178
176
  requirements: []
179
- rubygems_version: 3.3.16
180
- signing_key:
177
+ rubygems_version: 4.0.3
181
178
  specification_version: 4
182
179
  summary: Really simple private RubyGems hosting
183
180
  test_files: []