Skip to content

Commit

Permalink
Revert "Add compact index support for private sources"
Browse files Browse the repository at this point in the history
This reverts commit c5f0947.
  • Loading branch information
segiddins authored and simi committed Jul 21, 2024
1 parent c5f0947 commit 53d6769
Show file tree
Hide file tree
Showing 23 changed files with 29 additions and 733 deletions.
6 changes: 2 additions & 4 deletions .rubocop-bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Lint/UnusedMethodArgument:
Lint/UriEscapeUnescape:
Enabled: true


# Style

Layout/EndAlignment:
Expand Down Expand Up @@ -91,10 +92,7 @@ Style/SpecialGlobalVars:
Enabled: false

Naming/VariableNumber:
EnforcedStyle: "snake_case"
AllowedIdentifiers:
- sha256
- capture3
EnforcedStyle: 'snake_case'

Naming/MemoizedInstanceVariableName:
Enabled: false
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ group :linting do
end

group :test do
gem "gem_server_conformance", "~> 0.1.4"
gem "mock_redis"
end
16 changes: 8 additions & 8 deletions docs/gemstash-configuration.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ Boolean values `true` or `false`
`:fetch_timeout`

This is the number of seconds to allow for fetching a gem from upstream.
It covers establishing the connection and receiving the response.
Fetching gems over a slow connection may cause timeout errors. If you
experience timeout errors, you may want to increase this value. The
default is `20` seconds.
It covers establishing the connection and receiving the response. Fetching
gems over a slow connection may cause timeout errors. If you experience
timeout errors, you may want to increase this value. The default is `20`
seconds.

## Default value

Expand All @@ -239,10 +239,10 @@ Integer value with a minimum of `1`
`:open_timeout`

The timeout setting for opening the connection to an upstream gem
server. On high-latency networks, even establishing the connection to an
upstream gem server can take a while. If you experience connection
failures instead of timeout errors, you may want to increase this value.
The default is `2` seconds.
server. On high-latency networks, even establishing the connection
to an upstream gem server can take a while. If you experience
connection failures instead of timeout errors, you may want to
increase this value. The default is `2` seconds.

## Default value

Expand Down
1 change: 0 additions & 1 deletion gemstash.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ you push your own private gems as well."
spec.required_ruby_version = ">= 3.1"

spec.add_runtime_dependency "activesupport", ">= 4.2", "< 8"
spec.add_runtime_dependency "compact_index", "~> 0.15.0"
spec.add_runtime_dependency "dalli", ">= 3.2.3", "< 4"
spec.add_runtime_dependency "faraday", ">= 1", "< 3"
spec.add_runtime_dependency "faraday_middleware", "~> 1.0"
Expand Down
1 change: 0 additions & 1 deletion lib/gemstash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Gemstash
autoload :DB, "gemstash/db"
autoload :Cache, "gemstash/cache"
autoload :CLI, "gemstash/cli"
autoload :CompactIndexBuilder, "gemstash/compact_index_builder"
autoload :Configuration, "gemstash/configuration"
autoload :Dependencies, "gemstash/dependencies"
autoload :Env, "gemstash/env"
Expand Down
5 changes: 1 addition & 4 deletions lib/gemstash/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ def set_dependency(scope, gem, value)

def invalidate_gem(scope, gem)
@client.delete("deps/v1/#{scope}/#{gem}")
if scope == "private"
Gemstash::SpecsBuilder.invalidate_stored
Gemstash::CompactIndexBuilder.invalidate_stored(gem)
end
Gemstash::SpecsBuilder.invalidate_stored if scope == "private"
end
end

Expand Down
3 changes: 0 additions & 3 deletions lib/gemstash/cli/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class Info < Gemstash::CLI::Base
def run
prepare
list_config

# Gemstash::DB
# Gemstash::Env.current.db.dump_schema_migration(same_db: true)
end

private
Expand Down
257 changes: 0 additions & 257 deletions lib/gemstash/compact_index_builder.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/gemstash/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module DB
Sequel::Model.db = Gemstash::Env.current.db
Sequel::Model.raise_on_save_failure = true
Sequel::Model.plugin :timestamps, update_on_create: true
Sequel::Model.db.extension :schema_dumper
autoload :Authorization, "gemstash/db/authorization"
autoload :CachedRubygem, "gemstash/db/cached_rubygem"
autoload :Dependency, "gemstash/db/dependency"
Expand Down
Loading

0 comments on commit 53d6769

Please sign in to comment.