2024-02-17 10:04:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# frozen_string_literal: true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-14 02:29:30 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								require "bundler"
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-17 10:04:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								require "yaml"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-03 09:12:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RSpec.describe "Tapioca Config", type: :system do
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-17 10:04:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  let(:config) { YAML.load_file(File.join(__dir__, "../../../sorbet/tapioca/config.yml")) }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  it "only excludes dependencies" do
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    exclusions = config.dig("gem", "exclude")
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-14 02:29:30 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    dependencies = Bundler::Definition.build(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      HOMEBREW_LIBRARY_PATH/"Gemfile",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      HOMEBREW_LIBRARY_PATH/"Gemfile.lock",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      false,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    ).resolve.names
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-17 10:04:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    expect(exclusions - dependencies).to be_empty
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								end
							 |