Skip to content

Commit 437cba8

Browse files
committed
Revert "Land rapid7#8090, support rails usage of spec files list"
Another approach is needed here. This reverts commit 8207302. This reverts commit b55ee87.
1 parent 8b7125e commit 437cba8

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

metasploit-framework.gemspec

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
# During build, the Gemfile is temporarily moved and
44
# we must manually define the project root
5-
if ENV['MSF_ROOT'] || ENV['RAILS_ENV']
5+
if ENV['MSF_ROOT']
66
lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
7-
files = `git ls-files`.split($/).reject { |file|
8-
file =~ /^documentation|^data\/gui|^external/
9-
}
107
else
11-
# have to use realpath as metasploit-framework is often loaded through a
12-
# symlink and tools like Coverage and debuggers require realpaths.
8+
# have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
9+
# require realpaths.
1310
lib = File.realpath(File.expand_path('../lib', __FILE__))
14-
files = []
1511
end
1612

1713
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -28,8 +24,10 @@ Gem::Specification.new do |spec|
2824
spec.homepage = 'https://www.metasploit.com'
2925
spec.license = 'BSD-3-clause'
3026

31-
spec.files = files
32-
spec.bindir = '.'
27+
spec.files = `git ls-files`.split($/).reject { |file|
28+
file =~ /^documentation|^data\/gui|^external/
29+
}
30+
spec.bindir = '.'
3331
if ENV['CREATE_BINSTUBS']
3432
spec.executables = [
3533
'msfconsole',

0 commit comments

Comments
 (0)