Flowdock
method

environment

Importance_0
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: ActiveSupport::Testing::Benchmarker

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.0) is shown here.

These similar methods exist in v5.2.3:

environment() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/testing/performance.rb, line 126
          def environment
            unless defined? @env
              app = "#{$1}.#{$2}" if File.directory?('.git') && `git branch -v` =~ /^\* (\S+)\s+(\S+)/

              rails = Rails::VERSION::STRING
              if File.directory?('vendor/rails/.git')
                Dir.chdir('vendor/rails') do
                  rails += ".#{$1}.#{$2}" if `git branch -v` =~ /^\* (\S+)\s+(\S+)/
                end
              end

              ruby = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
              ruby += "-#{RUBY_VERSION}.#{RUBY_PATCHLEVEL}"

              @env = [app, rails, ruby, RUBY_PLATFORM] * ','
            end

            @env
          end
Register or log in to add new notes.