@@ -78,17 +78,6 @@ def self.git_version
7878 "not installed"
7979 end
8080
81- def self . version_of ( script )
82- return "not installed" unless Bundler . which ( script )
83- `#{ script } --version` . chomp
84- end
85-
86- def self . chruby_version
87- return "not installed" unless Bundler . which ( "chruby-exec" )
88- `chruby-exec -- chruby --version` .
89- sub ( /.*^chruby: (#{ Gem ::Version ::VERSION_PATTERN } ).*/m , '\1' )
90- end
91-
9281 def self . environment
9382 out = [ ]
9483
@@ -110,16 +99,8 @@ def self.environment
11099 out << [ " Cert File" , OpenSSL ::X509 ::DEFAULT_CERT_FILE ] if defined? ( OpenSSL ::X509 ::DEFAULT_CERT_FILE )
111100 out << [ " Cert Dir" , OpenSSL ::X509 ::DEFAULT_CERT_DIR ] if defined? ( OpenSSL ::X509 ::DEFAULT_CERT_DIR )
112101 end
113- out << [ "Tools" ]
114- out << [ " Git" , git_version ]
115- out << [ " RVM" , ENV . fetch ( "rvm_version" ) { version_of ( "rvm" ) } ]
116- out << [ " rbenv" , version_of ( "rbenv" ) ]
117- out << [ " chruby" , chruby_version ]
118-
119- %w[ rubygems-bundler open_gem ] . each do |name |
120- specs = Bundler . rubygems . find_name ( name )
121- out << [ " #{ name } " , "(#{ specs . map ( &:version ) . join ( "," ) } )" ] unless specs . empty?
122- end
102+ out << [ "Git" , git_version ]
103+
123104 if ( exe = caller_locations . last . absolute_path ) &.match? %r{(exe|bin)/bundler?\z }
124105 shebang = File . read ( exe ) . lines . first
125106 shebang . sub! ( /^#!\s */ , "" )
@@ -143,6 +124,6 @@ def self.append_formatted_table(title, pairs, out)
143124 out << "```\n "
144125 end
145126
146- private_class_method :read_file , :ruby_version , :git_version , :append_formatted_table , :version_of , :chruby_version
127+ private_class_method :read_file , :ruby_version , :git_version , :append_formatted_table
147128 end
148129end
0 commit comments