Skip to content
Permalink
Browse files

Time for a proper name: s/paperback/gel/

  • Loading branch information...
matthewd committed Mar 7, 2019
1 parent f836d6a commit 21b91ccb0ba9768fd97a0211066850e09e797fba
Showing with 456 additions and 456 deletions.
  1. +1 −1 .rubocop.yml
  2. +1 −1 CODE_OF_CONDUCT.md
  3. +1 −1 Gemfile
  4. +2 −2 Gemfile.lock
  5. +1 −1 LICENSE.txt
  6. +4 −4 README.md
  7. +1 −1 Rakefile
  8. +3 −0 bin/gel
  9. +3 −0 bin/gruby
  10. +3 −3 bin/metaruby
  11. +0 −3 bin/paperback
  12. +0 −3 bin/paperruby
  13. +1 −1 bin/setup
  14. +3 −3 bootstrap.rb
  15. +6 −6 paperback.gemspec → gel.gemspec
  16. +21 −0 lib/gel.rb
  17. +5 −5 lib/{paperback → gel}/catalog.rb
  18. +2 −2 lib/{paperback → gel}/catalog/common.rb
  19. +2 −2 lib/{paperback → gel}/catalog/compact_index.rb
  20. +3 −3 lib/{paperback → gel}/catalog/dependency_index.rb
  21. +2 −2 lib/{paperback → gel}/catalog/legacy_index.rb
  22. 0 lib/{paperback → gel}/catalog/marshal_hacks.rb
  23. +6 −6 lib/{paperback → gel}/command.rb
  24. +1 −1 lib/{paperback → gel}/command/env.rb
  25. +10 −10 lib/{paperback → gel}/command/exec.rb
  26. +1 −1 lib/{paperback → gel}/command/help.rb
  27. +7 −0 lib/gel/command/install.rb
  28. +16 −0 lib/gel/command/install_gem.rb
  29. +4 −4 lib/{paperback → gel}/command/lock.rb
  30. 0 lib/{paperback → gel}/compatibility.rb
  31. +5 −5 lib/{paperback → gel}/compatibility/bundler.rb
  32. 0 lib/{paperback → gel}/compatibility/bundler/setup.rb
  33. +24 −24 lib/{paperback → gel}/compatibility/rubygems.rb
  34. 0 lib/{paperback → gel}/compatibility/rubygems/command.rb
  35. 0 lib/{paperback → gel}/compatibility/rubygems/dependency_installer.rb
  36. +9 −9 lib/{paperback → gel}/db.rb
  37. +2 −2 lib/{paperback → gel}/direct_gem.rb
  38. +37 −37 lib/{paperback → gel}/environment.rb
  39. +5 −5 lib/{paperback → gel}/error.rb
  40. +7 −7 lib/{paperback → gel}/gemfile_parser.rb
  41. +6 −6 lib/{paperback → gel}/gemspec_parser.rb
  42. +2 −2 lib/{paperback → gel}/git_catalog.rb
  43. +2 −2 lib/{paperback → gel}/git_depot.rb
  44. +1 −1 lib/{paperback → gel}/httpool.rb
  45. +6 −6 lib/{paperback → gel}/installer.rb
  46. +9 −9 lib/{paperback → gel}/lock_loader.rb
  47. +1 −1 lib/{paperback → gel}/lock_parser.rb
  48. +3 −3 lib/{paperback → gel}/locked_store.rb
  49. +1 −1 lib/{paperback → gel}/multi_store.rb
  50. +4 −4 lib/{paperback → gel}/package.rb
  51. +1 −1 lib/{paperback → gel}/package/inspector.rb
  52. +11 −11 lib/{paperback → gel}/package/installer.rb
  53. +2 −2 lib/{paperback → gel}/path_catalog.rb
  54. +6 −6 lib/{paperback → gel}/pinboard.rb
  55. +6 −6 lib/{paperback → gel}/pub_grub/preference_strategy.rb
  56. +3 −3 lib/{paperback → gel}/pub_grub/source.rb
  57. +29 −0 lib/gel/runtime.rb
  58. +7 −7 lib/{paperback → gel}/store.rb
  59. +1 −1 lib/{paperback → gel}/store_catalog.rb
  60. +2 −2 lib/{paperback → gel}/store_gem.rb
  61. +11 −11 lib/{paperback → gel}/support/gem_requirement.rb
  62. +4 −4 lib/{paperback → gel}/support/gem_version.rb
  63. +1 −1 lib/{paperback → gel}/support/tar.rb
  64. +1 −1 lib/{paperback → gel}/support/tar/tar_header.rb
  65. +5 −5 lib/{paperback → gel}/support/tar/tar_reader.rb
  66. +3 −3 lib/{paperback → gel}/support/tar/tar_reader/entry.rb
  67. +10 −10 lib/{paperback → gel}/support/tar/tar_writer.rb
  68. +2 −2 lib/{paperback → gel}/tail_file.rb
  69. +1 −1 lib/{paperback → gel}/version.rb
  70. +1 −1 lib/{paperback → gel}/work_pool.rb
  71. +0 −21 lib/paperback.rb
  72. +0 −7 lib/paperback/command/install.rb
  73. +0 −16 lib/paperback/command/install_gem.rb
  74. +0 −29 lib/paperback/runtime.rb
  75. +19 −19 test/activate_test.rb
  76. +15 −15 test/cli_test.rb
  77. +2 −2 test/{paperback_test.rb → gel_test.rb}
  78. +7 −7 test/gemfile_parser_test.rb
  79. +7 −7 test/gemspec_parser_test.rb
  80. +11 −11 test/install_test.rb
  81. +8 −8 test/lock_activate_test.rb
  82. +5 −5 test/lock_install_test.rb
  83. +1 −1 test/lock_parser_test.rb
  84. +10 −10 test/locked_activate_test.rb
  85. +3 −3 test/multi_store_test.rb
  86. +7 −7 test/package_test.rb
  87. +2 −2 test/resolve_test.rb
  88. +4 −4 test/tail_file_test.rb
  89. +14 −14 test/test_helper.rb
@@ -5,7 +5,7 @@ inherit_gem:
AllCops:
TargetRubyVersion: 2.3
Exclude:
- 'lib/paperback/support/**/*'
- 'lib/gel/support/**/*'

Rails:
Enabled: false
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at TODO. All
reported by contacting the project team at team@gel.dev. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -2,5 +2,5 @@ source "https://rubygems.org"

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in paperback.gemspec
# Specify your gem's dependencies in gel.gemspec
gemspec
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
paperback (0.1.0)
gel (0.1.0)
pub_grub (= 0.5.0.alpha3)

GEM
@@ -29,9 +29,9 @@ PLATFORMS
ruby

DEPENDENCIES
gel!
minitest (~> 5.0)
mocha
paperback!
rake (~> 12.0)
webmock

@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Paperback Authors
Copyright (c) 2017 Gel Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,12 +1,12 @@
# Paperback
# Gel

A modern gem manager.

## Installation

Install it the gem:

$ gem install paperback
$ gem install gel

TODO: .. and then?

@@ -20,12 +20,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/paperback/paperback. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/gel-rb/gel. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Paperback project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/paperback/paperback/blob/master/CODE_OF_CONDUCT.md).
Everyone interacting in the Gel project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/gel-rb/gel/blob/master/CODE_OF_CONDUCT.md).
@@ -7,7 +7,7 @@ Rake::TestTask.class_eval do
end

Rake::TestTask.new(:test) do |t|
t.ruby_opts = ["--disable=gems", "-r", "paperback/runtime"]
t.ruby_opts = ["--disable=gems", "-r", "gel/runtime"]
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
@@ -0,0 +1,3 @@
#!/bin/bash

exec `dirname $0`/gruby -r gel/command -e "Gel::Command.run(ARGV)" -- "$@"
@@ -0,0 +1,3 @@
#!/bin/bash

exec ruby --disable=gems -I `dirname $0`/../lib -r gel/runtime "$@"
@@ -1,6 +1,6 @@
#!/bin/bash

export PAPERBACK_STORE=`dirname $0`/../tmp/bootstrap/store
export PAPERBACK_LOCKFILE=`dirname $0`/../Gemfile.lock
export GEL_STORE=`dirname $0`/../tmp/bootstrap/store
export GEL_LOCKFILE=`dirname $0`/../Gemfile.lock

exec `dirname $0`/paperruby "$@"
exec `dirname $0`/gruby "$@"

This file was deleted.

This file was deleted.

@@ -4,4 +4,4 @@ IFS=$'\n\t'
DIR="`dirname $0`"
set -x

"$DIR"/paperruby "$DIR"/../bootstrap.rb gemfile
"$DIR"/gruby "$DIR"/../bootstrap.rb gemfile
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "lib/paperback"
require_relative "lib/gel"

def usage
puts "USAGE: ruby bootstrap.rb gemfile"
@@ -17,8 +17,8 @@ def usage
Dir.mkdir "tmp/bootstrap/store" unless Dir.exist?("tmp/bootstrap/store")
Dir.mkdir "tmp/bootstrap/store/ruby" unless Dir.exist?("tmp/bootstrap/store/ruby")

store = Paperback::Store.new("tmp/bootstrap/store/ruby")
loader = Paperback::LockLoader.new("Gemfile.lock")
store = Gel::Store.new("tmp/bootstrap/store/ruby")
loader = Gel::LockLoader.new("Gemfile.lock")

loader.activate(nil, store, install: true, output: $stderr)

@@ -1,13 +1,13 @@
require_relative "lib/paperback/version"
require_relative "lib/gel/version"

Gem::Specification.new do |spec|
spec.name = "paperback"
spec.version = Paperback::VERSION
spec.authors = ["Paperback Authors"]
spec.email = ["todo@example.com"]
spec.name = "gel"
spec.version = Gel::VERSION
spec.authors = ["Gel Authors"]
spec.email = ["team@gel.dev"]

spec.summary = "A modern gem manager"
spec.homepage = "https://github.com/paperback/paperback"
spec.homepage = "https://gel.dev"
spec.license = "MIT"

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -0,0 +1,21 @@
# frozen_string_literal: true

module Gel
module Support
end
end

require_relative "gel/support/gem_version"
require_relative "gel/support/gem_requirement"

require_relative "gel/environment"
require_relative "gel/store"
require_relative "gel/store_gem"
require_relative "gel/direct_gem"
require_relative "gel/locked_store"
require_relative "gel/multi_store"

require_relative "gel/gemspec_parser"
require_relative "gel/gemfile_parser"
require_relative "gel/lock_parser"
require_relative "gel/lock_loader"
@@ -7,10 +7,10 @@

require_relative "httpool"

class Paperback::Catalog
class Gel::Catalog
UPDATE_CONCURRENCY = 8

def initialize(uri, httpool: Paperback::Httpool.new, work_pool:, cache: ENV["PAPERBACK_CACHE"] || "~/.cache/paperback", initial_gems: [])
def initialize(uri, httpool: Gel::Httpool.new, work_pool:, cache: ENV["GEL_CACHE"] || "~/.cache/gel", initial_gems: [])
@uri = normalize_uri(uri)
@httpool = httpool
@work_pool = work_pool
@@ -36,15 +36,15 @@ def prepare
end

def compact_index
@compact_index ||= Paperback::Catalog::CompactIndex.new(@uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
@compact_index ||= Gel::Catalog::CompactIndex.new(@uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
end

def dependency_index
@dependency_index ||= Paperback::Catalog::DependencyIndex.new(self, @uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
@dependency_index ||= Gel::Catalog::DependencyIndex.new(self, @uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
end

def legacy_index
@legacy_index ||= Paperback::Catalog::LegacyIndex.new(@uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
@legacy_index ||= Gel::Catalog::LegacyIndex.new(@uri, uri_identifier, httpool: @httpool, work_pool: @work_pool, cache: @cache)
end

def index
@@ -3,7 +3,7 @@
require "fileutils"
require "monitor"

module Paperback::Catalog::Common
module Gel::Catalog::Common
def initialize(uri, uri_identifier, httpool:, work_pool:, cache:)
@uri = uri
@uri_identifier = uri_identifier
@@ -71,7 +71,7 @@ def pinboard
begin
pinboard_dir = File.expand_path("#{@cache}/#{self.class::CACHE_TYPE}/#{@uri_identifier}")
FileUtils.mkdir_p(pinboard_dir) unless Dir.exist?(pinboard_dir)
Paperback::Pinboard.new(pinboard_dir, httpool: @httpool, work_pool: @work_pool)
Gel::Pinboard.new(pinboard_dir, httpool: @httpool, work_pool: @work_pool)
end
end
end
@@ -6,8 +6,8 @@

require_relative "common"

class Paperback::Catalog::CompactIndex
include Paperback::Catalog::Common
class Gel::Catalog::CompactIndex
include Gel::Catalog::Common
CACHE_TYPE = "index"

def initialize(*)
@@ -9,8 +9,8 @@
require_relative "common"
require_relative "marshal_hacks"

class Paperback::Catalog::DependencyIndex
include Paperback::Catalog::Common
class Gel::Catalog::DependencyIndex
include Gel::Catalog::Common
CACHE_TYPE = "quick"

LIST_MAX = 40
@@ -96,7 +96,7 @@ def refresh_some_gems(gems)

hashes.group_by { |h| h[:name] }.each do |_, group|
versions = group.group_by { |h| h[:number] }
latest = versions.keys.max_by { |v| Paperback::Support::GemVersion.new(v) }
latest = versions.keys.max_by { |v| Gel::Support::GemVersion.new(v) }
new_dependencies.merge versions[latest].flat_map { |h| h[:dependencies].map(&:first) }.uniq
end

@@ -8,8 +8,8 @@
require_relative "common"
require_relative "marshal_hacks"

class Paperback::Catalog::LegacyIndex
include Paperback::Catalog::Common
class Gel::Catalog::LegacyIndex
include Gel::Catalog::Common
CACHE_TYPE = "quick"

def initialize(*)
File renamed without changes.
@@ -2,21 +2,21 @@

require_relative "error"

class Paperback::Command
class Gel::Command
def self.run(command_line)
command_line = command_line.dup
if command = extract_word(command_line)
const = command.downcase.sub(/^./, &:upcase).gsub(/[-_]./) { |s| s[1].upcase }
if Paperback::Command.const_defined?(const)
command = Paperback::Command.const_get(const).new
if Gel::Command.const_defined?(const)
command = Gel::Command.const_get(const).new
command.run(command_line)
else
raise "Unknown command #{command.inspect}"
end
else
raise "No subcommand specified"
end
rescue Paperback::ReportableError => ex
rescue Gel::ReportableError => ex
raise if $DEBUG || (command && command.reraise)

$stderr.puts "ERROR: #{ex.message}"
@@ -44,7 +44,7 @@ def self.run(command_line)
# caused NoMemoryError or SystemStackError was way down the call
# stack, so we've now unwound enough to safely handle even those.

$stderr.print "\n\n===== Paperback Internal Error =====\n\n"
$stderr.print "\n\n===== Gel Internal Error =====\n\n"

# We'll improve this later, but for now after the header we'll leave
# ruby to write the message & backtrace:
@@ -58,7 +58,7 @@ def self.extract_word(arguments)
end

# If set to true, an error raised from #run will pass straight up to
# ruby instead of being treated as an internal Paperback error
# ruby instead of being treated as an internal Gel error
attr_accessor :reraise
end

@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Paperback::Command::Env < Paperback::Command
class Gel::Command::Env < Gel::Command
def run(command_line)
raise "TODO"
end
@@ -1,14 +1,14 @@
# frozen_string_literal: true

class Paperback::Command::Exec < Paperback::Command
class Gel::Command::Exec < Gel::Command
def run(command_line)
gemfile = Paperback::Environment.find_gemfile
gemfile = Gel::Environment.find_gemfile

ENV["PAPERBACK_GEMFILE"] = File.expand_path(gemfile)
ENV["PAPERBACK_LOCKFILE"] = File.expand_path(Paperback::Environment.lockfile_name(gemfile))
ENV["GEL_GEMFILE"] = File.expand_path(gemfile)
ENV["GEL_LOCKFILE"] = File.expand_path(Gel::Environment.lockfile_name(gemfile))

opt = (ENV["RUBYOPT"] || "").split(" ")
opt.unshift "-rpaperback/runtime" unless opt.include?("-rpaperback/runtime") || opt.each_cons(2).to_a.include?(["-r", "paperback/runtime"])
opt.unshift "-rgel/runtime" unless opt.include?("-rgel/runtime") || opt.each_cons(2).to_a.include?(["-r", "gel/runtime"])
opt.unshift "--disable=gems" unless opt.include?("--disable=gems") || opt.each_cons(2).to_a.include?(["--disable", "gems"])
ENV["RUBYOPT"] = opt.join(" ")

@@ -21,11 +21,11 @@ def run(command_line)
expanded_command = expand_executable(original_command)

if execute_inline?(expanded_command)
Paperback::Environment.activate(output: $stderr)
Gel::Environment.activate(output: $stderr)
$0 = original_command
ARGV.replace(command_line)

# Any error after this point should bypass Paperback's error
# Any error after this point should bypass Gel's error
# handling
self.reraise = true
Kernel.load(expanded_command)
@@ -39,9 +39,9 @@ def expand_executable(original_command)
return File.expand_path(original_command)
end

if Paperback::Environment.find_executable(original_command)
Paperback::Environment.activate(output: $stderr)
if found = Paperback::Environment.find_executable(original_command)
if Gel::Environment.find_executable(original_command)
Gel::Environment.activate(output: $stderr)
if found = Gel::Environment.find_executable(original_command)
return found
end
end
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Paperback::Command::Help < Paperback::Command
class Gel::Command::Help < Gel::Command
def run(command_line)
raise "TODO"
end
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class Gel::Command::Install < Gel::Command
def run(command_line)
Gel::Environment.activate(install: true, output: $stderr)
end
end

0 comments on commit 21b91cc

Please sign in to comment.
You can’t perform that action at this time.