Skip to content

Commit

Permalink
fix: hardcode file requires
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 9, 2021
1 parent bca693d commit 581f2fd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
7 changes: 4 additions & 3 deletions lib/pact_broker/client/deployments.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Dir.glob(File.join(__FILE__.gsub(".rb", "/**/*.rb"))).sort.each do | path |
require path
end
require 'pact_broker/client/deployments/record_deployment'
require 'pact_broker/client/deployments/record_release'
require 'pact_broker/client/deployments/record_undeployment'

9 changes: 6 additions & 3 deletions lib/pact_broker/client/environments.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Dir.glob(File.join(__FILE__.gsub(".rb", "/**/*.rb"))).sort.each do | path |
require path
end
require 'pact_broker/client/environments/create_environment'
require 'pact_broker/client/environments/delete_environment'
require 'pact_broker/client/environments/describe_environment'
require 'pact_broker/client/environments/list_environments'
require 'pact_broker/client/environments/update_environment'

6 changes: 3 additions & 3 deletions lib/pact_broker/client/pacticipants.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# New code
Dir.glob(File.join(__FILE__.gsub(".rb", "/**/*.rb"))).sort.each do | path |
require path
end
require 'pact_broker/client/pacticipants/create'
require 'pact_broker/client/pacticipants/describe'
require 'pact_broker/client/pacticipants/list'

# Old code
require 'pact_broker/client/base_client'
Expand Down
7 changes: 2 additions & 5 deletions lib/pact_broker/client/versions.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require_relative 'base_client'

Dir.glob(File.join(__FILE__.gsub(".rb", "/**/*.rb"))).sort.each do | path |
require path
end
require 'pact_broker/client/base_client'
require 'pact_broker/client/versions/describe'

# Old code
require 'pact_broker/client/pacts'
Expand Down

0 comments on commit 581f2fd

Please sign in to comment.