Skip to content

Commit df2e92b

Browse files
committed
Trying to fix ci errors
1 parent a638592 commit df2e92b

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

spec/fixtures/templates/default_models_template.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
gem 'ruby_llm', path: ENV['RUBYLLM_PATH'] || '../../../..'
44

5-
bundle_command 'install'
65
generate 'ruby_llm:install'
76
rails_command 'db:migrate'
87
generate 'ruby_llm:chat_ui'

spec/fixtures/templates/namespaced_models_template.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
gem 'ruby_llm', path: ENV['RUBYLLM_PATH'] || '../../../..'
44

5-
bundle_command 'install'
65
generate 'ruby_llm:install',
76
'chat:Llm::Chat',
87
'message:Llm::Message',

spec/support/generator_test_helpers.rb

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,13 @@ def self.create_test_app(name, template:, template_path:)
2424

2525
create_command = [
2626
'bundle', 'exec', 'rails', 'new', name,
27-
'--skip-bootsnap', '--skip-bundle', '--skip-kamal', '--skip-thruster'
27+
'--skip-bootsnap', '--skip-bundle', '--skip-kamal', '--skip-thruster',
28+
'--skip-asset-pipeline', '--skip-javascript', '--skip-hotwire'
2829
]
2930
output, status = run_command(root_env, create_command, chdir: Dir.tmpdir)
3031
raise_command_error(name, create_command, status, output) unless status.success?
3132

32-
app_env = clean_bundle_env(
33-
ruby_llm_path: ruby_llm_path,
34-
bundle_gemfile: File.join(app_path, 'Gemfile')
35-
)
36-
37-
install_command = ['bundle', 'install', '--quiet']
38-
output, status = run_command(app_env, install_command, chdir: app_path)
39-
raise_command_error(name, install_command, status, output) unless status.success?
40-
33+
app_env = root_env
4134
template_command = ['bundle', 'exec', 'rails', 'app:template', "LOCATION=#{template_file}"]
4235
output, status = run_command(app_env, template_command, chdir: app_path)
4336
raise_command_error(name, template_command, status, output) unless status.success?
@@ -48,23 +41,6 @@ def self.run_command(env, command, chdir:)
4841
["#{stdout}#{stderr}", process_status]
4942
end
5043

51-
def self.clean_bundle_env(ruby_llm_path:, bundle_gemfile:)
52-
env = {
53-
'RUBYLLM_PATH' => ruby_llm_path,
54-
'BUNDLE_GEMFILE' => bundle_gemfile,
55-
'BUNDLE_IGNORE_CONFIG' => '1'
56-
}
57-
58-
ENV.each_key do |key|
59-
next unless key.start_with?('BUNDLE_')
60-
next if key == 'BUNDLE_GEMFILE'
61-
62-
env[key] = nil
63-
end
64-
65-
env
66-
end
67-
6844
def self.raise_command_error(name, command, status, output)
6945
raise <<~ERROR
7046
Failed to create test app #{name}
@@ -77,10 +53,8 @@ def self.raise_command_error(name, command, status, output)
7753

7854
def within_test_app(app_path, &)
7955
api_key = ENV.fetch('OPENAI_API_KEY', 'test')
80-
Bundler.with_unbundled_env do
81-
ENV['OPENAI_API_KEY'] = api_key
82-
Dir.chdir(app_path, &)
83-
end
56+
ENV['OPENAI_API_KEY'] = api_key
57+
Dir.chdir(app_path, &)
8458
end
8559

8660
# Instance methods for use in examples

0 commit comments

Comments
 (0)