+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/warbler/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ def specs(gem_dependencies)
# Add a single gem to WEB-INF/gems
def find_single_gem_files(gem_dependencies, gem_pattern, version = nil)
gem_spec_class = Gem::Specification
gem_spec_class = Gem::BasicSpecification if Gem.const_defined?(:BasicSpecification)
# Gem::Specification < Gem::BasicSpecification (since RGs 2.1)
case gem_pattern
when gem_spec_class
return BundlerHelper.to_spec(gem_pattern)
Expand Down
15 changes: 0 additions & 15 deletions lib/warbler/templates/bundler.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,3 @@ ENV['BUNDLE_WITHOUT'] = '<%= config.bundle_without.join(':') %>'
<% if config.bundler[:frozen] -%>
ENV['BUNDLE_FROZEN'] = '1'
<% end -%>

module Bundler
module Patch
def clean_load_path
# nothing to be done for embedded JRuby
end
end
module SharedHelpers
def included(bundler)
bundler.send :include, Patch
end
end
end

require 'bundler/shared_helpers'
2 changes: 2 additions & 0 deletions lib/warbler/templates/jar.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ ENV['GEM_PATH'] = nil # RGs sets Gem.paths.path = Gem.default_path + [ GEM_HOME
<% if config.bundler && config.bundler[:gemfile_path] -%>
ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join('..', '..', '<%= config.bundler[:gemfile_path] %>'), __FILE__)
<% end -%>
<%# Ensure any cached paths are cleared; otherwise behaviour can be indeterminate if the paths have already been read %>
# Gem.clear_paths
7 changes: 2 additions & 5 deletions lib/warbler/templates/war.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
if $servlet_context.nil?
ENV['GEM_HOME'] <%= config.override_gem_home ? '=' : '||=' %> File.expand_path(File.join('..', '..', '<%= config.gem_path %>'), __FILE__)
<% if config.override_gem_home -%>
<% # GEM_HOME/GEM_PATH are set as .war gets extracted (on java -jar ...)
# ... thus setting `ENV['GEM_PATH'] = nil` would cause a boot failure
-%>
<% end -%>
<% if config.bundler && config.bundler[:gemfile_path] -%>
ENV['BUNDLE_GEMFILE'] ||= File.expand_path(File.join('..', '..', '<%= config.bundler[:gemfile_path] %>'), __FILE__)
<% end -%>
Expand All @@ -17,3 +12,5 @@ else
ENV['BUNDLE_GEMFILE'] ||= $servlet_context.getRealPath('/<%= config.bundler[:gemfile_path] %>')
<% end -%>
end
<%# Ensure any cached paths are cleared; otherwise behaviour can be indeterminate if the paths have already been read %>
Gem.clear_paths
1 change: 1 addition & 0 deletions spec/rails7_stub/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ GEM
PLATFORMS
universal-java-1.8
universal-java-21
universal-java-8

DEPENDENCIES
activerecord-jdbcpostgresql-adapter (~> 70.0)
Expand Down
1 change: 1 addition & 0 deletions spec/sample_bundler/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GEM
PLATFORMS
universal-java-1.8
universal-java-21
universal-java-8

DEPENDENCIES
rake (= 13.3.0)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载