forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebc8349
commit 36bc4a1
Showing
5 changed files
with
277 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# frozen_string_literal: true | ||
|
||
require "aws-sdk-codecommit" | ||
require "spec_helper" | ||
require "dependabot/clients/codecommit" | ||
|
||
RSpec.describe Dependabot::Clients::CodeCommit do | ||
let(:branch) { "master" } | ||
let(:repo) { "gocardless" } | ||
let(:credentials) do | ||
[{ | ||
"type" => "git_source", | ||
"region" => "us-east-1", | ||
"username" => "AWS_ACCESS_KEY_ID", | ||
"password" => "AWS_SECRET_ACCESS_KEY" | ||
}] | ||
end | ||
let(:source) { Dependabot::Source.from_url("codecommit") } | ||
let(:client) do | ||
described_class.for_source(source: source, credentials: credentials) | ||
end | ||
|
||
describe "#fetch_commit" do | ||
subject { client.fetch_commit(nil, branch) } | ||
|
||
context "when a response is returned" do | ||
before do | ||
client. | ||
stub_responses( | ||
:get_branch, | ||
branch: | ||
{ | ||
branch_name: "master", | ||
commit_id: "9c8376e9b2e943c2c72fac4b239876f377f0305a" | ||
} | ||
) | ||
end | ||
|
||
specify { expect { subject }.to_not raise_error } | ||
|
||
it { is_expected.to eq("9c8376e9b2e943c2c72fac4b239876f377f0305a") } | ||
end | ||
|
||
context "when the target branch does not exist" do | ||
before do | ||
client.stub_responses(:get_branch, "BranchDoesNotExistException") | ||
end | ||
|
||
it "raises a helpful error" do | ||
expect { subject }.to raise_error( | ||
Aws::CodeCommit::Errors::BranchDoesNotExistException | ||
) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# -*- encoding: utf-8 -*- | ||
# stub: pg 1.2.0.pre20180828173948 ruby lib | ||
# stub: ext/extconf.rb | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "pg".freeze | ||
s.version = "1.2.0.pre20180828173948" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version= | ||
s.require_paths = ["lib".freeze] | ||
s.authors = ["Michael Granger".freeze, "Lars Kanis".freeze] | ||
s.cert_chain = ["certs/ged.pem".freeze] | ||
s.date = "2018-08-29" | ||
s.description = "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].\n\nIt works with {PostgreSQL 9.2 and later}[http://www.postgresql.org/support/versioning/].\n\nA small example usage:\n\n #!/usr/bin/env ruby\n\n require 'pg'\n\n # Output a table of current connections to the DB\n conn = PG.connect( dbname: 'sales' )\n conn.exec( \"SELECT * FROM pg_stat_activity\" ) do |result|\n puts \" PID | User | Query\"\n result.each do |row|\n puts \" %7d | %-16s | %s \" %\n row.values_at('procpid', 'usename', 'current_query')\n end\n end".freeze | ||
s.email = ["ged@FaerieMUD.org".freeze, "lars@greiz-reinsdorf.de".freeze] | ||
s.extensions = ["ext/extconf.rb".freeze] | ||
s.extra_rdoc_files = ["Contributors.rdoc".freeze, "History.rdoc".freeze, "Manifest.txt".freeze, "README-OS_X.rdoc".freeze, "README-Windows.rdoc".freeze, "README.ja.rdoc".freeze, "README.rdoc".freeze, "ext/errorcodes.txt".freeze, "Contributors.rdoc".freeze, "History.rdoc".freeze, "README-OS_X.rdoc".freeze, "README-Windows.rdoc".freeze, "README.ja.rdoc".freeze, "README.rdoc".freeze, "POSTGRES".freeze, "LICENSE".freeze, "ext/gvl_wrappers.c".freeze, "ext/pg.c".freeze, "ext/pg_binary_decoder.c".freeze, "ext/pg_binary_encoder.c".freeze, "ext/pg_coder.c".freeze, "ext/pg_connection.c".freeze, "ext/pg_copy_coder.c".freeze, "ext/pg_errors.c".freeze, "ext/pg_result.c".freeze, "ext/pg_text_decoder.c".freeze, "ext/pg_text_encoder.c".freeze, "ext/pg_tuple.c".freeze, "ext/pg_type_map.c".freeze, "ext/pg_type_map_all_strings.c".freeze, "ext/pg_type_map_by_class.c".freeze, "ext/pg_type_map_by_column.c".freeze, "ext/pg_type_map_by_mri_type.c".freeze, "ext/pg_type_map_by_oid.c".freeze, "ext/pg_type_map_in_ruby.c".freeze, "ext/util.c".freeze] | ||
s.files = ["BSDL".freeze, "ChangeLog".freeze, "Contributors.rdoc".freeze, "History.rdoc".freeze, "LICENSE".freeze, "Manifest.txt".freeze, "POSTGRES".freeze, "README-OS_X.rdoc".freeze, "README-Windows.rdoc".freeze, "README.ja.rdoc".freeze, "README.rdoc".freeze, "Rakefile".freeze, "Rakefile.cross".freeze, "ext/errorcodes.def".freeze, "ext/errorcodes.rb".freeze, "ext/errorcodes.txt".freeze, "ext/extconf.rb".freeze, "ext/gvl_wrappers.c".freeze, "ext/gvl_wrappers.h".freeze, "ext/pg.c".freeze, "ext/pg.h".freeze, "ext/pg_binary_decoder.c".freeze, "ext/pg_binary_encoder.c".freeze, "ext/pg_coder.c".freeze, "ext/pg_connection.c".freeze, "ext/pg_copy_coder.c".freeze, "ext/pg_errors.c".freeze, "ext/pg_result.c".freeze, "ext/pg_text_decoder.c".freeze, "ext/pg_text_encoder.c".freeze, "ext/pg_tuple.c".freeze, "ext/pg_type_map.c".freeze, "ext/pg_type_map_all_strings.c".freeze, "ext/pg_type_map_by_class.c".freeze, "ext/pg_type_map_by_column.c".freeze, "ext/pg_type_map_by_mri_type.c".freeze, "ext/pg_type_map_by_oid.c".freeze, "ext/pg_type_map_in_ruby.c".freeze, "ext/util.c".freeze, "ext/util.h".freeze, "ext/vc/pg.sln".freeze, "ext/vc/pg_18/pg.vcproj".freeze, "ext/vc/pg_19/pg_19.vcproj".freeze, "lib/pg.rb".freeze, "lib/pg/basic_type_mapping.rb".freeze, "lib/pg/binary_decoder.rb".freeze, "lib/pg/coder.rb".freeze, "lib/pg/connection.rb".freeze, "lib/pg/constants.rb".freeze, "lib/pg/exceptions.rb".freeze, "lib/pg/result.rb".freeze, "lib/pg/text_decoder.rb".freeze, "lib/pg/text_encoder.rb".freeze, "lib/pg/tuple.rb".freeze, "lib/pg/type_map_by_column.rb".freeze, "spec/data/expected_trace.out".freeze, "spec/data/random_binary_data".freeze, "spec/helpers.rb".freeze, "spec/pg/basic_type_mapping_spec.rb".freeze, "spec/pg/connection_spec.rb".freeze, "spec/pg/connection_sync_spec.rb".freeze, "spec/pg/result_spec.rb".freeze, "spec/pg/tuple_spec.rb".freeze, "spec/pg/type_map_by_class_spec.rb".freeze, "spec/pg/type_map_by_column_spec.rb".freeze, "spec/pg/type_map_by_mri_type_spec.rb".freeze, "spec/pg/type_map_by_oid_spec.rb".freeze, "spec/pg/type_map_in_ruby_spec.rb".freeze, "spec/pg/type_map_spec.rb".freeze, "spec/pg/type_spec.rb".freeze, "spec/pg_spec.rb".freeze] | ||
s.homepage = "https://bitbucket.org/ged/ruby-pg".freeze | ||
s.licenses = ["BSD-3-Clause".freeze] | ||
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] | ||
s.required_ruby_version = Gem::Requirement.new(">= 2.0.0".freeze) | ||
s.rubygems_version = "2.7.6".freeze | ||
s.summary = "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]".freeze | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 4 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_development_dependency(%q<hoe-mercurial>.freeze, ["~> 1.4"]) | ||
s.add_development_dependency(%q<hoe-deveiate>.freeze, ["~> 0.9"]) | ||
s.add_development_dependency(%q<hoe-highline>.freeze, ["~> 0.2"]) | ||
s.add_development_dependency(%q<rake-compiler>.freeze, ["~> 1.0"]) | ||
s.add_development_dependency(%q<rake-compiler-dock>.freeze, [">= 0.6.2", "~> 0.6"]) | ||
s.add_development_dependency(%q<hoe-bundler>.freeze, ["~> 1.0"]) | ||
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5"]) | ||
s.add_development_dependency(%q<rdoc>.freeze, ["~> 5.1"]) | ||
s.add_development_dependency(%q<hoe>.freeze, ["~> 3.16"]) | ||
else | ||
s.add_dependency(%q<hoe-mercurial>.freeze, ["~> 1.4"]) | ||
s.add_dependency(%q<hoe-deveiate>.freeze, ["~> 0.9"]) | ||
s.add_dependency(%q<hoe-highline>.freeze, ["~> 0.2"]) | ||
s.add_dependency(%q<rake-compiler>.freeze, ["~> 1.0"]) | ||
s.add_dependency(%q<rake-compiler-dock>.freeze, [">= 0.6.2", "~> 0.6"]) | ||
s.add_dependency(%q<hoe-bundler>.freeze, ["~> 1.0"]) | ||
s.add_dependency(%q<rspec>.freeze, ["~> 3.5"]) | ||
s.add_dependency(%q<rdoc>.freeze, ["~> 5.1"]) | ||
s.add_dependency(%q<hoe>.freeze, ["~> 3.16"]) | ||
end | ||
else | ||
s.add_dependency(%q<hoe-mercurial>.freeze, ["~> 1.4"]) | ||
s.add_dependency(%q<hoe-deveiate>.freeze, ["~> 0.9"]) | ||
s.add_dependency(%q<hoe-highline>.freeze, ["~> 0.2"]) | ||
s.add_dependency(%q<rake-compiler>.freeze, ["~> 1.0"]) | ||
s.add_dependency(%q<rake-compiler-dock>.freeze, [">= 0.6.2", "~> 0.6"]) | ||
s.add_dependency(%q<hoe-bundler>.freeze, ["~> 1.0"]) | ||
s.add_dependency(%q<rspec>.freeze, ["~> 3.5"]) | ||
s.add_dependency(%q<rdoc>.freeze, ["~> 5.1"]) | ||
s.add_dependency(%q<hoe>.freeze, ["~> 3.16"]) | ||
end | ||
end |