Skip to content

Commit

Permalink
Merge pull request #3188 from dependabot/jurre/bundler-file-parser-sp…
Browse files Browse the repository at this point in the history
…ec-projects

Bundler: Convert FileParser specs to projects
  • Loading branch information
jurre authored Feb 25, 2021
2 parents 8ae8d9d + 5ca6f67 commit ce711fc
Show file tree
Hide file tree
Showing 78 changed files with 1,621 additions and 182 deletions.
245 changes: 64 additions & 181 deletions bundler/spec/dependabot/bundler/file_parser_spec.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
let(:requirement_string) { "~> 1.4.0" }

context "without a downloaded gemspec" do
let(:dependency_files) { project_dependency_files("bundler1/path_source") }
let(:dependency_files) { project_dependency_files("bundler1/path_source_not_reachable") }

it "raises a PathDependenciesNotReachable error" do
expect { subject }.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org' do
gem 'statesman'
gem 'business'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.10.0)
statesman (3.1.0)

PLATFORMS
ruby

DEPENDENCIES
business!
statesman!

BUNDLED WITH
1.16.0.pre.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "statesman", "~> 1.2.0"

group :development, :test do
gem "business", "~> 1.4.0"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.5)

PLATFORMS
ruby

DEPENDENCIES
business (~> 1.4.0)
statesman (~> 1.2.0)

BUNDLED WITH
1.14.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"

eval_gemfile('backend/Gemfile')

gem "business", "~> 1.4.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.1)

PLATFORMS
ruby

DEPENDENCIES
business (~> 1.4.0)
statesman (~> 1.2.0)

BUNDLED WITH
1.10.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "statesman", "~> 1.2.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exec "curl https://example.com"

source "https://rubygems.org"

gem "business", "~> 1.0.0"
gem "uk_phone_numbers", "~> 0.1.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
business (1.4.0)
statesman (1.2.1)

PLATFORMS
ruby

DEPENDENCIES
business (~> 1.4.0)
statesman (~> 1.2.0)

BUNDLED WITH
1.10.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# frozen_string_literal: true
Gem::Specification.new do |spec|
spec.name = "example"
spec.version = "0.9.3"
spec.summary = "Automated dependency management"
spec.description = "Core logic for updating a GitHub repos dependencies"
spec.date = "2019-08-01"

spec.author = "Dependabot"
spec.email = "[email protected]"
spec.homepage = "https://github.com/hmarr/example"
spec.license = "MIT"

spec.require_path = Dir["lib"]
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md",
"lib/**/*", "helpers/**/*"]

spec.required_ruby_version = ">= 2.4.0"
spec.required_rubygems_version = ">= 2.6.11"

spec.add_runtime_dependency "bundler", ">= 1.12.0"
spec.add_dependency "excon", ["~> 0.55"]
spec.add_dependency("gemnasium-parser", "~> 0.1")
spec.add_dependency 'gems', '~> 1.0'
spec.add_dependency "octokit", "~> 4.6"
spec.add_dependency "gitlab", "~> 4.1"

spec.add_development_dependency "webmock", "~> 2.3.1"
spec.add_development_dependency "rspec", "~> 3.5.0"
spec.add_development_dependency "rspec-its", "~> 1.2.0"
spec.add_development_dependency "rubocop", "~> 0.48.0"
spec.add_development_dependency "rake"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# frozen_string_literal: true

lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "example/version"

Gem::Specification.new do |spec|
spec.name = "example"
spec.version = Example::VERSION
spec.summary = "Automated dependency management #{Example::VERSION}"
spec.description = "Core logic for updating a GitHub repos dependencies"

spec.author = "Dependabot"
spec.email = "[email protected]"
spec.homepage = "https://github.com/hmarr/example"
spec.license = "MIT"

spec.require_path = "lib"
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md",
"lib/**/*", "helpers/**/*"]
Find.find("lib", "helpers") do |path|
if ignores.any? { |i| File.fnmatch(i, "/" + path, File::FNM_DOTMATCH) }
Find.prune
else
spec.files << path unless File.directory?(path)
end
end

spec.required_ruby_version = ">= 2.4.0"
spec.required_rubygems_version = ">= 2.6.11"

spec.add_dependency "bundler", ">= 1.12.0"
spec.add_dependency "excon", "~> 0.55"
spec.add_dependency "gemnasium-parser", "~> 0.1"
spec.add_dependency "gems", "~> 1.0"
spec.add_dependency "gitlab", "~> 4.1"
spec.add_dependency "octokit", "~> 4.6"

spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.5.0"
spec.add_development_dependency "rspec-its", "~> 1.2.0"
spec.add_development_dependency "rubocop", "~> 0.48.0"
spec.add_development_dependency "webmock", "~> 2.3.1"
end
10 changes: 10 additions & 0 deletions bundler/spec/fixtures/projects/bundler1/git_source/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "business", "~> 1.6.0",
git: "[email protected]:gocardless/business",
ref: "a1b78a9"
gem "statesman", "~> 1.2.0"
gem "prius", git: "https://github.com/gocardless/prius"
gem "que", git: "[email protected]:chanks/que", tag: "v0.11.6"
gem "uk_phone_numbers", git: "http://github.com/gocardless/uk_phone_numbers"
43 changes: 43 additions & 0 deletions bundler/spec/fixtures/projects/bundler1/git_source/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
GIT
remote: [email protected]:gocardless/business
revision: a1b78a929dac93a52f08db4f2847d76d6cfe39bd
ref: a1b78a9
specs:
business (1.6.0)

GIT
remote: [email protected]:chanks/que
revision: 997d1a6ee76a1f254fd72ce16acbc8d347fcaee3
tag: v0.11.6
specs:
que (0.11.6)

GIT
remote: http://github.com/gocardless/uk_phone_numbers
revision: 1530024bd6a68d36ac18e04836ce110e0d433c36
specs:
uk_phone_numbers (0.1.1)

GIT
remote: https://github.com/gocardless/prius
revision: cff701b3bfb182afc99a85657d7c9f3d6c1ccce2
specs:
prius (1.0.0)

GEM
remote: https://rubygems.org/
specs:
statesman (1.2.5)

PLATFORMS
ruby

DEPENDENCIES
business (~> 1.6.0)!
prius!
que!
statesman (~> 1.2.0)
uk_phone_numbers!

BUNDLED WITH
1.16.0.pre.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "http://rubygems.org"

git "https://github.com/kaminari/kaminari" do
gem "kaminari-core"
end

gem 'kaminari-actionview'
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
GIT
remote: https://github.com/kaminari/kaminari
revision: 62ec743dcee69e02186e5f1a309b08e59d83f647
specs:
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)

GEM
remote: http://rubygems.org/
specs:
actionview (5.1.6)
activesupport (= 5.1.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
builder (3.2.3)
concurrent-ruby (1.0.5)
crass (1.0.3)
erubi (1.7.1)
i18n (1.0.0)
concurrent-ruby (~> 1.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mini_portile2 (2.3.0)
minitest (5.11.3)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
kaminari-actionview
kaminari-core!

BUNDLED WITH
1.16.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true
source "https://rubygems.org"

def git_gem(name, **options)
gem name, git: "[email protected]:gocardless/business"
end

git_gem 'business'

gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
GIT
remote: [email protected]:gocardless/business
revision: 1378a2b0b446d991b7567efbc7eeeed2720e4d8f
specs:
business (1.16.0)

PATH
remote: .
specs:
example (0.9.3)
business (~> 1.0)

GEM
remote: https://rubygems.org/
specs:

PLATFORMS
ruby

DEPENDENCIES
business!
example!

BUNDLED WITH
1.17.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true
Gem::Specification.new do |spec|
spec.name = "example"
spec.version = "0.9.3"
spec.summary = "Automated dependency management"
spec.description = "Core logic for updating a GitHub repos dependencies"

spec.author = "Dependabot"
spec.email = "[email protected]"
spec.homepage = "https://github.com/hmarr/example"
spec.license = "MIT"

spec.require_path = "lib"
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md",
"lib/**/*", "helpers/**/*"]

spec.required_ruby_version = ">= 2.4.0"
spec.required_rubygems_version = ">= 2.6.11"

spec.add_dependency 'business', '~> 1.0'
end
5 changes: 5 additions & 0 deletions bundler/spec/fixtures/projects/bundler1/github_source/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "business", github: "gocardless/business"
gem "statesman", "~> 1.2.0"
20 changes: 20 additions & 0 deletions bundler/spec/fixtures/projects/bundler1/github_source/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
GIT
remote: git://github.com/gocardless/business.git
revision: d31e445215b5af70c1604715d97dd953e868380e
specs:
business (1.10.0)

GEM
remote: https://rubygems.org/
specs:
statesman (1.2.5)

PLATFORMS
ruby

DEPENDENCIES
business!
statesman (~> 1.2.0)

BUNDLED WITH
1.16.0.pre.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true
source "https://rubygems.org"

gemspec

gem "business", "~> 1.4.0"
gem "statesman", "~> 1.2.0"
Loading

0 comments on commit ce711fc

Please sign in to comment.