geminabox 1.3.1 → 1.4.3.rc

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccd8f5577f0719a552b32d62c4291929c6e544738c4eaef8c3e2d10fab373d92
4
- data.tar.gz: e6d33dd7903533d09dde5e8ab8528a427b5b20b5d66097f41ba953df99563b15
3
+ metadata.gz: c44c05f8f334a36f1c3580caa4960ac01d603c1d3493390913e190cd84f562b1
4
+ data.tar.gz: '008ee0518161a2ef8a8f6450bb9626a603253ef8f28b3fbf19dbd0c0af37d1d5'
5
5
  SHA512:
6
- metadata.gz: aa8030ff620fbd6843a336f2a93f009e70b2d934fe17681c3fe51a41282544a6f7ff4619250724283ea632e80399a804ecb1a07d2060215727be24a67ac6d2ac
7
- data.tar.gz: 8e8a36a99eb8cf115d7b503e4dd9716fcc80138f660c9f8c76746fc5d81554d37e8f2a40f8394be6badc480edb237914b45967b7986fb7ab996bd5d887217e24
6
+ metadata.gz: 30ab306f101a357c39e32e3e6209a9a4da3ac17b65d9465964e1c1ec56eb7a4e37e1f63ac6d22963d840106737c753bcaf3fa9a164aba0f0ea3e72b9528f7f7b
7
+ data.tar.gz: d5201a3b99c33824bf818e776a9fbc440700217bc419ffe24ff8c3f42e99e1a14cb8fddbc60c1ea39c1765516fa7fb99fd27fd718736300666bc87ebb2b77858
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gem in a Box – Really simple rubygem hosting
2
- [![Build Status](https://secure.travis-ci.org/geminabox/geminabox.png)](http://travis-ci.org/geminabox/geminabox)
3
- [![Gem Version](https://badge.fury.io/rb/geminabox.png)](http://badge.fury.io/rb/geminabox)
2
+ [![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
+ [![Gem Version](https://badge.fury.io/rb/geminabox.svg)](http://badge.fury.io/rb/geminabox)
4
4
  [![Code Climate](https://codeclimate.com/github/geminabox/geminabox/badges/gpa.svg)](https://codeclimate.com/github/geminabox/geminabox)
5
5
 
6
6
  Geminabox lets you host your own gems, and push new gems to it just like with rubygems.org.
@@ -12,7 +12,7 @@ For basic auth, try [Rack::Auth](http://www.rubydoc.info/github/rack/rack/Rack/A
12
12
 
13
13
  ## System Requirements
14
14
 
15
- See [.travis.yml](./.travis.yml) for supported ruby versions
15
+ See [.github/workflows/ruby.yml](.github/workflows/ruby.yml) for supported ruby versions
16
16
 
17
17
  ## Server Setup
18
18
 
@@ -37,12 +37,6 @@ Create a config.ru as follows:
37
37
 
38
38
  Start your gem server with 'rackup' to run WEBrick or hook up the config.ru as you normally would ([passenger](https://www.phusionpassenger.com/), [thin](http://code.macournoyer.com/thin/), [unicorn](https://bogomips.org/unicorn/), whatever floats your boat).
39
39
 
40
- ## Legacy RubyGems index
41
-
42
- RubyGems supports generating indexes for the so called legacy versions (< 1.2), and since it is very rare to use such versions nowadays, it can be disabled, thus improving indexing times for large repositories. If it's safe for your application, you can disable support for these legacy versions by adding the following configuration to your config.ru file:
43
-
44
- Geminabox.build_legacy = false
45
-
46
40
  ## RubyGems Proxy
47
41
 
48
42
  Geminabox can be configured to pull gems, it does not currently have, from rubygems.org. To enable this mode you can either:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "fileutils"
2
4
  module Geminabox
3
5
  class Geminabox::DiskCache
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "set"
2
4
 
3
5
  module Geminabox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
4
 
3
5
  class GemStore
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'nesty'
2
4
  module Geminabox
3
5
  class GemStoreError < StandardError
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
4
 
3
5
  class GemVersion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
4
 
3
5
  # This class represents a sorted collection of Geminabox::GemVersion objects.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sinatra/base'
2
4
 
3
5
  module Geminabox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'httpclient'
2
4
 
3
5
  module Geminabox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'faraday'
2
4
 
3
5
  module Geminabox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'http_adapter_config_error'
2
4
 
3
5
  module Geminabox
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
4
  class HttpAdapterConfigError < StandardError
3
5
  def initialize(method_name, returns)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
4
 
3
5
  class IncomingGem
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  # This module addresses Geminabox issue
3
4
  # https://github.com/cwninja/geminabox/issues/70
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
 
3
4
  module Geminabox
@@ -26,7 +27,7 @@ module Geminabox
26
27
  File.open(proxy_path, 'w'){|f| f.write(rc) }
27
28
  end
28
29
  rescue
29
- File.unlink(proxy_path) if File.exists?(proxy_path)
30
+ File.unlink(proxy_path) if File.exist?(proxy_path)
30
31
  raise $!
31
32
  end
32
33
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  module Geminabox
3
4
  module Proxy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sinatra/base'
2
4
  require 'net/http'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'tempfile'
2
4
  require 'fileutils'
3
5
  require 'rubygems/util'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  module Geminabox
3
4
  module Proxy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'uri'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'reentrant_flock'
2
4
  require 'rubygems/util'
3
5
 
@@ -206,7 +208,7 @@ module Geminabox
206
208
  def serialize_update(&block)
207
209
  with_rlock(&block)
208
210
  rescue ReentrantFlock::AlreadyLocked
209
- halt 503, { 'Retry-After' => Geminabox.retry_interval }, 'Repository lock is held by another process'
211
+ halt 503, { 'Retry-After' => Geminabox.retry_interval.to_s }, 'Repository lock is held by another process'
210
212
  end
211
213
 
212
214
  def with_rlock(&block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Geminabox
2
- VERSION = '1.3.1' unless defined? VERSION
4
+ VERSION = '1.4.3.rc' unless defined? VERSION
3
5
  end
data/lib/geminabox.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'digest/md5'
3
5
  require 'builder'
@@ -39,7 +41,6 @@ module Geminabox
39
41
  attr_accessor(
40
42
  :data,
41
43
  :public_folder,
42
- :build_legacy,
43
44
  :incremental_updates,
44
45
  :views,
45
46
  :allow_replace,
@@ -57,6 +58,14 @@ module Geminabox
57
58
  :on_gem_received
58
59
  )
59
60
 
61
+ attr_reader :build_legacy
62
+
63
+ def build_legacy=(value)
64
+ warn "Setting `Geminabox.build_legacy` is deprecated and will be removed in the future. Geminbox will always build modern indices"
65
+
66
+ @build_legacy = value
67
+ end
68
+
60
69
  def set_defaults(defaults)
61
70
  defaults.each do |method, default|
62
71
  variable = "@#{method}"
@@ -67,7 +76,7 @@ module Geminabox
67
76
  def settings
68
77
  Server.settings
69
78
  end
70
-
79
+
71
80
  def call(env)
72
81
  Server.call env
73
82
  end
@@ -85,7 +94,7 @@ module Geminabox
85
94
  rubygems_proxy_merge_strategy: ENV.fetch('RUBYGEMS_PROXY_MERGE_STRATEGY') { :local_gems_take_precedence_over_remote_gems }.to_sym,
86
95
  allow_delete: true,
87
96
  http_adapter: HttpClientAdapter.new,
88
- lockfile: '/tmp/geminabox.lockfile',
97
+ lockfile: File.join(ENV.fetch('TMPDIR', '/tmp'), 'geminabox.lockfile'),
89
98
  retry_interval: 60,
90
99
  allow_remote_failure: false,
91
100
  ruby_gems_url: 'https://rubygems.org/',
@@ -93,5 +102,5 @@ module Geminabox
93
102
  allow_upload: true,
94
103
  on_gem_received: nil
95
104
  )
96
-
105
+
97
106
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'uri'
2
4
  require 'cgi'
3
5
  require 'geminabox'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems/command'
2
4
 
3
5
  class Gem::Commands::InaboxCommand < Gem::Command
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rubygems/command_manager"
2
4
  Gem::CommandManager.instance.register_command :inabox
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geminabox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.3.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
8
8
  - Jack Foy
9
9
  - Rob Nichols
10
10
  - Naotoshi Seo
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-05-29 00:00:00.000000000 Z
14
+ date: 2022-06-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sinatra
@@ -71,6 +71,20 @@ dependencies:
71
71
  version: '0'
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: faraday
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.0'
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "<"
84
+ - !ruby/object:Gem::Version
85
+ version: '2.0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: reentrant_flock
74
88
  requirement: !ruby/object:Gem::Requirement
75
89
  requirements:
76
90
  - - ">="
@@ -84,7 +98,7 @@ dependencies:
84
98
  - !ruby/object:Gem::Version
85
99
  version: '0'
86
100
  - !ruby/object:Gem::Dependency
87
- name: reentrant_flock
101
+ name: rss
88
102
  requirement: !ruby/object:Gem::Requirement
89
103
  requirements:
90
104
  - - ">="
@@ -149,7 +163,7 @@ licenses:
149
163
  - MIT-LICENSE
150
164
  metadata:
151
165
  source_code_uri: https://github.com/geminabox/geminabox
152
- post_install_message:
166
+ post_install_message:
153
167
  rdoc_options:
154
168
  - "--main"
155
169
  - README.md
@@ -162,12 +176,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
176
  version: '0'
163
177
  required_rubygems_version: !ruby/object:Gem::Requirement
164
178
  requirements:
165
- - - ">="
179
+ - - ">"
166
180
  - !ruby/object:Gem::Version
167
- version: '0'
181
+ version: 1.3.1
168
182
  requirements: []
169
- rubygems_version: 3.1.2
170
- signing_key:
183
+ rubygems_version: 3.1.6
184
+ signing_key:
171
185
  specification_version: 4
172
186
  summary: Really simple rubygem hosting
173
187
  test_files: []