Sha256: 5b564677e1b29df39b1319c746df18da1bed5d2f7e683f8f98c216ac401c0f0d

Contents?: true

Size: 936 Bytes

Versions: 3

Compression:

Stored size: 936 Bytes

Contents

# frozen_string_literal: true

require "next_rails/gem_info"
require "next_rails/version"
require "next_rails/bundle_report"
require "next_rails/bundle_report/ruby_version_compatibility"
require "deprecation_tracker"

module NextRails
  @@next_bundle_gemfile = nil

  # This method will check your environment
  # (e.g. `ENV['BUNDLE_GEMFILE]`) to determine whether your application is
  # running with the next set of dependencies or the current set of dependencies.
  #
  # @return [Boolean]
  def self.next?
    return @@next_bundle_gemfile unless @@next_bundle_gemfile.nil?

    @@next_bundle_gemfile = File.exist?(ENV["BUNDLE_GEMFILE"]) && File.basename(ENV["BUNDLE_GEMFILE"]) == "Gemfile.next"
  end

  # This method will reset the @@next_bundle_gemfile variable. Then next time
  # you call `NextRails.next?` it will check the environment once again.
  def self.reset_next_bundle_gemfile
    @@next_bundle_gemfile = nil
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
next_rails-1.4.2 lib/next_rails.rb
next_rails-1.4.1 lib/next_rails.rb
next_rails-1.4.0 lib/next_rails.rb