update linters
This commit is contained in:
Родитель
e5c015bab5
Коммит
ef451f507b
36
Gemfile.lock
36
Gemfile.lock
|
@ -50,6 +50,7 @@ GEM
|
|||
i18n (1.14.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.7.1)
|
||||
language_server-protocol (3.17.0.3)
|
||||
minitest (5.22.3)
|
||||
mutex_m (0.2.0)
|
||||
net-http (0.4.1)
|
||||
|
@ -83,28 +84,31 @@ GEM
|
|||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.3)
|
||||
rubocop (1.29.1)
|
||||
rubocop (1.62.1)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (>= 3.17.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.0.0)
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.17.0, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.31.2)
|
||||
parser (>= 3.3.0.4)
|
||||
rubocop-github (0.17.0)
|
||||
rubocop
|
||||
rubocop-performance
|
||||
rubocop-rails
|
||||
rubocop-performance (1.13.3)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop-ast (>= 0.4.0)
|
||||
rubocop-rails (2.15.2)
|
||||
rubocop-github (0.20.0)
|
||||
rubocop (>= 1.37)
|
||||
rubocop-performance (>= 1.15)
|
||||
rubocop-rails (>= 2.17)
|
||||
rubocop-performance (1.20.2)
|
||||
rubocop (>= 1.48.1, < 2.0)
|
||||
rubocop-ast (>= 1.30.0, < 2.0)
|
||||
rubocop-rails (2.24.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
rubocop-ast (>= 1.31.1, < 2.0)
|
||||
ruby-progressbar (1.13.0)
|
||||
rugged (1.7.2)
|
||||
sawyer (0.9.2)
|
||||
|
@ -136,9 +140,9 @@ DEPENDENCIES
|
|||
rake (~> 13.0.6)
|
||||
rspec (~> 3.8.0)
|
||||
rspec-core (~> 3.8.0)
|
||||
rubocop (= 1.29.1)
|
||||
rubocop-github (= 0.17.0)
|
||||
rubocop-performance (= 1.13.3)
|
||||
rubocop (= 1.62.1)
|
||||
rubocop-github (= 0.20.0)
|
||||
rubocop-performance (= 1.20.2)
|
||||
rugged (~> 1.7, >= 1.7.2)
|
||||
simplecov (= 0.16.1)
|
||||
simplecov-erb (= 1.0.1)
|
||||
|
|
|
@ -23,9 +23,9 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency "rake", "~> 13.0.6"
|
||||
s.add_development_dependency "rspec", "~> 3.8.0"
|
||||
s.add_development_dependency "rspec-core", "~> 3.8.0"
|
||||
s.add_development_dependency "rubocop", "= 1.29.1"
|
||||
s.add_development_dependency "rubocop-github", "= 0.17.0"
|
||||
s.add_development_dependency "rubocop-performance", "= 1.13.3"
|
||||
s.add_development_dependency "rubocop", "= 1.62.1"
|
||||
s.add_development_dependency "rubocop-github", "= 0.20.0"
|
||||
s.add_development_dependency "rubocop-performance", "= 1.20.2"
|
||||
s.add_development_dependency "rugged", "~> 1.7", ">= 1.7.2"
|
||||
s.add_development_dependency "simplecov", "= 0.16.1"
|
||||
s.add_development_dependency "simplecov-erb", "= 1.0.1"
|
||||
|
|
|
@ -260,7 +260,7 @@ class FakeGitHubApi < Sinatra::Base
|
|||
query = postdata["query"]
|
||||
|
||||
result = if query =~ /team\(slug:/
|
||||
graphql_team_query(query)
|
||||
graphql_team_query(query)
|
||||
elsif query =~ /membersWithRole\(/
|
||||
graphql_org_query(query)
|
||||
elsif query =~ /pendingMembers\(/
|
||||
|
|
|
@ -86,30 +86,30 @@ describe Entitlements::Backend::GitHubTeam::Controller do
|
|||
)
|
||||
end
|
||||
|
||||
context "with changes" do
|
||||
let(:russian_blue_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=russian-blues,ou=kittensinc,ou=GitHub,dc=github,dc=com",
|
||||
members: Set.new(%w[RagaMuffin MAINECOON]),
|
||||
metadata: { "team_id" => 1001 }
|
||||
)
|
||||
end
|
||||
context "with changes" do
|
||||
let(:russian_blue_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=russian-blues,ou=kittensinc,ou=GitHub,dc=github,dc=com",
|
||||
members: Set.new(%w[RagaMuffin MAINECOON]),
|
||||
metadata: { "team_id" => 1001 }
|
||||
)
|
||||
end
|
||||
|
||||
let(:snowshoe_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=snowshoes,ou=kittensinc,ou=GitHub,dc=github,dc=com",
|
||||
members: Set.new(%w[blackmanx RagaMuffin MAINECOON])
|
||||
)
|
||||
end
|
||||
let(:snowshoe_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=snowshoes,ou=kittensinc,ou=GitHub,dc=github,dc=com",
|
||||
members: Set.new(%w[blackmanx RagaMuffin MAINECOON])
|
||||
)
|
||||
end
|
||||
|
||||
let(:chicken_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=chicken,ou=kittensinc,ou=GitHub,dc=github,dc=fake",
|
||||
members: Set.new(%w[BlackManx highlander RUSSIANBLue])
|
||||
)
|
||||
end
|
||||
let(:chicken_group) do
|
||||
Entitlements::Models::Group.new(
|
||||
dn: "cn=chicken,ou=kittensinc,ou=GitHub,dc=github,dc=fake",
|
||||
members: Set.new(%w[BlackManx highlander RUSSIANBLue])
|
||||
)
|
||||
end
|
||||
|
||||
it "logs expected output and returns expected actions" do
|
||||
it "logs expected output and returns expected actions" do
|
||||
allow(Entitlements::Data::Groups::Calculated).to receive(:read_all)
|
||||
.with("foo-githubteam", {"base"=>"ou=kittensinc,ou=GitHub,dc=github,dc=com", "org"=>"kittensinc", "token"=>"CuteAndCuddlyKittens", "ignore_not_found"=>false})
|
||||
.and_return(Set.new(%w[snowshoes russian-blues]))
|
||||
|
@ -145,8 +145,8 @@ describe Entitlements::Backend::GitHubTeam::Controller do
|
|||
expect(result[1].dn).to eq("russian-blues")
|
||||
expect(result[1].existing.member_strings).to eq(Set.new(%w[blackmanx mainecoon]))
|
||||
expect(result[1].updated.member_strings).to eq(Set.new(%w[RagaMuffin MAINECOON]))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "with no changes" do
|
||||
let(:russian_blue_group) do
|
||||
|
|
|
@ -711,14 +711,14 @@ describe Entitlements::Backend::GitHubTeam::Service do
|
|||
"Content-Type" => "application/json",
|
||||
}).to_return(status: 200, body: graphql_dotcom_response)
|
||||
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -751,14 +751,14 @@ describe Entitlements::Backend::GitHubTeam::Service do
|
|||
{ status: 200, body: graphql_dotcom_response_3 }
|
||||
)
|
||||
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -791,14 +791,14 @@ describe Entitlements::Backend::GitHubTeam::Service do
|
|||
{ status: 200, body: graphql_dotcom_response_3 }
|
||||
)
|
||||
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
result = subject.send(:graphql_team_data, "grumpy-cat")
|
||||
members = ["highlander", "blackmanx", "toyger", "ocicat", "hubot", "korat", "mainecoon", "russianblue", "ragamuffin", "minskin"]
|
||||
expect(result).to eq(
|
||||
members:,
|
||||
team_id: 593721,
|
||||
parent_team_name: nil,
|
||||
roles: Hash[*members.collect { |member| [member, "member"] }.flatten],
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче