instance method environment

Ruby on Rails 3.0.20

Since v2.2.3 Last seen in v3.2.22.5

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

environment()

No documentation comment.

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

Defined in activesupport/lib/active_support/testing/performance.rb line 126 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Testing::Performance::Benchmarker

Type at least 2 characters to search.

↑↓ navigate · open · esc close