Skip to content

Commit

Permalink
Merge pull request #111 from svenfuchs/fix/rubygems-plugin
Browse files Browse the repository at this point in the history
Fix error seen when this gem installed but not specified as dependency in project
  • Loading branch information
PikachuEXE authored Dec 20, 2024
2 parents 5b274f8 + 61f46cf commit e94c08e
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 61 deletions.
3 changes: 1 addition & 2 deletions gem-release.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# encoding: utf-8

$:.unshift File.expand_path('../lib', __FILE__)
require 'gem/release/version'
require_relative 'lib/gem/release/version'

Gem::Specification.new do |s|
s.name = 'gem-release'
Expand Down
4 changes: 2 additions & 2 deletions lib/gem/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module Release
end
end

require 'gem/release/cmds'
require 'gem/release/config'
require_relative 'release/cmds'
require_relative 'release/config'
14 changes: 7 additions & 7 deletions lib/gem/release/cmds.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'gem/release/cmds/bootstrap'
require 'gem/release/cmds/bump'
require 'gem/release/cmds/gemspec'
require 'gem/release/cmds/github'
require 'gem/release/cmds/release'
require 'gem/release/cmds/runner'
require 'gem/release/cmds/tag'
require_relative 'cmds/bootstrap'
require_relative 'cmds/bump'
require_relative 'cmds/gemspec'
require_relative 'cmds/github'
require_relative 'cmds/release'
require_relative 'cmds/runner'
require_relative 'cmds/tag'

module Gem
module Release
Expand Down
8 changes: 4 additions & 4 deletions lib/gem/release/cmds/base.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'gem/release/helper'
require 'gem/release/helper/hash'
require 'gem/release/helper/string'
require 'gem/release/support/registry'
require_relative '../helper'
require_relative '../helper/hash'
require_relative '../helper/string'
require_relative '../support/registry'

module Gem
module Release
Expand Down
6 changes: 3 additions & 3 deletions lib/gem/release/cmds/bootstrap.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'gem/release/cmds/base'
require 'gem/release/data'
require 'gem/release/files/templates'
require_relative 'base'
require_relative '../data'
require_relative '../files/templates'

module Gem
module Release
Expand Down
4 changes: 2 additions & 2 deletions lib/gem/release/cmds/bump.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/cmds/base'
require 'gem/release/files/version'
require_relative 'base'
require_relative '../files/version'

module Gem
module Release
Expand Down
6 changes: 3 additions & 3 deletions lib/gem/release/cmds/gemspec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'gem/release/cmds/base'
require 'gem/release/data'
require 'gem/release/files/template'
require_relative 'base'
require_relative '../data'
require_relative '../files/template'

module Gem
module Release
Expand Down
4 changes: 2 additions & 2 deletions lib/gem/release/cmds/github.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/cmds/base'
require 'gem/release/context/github'
require_relative 'base'
require_relative '../context/github'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/cmds/release.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/cmds/base'
require_relative 'base'
require 'rubygems/commands/build_command'
require 'rubygems/commands/push_command'

Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/cmds/runner.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/context'
require_relative '../context'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/cmds/tag.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/cmds/base'
require_relative 'base'

module Gem
module Release
Expand Down
6 changes: 3 additions & 3 deletions lib/gem/release/config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'gem/release/config/env'
require 'gem/release/config/files'
require 'gem/release/helper/hash'
require_relative 'config/env'
require_relative 'config/files'
require_relative 'helper/hash'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/config/env.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/helper/hash'
require_relative '../helper/hash'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/config/files.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'yaml'
require 'gem/release/helper/hash'
require_relative '../helper/hash'

module Gem
module Release
Expand Down
8 changes: 4 additions & 4 deletions lib/gem/release/context.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'gem/release/context/gem'
require 'gem/release/context/git'
require 'gem/release/context/paths'
require 'gem/release/context/ui'
require_relative 'context/gem'
require_relative 'context/git'
require_relative 'context/paths'
require_relative 'context/ui'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/context/gem.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/context/gemspec'
require_relative 'gemspec'

module Gem
module Release
Expand Down
4 changes: 2 additions & 2 deletions lib/gem/release/context/github.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'json'
require 'gem/release/helper/http'
require 'gem/release/version'
require_relative '../helper/http'
require_relative '../version'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/data.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'erb'
require 'ostruct'
require 'gem/release/helper/string'
require_relative 'helper/string'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/files/template.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'fileutils'
require 'gem/release/files/template/context'
require_relative 'template/context'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/files/templates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ def templates_for(sources, files = nil, opts = {})
end
end

require 'gem/release/files/templates/group'
require_relative 'templates/group'
2 changes: 1 addition & 1 deletion lib/gem/release/files/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/version/number'
require_relative '../version/number'

module Gem
module Release
Expand Down
2 changes: 1 addition & 1 deletion lib/gem/release/support/gem_command.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gem/release/cmds/runner'
require_relative '../cmds/runner'

module Gem
module Release
Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/commands/bootstrap_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/support/gem_command'
require 'gem/release/cmds/bootstrap'
require_relative '../../gem/release/support/gem_command'
require_relative '../../gem/release/cmds/bootstrap'

class Gem::Commands::BootstrapCommand < Gem::Command
include Gem::Release::GemCommand
Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/commands/bump_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/support/gem_command'
require 'gem/release/cmds/bump'
require_relative '../../gem/release/support/gem_command'
require_relative '../../gem/release/cmds/bump'

class Gem::Commands::BumpCommand < Gem::Command
include Gem::Release::GemCommand
Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/commands/gemspec_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/support/gem_command'
require 'gem/release/cmds/gemspec'
require_relative '../../gem/release/support/gem_command'
require_relative '../../gem/release/cmds/gemspec'

class Gem::Commands::GemspecCommand < Gem::Command
include Gem::Release::GemCommand
Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/commands/release_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/support/gem_command'
require 'gem/release/cmds/release'
require_relative '../../gem/release/support/gem_command'
require_relative '../../gem/release/cmds/release'

class Gem::Commands::ReleaseCommand < Gem::Command
include Gem::Release::GemCommand
Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/commands/tag_command.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'gem/release/support/gem_command'
require 'gem/release/cmds/tag'
require_relative '../../gem/release/support/gem_command'
require_relative '../../gem/release/cmds/tag'

class Gem::Commands::TagCommand < Gem::Command
include Gem::Release::GemCommand
Expand Down
12 changes: 6 additions & 6 deletions lib/rubygems_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require 'gem/release'
require_relative 'gem/release'
require 'rubygems/command_manager'

require 'rubygems/commands/bootstrap_command'
require 'rubygems/commands/bump_command'
require 'rubygems/commands/gemspec_command'
require 'rubygems/commands/release_command'
require 'rubygems/commands/tag_command'
require_relative 'rubygems/commands/bootstrap_command'
require_relative 'rubygems/commands/bump_command'
require_relative 'rubygems/commands/gemspec_command'
require_relative 'rubygems/commands/release_command'
require_relative 'rubygems/commands/tag_command'

Gem::CommandManager.instance.register_command :bootstrap
Gem::CommandManager.instance.register_command :bump
Expand Down

0 comments on commit e94c08e

Please sign in to comment.