Skip to content

Commit

Permalink
Update dep to work with common
Browse files Browse the repository at this point in the history
  • Loading branch information
hmarr committed Feb 7, 2019
1 parent 1f2ed6a commit d7932c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dep/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "dependabot-core", path: "../"
gem "dependabot-common", path: "../common"

gemspec
25 changes: 13 additions & 12 deletions dep/dependabot-dep.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
require "find"

Gem::Specification.new do |spec|
core_gemspec = Bundler.load_gemspec_uncached("../dependabot-core.gemspec")
common_gemspec =
Bundler.load_gemspec_uncached("../common/dependabot-common.gemspec")

spec.name = "dependabot-dep"
spec.summary = "Go dep support for dependabot-core"
spec.version = core_gemspec.version
spec.description = core_gemspec.description
spec.summary = "Go dep support for dependabot"
spec.version = common_gemspec.version
spec.description = common_gemspec.description

spec.author = core_gemspec.author
spec.email = core_gemspec.email
spec.homepage = core_gemspec.homepage
spec.license = core_gemspec.license
spec.author = common_gemspec.author
spec.email = common_gemspec.email
spec.homepage = common_gemspec.homepage
spec.license = common_gemspec.license

spec.require_path = "lib"
spec.files = []

spec.required_ruby_version = core_gemspec.required_ruby_version
spec.required_rubygems_version = core_gemspec.required_ruby_version
spec.required_ruby_version = common_gemspec.required_ruby_version
spec.required_rubygems_version = common_gemspec.required_ruby_version

spec.add_dependency "dependabot-core", Dependabot::VERSION
spec.add_dependency "dependabot-common", Dependabot::VERSION

core_gemspec.development_dependencies.each do |dep|
common_gemspec.development_dependencies.each do |dep|
spec.add_development_dependency dep.name, dep.requirement.to_s
end

Expand Down
2 changes: 1 addition & 1 deletion dep/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

def common_dir
@common_dir ||= Gem::Specification.find_by_name("dependabot-core").gem_dir
@common_dir ||= Gem::Specification.find_by_name("dependabot-common").gem_dir
end

def require_common_spec(path)
Expand Down

0 comments on commit d7932c3

Please sign in to comment.