Sha256: 35128af46bb84a8068a6b8210a845908186e7c3b92d1c168d688bf23a379baab

Contents?: true

Size: 380 Bytes

Versions: 132

Compression:

Stored size: 380 Bytes

Contents

module CmAdmin
  class VersionManager
    class << self
      def rails6?
        Rails::VERSION::MAJOR == 6
      end

      def rails7?
        Rails::VERSION::MAJOR == 7
      end

      def use_importmap?
        rails7? && File.exist?('config/importmap.rb')
      end

      def use_webpacker?
        rails6? && defined?(Webpacker) == 'constant'
      end
    end
  end
end

Version data entries

132 entries across 132 versions & 1 rubygems

Version Path
cm-admin-1.5.7 lib/cm_admin/version_manager.rb
cm-admin-1.5.6 lib/cm_admin/version_manager.rb
cm-admin-1.5.1 lib/cm_admin/version_manager.rb
cm-admin-1.5.0 lib/cm_admin/version_manager.rb
cm-admin-1.4.9 lib/cm_admin/version_manager.rb
cm-admin-1.4.8 lib/cm_admin/version_manager.rb
cm-admin-1.4.7 lib/cm_admin/version_manager.rb
cm-admin-1.4.6 lib/cm_admin/version_manager.rb
cm-admin-1.4.5 lib/cm_admin/version_manager.rb
cm-admin-1.4.4 lib/cm_admin/version_manager.rb
cm-admin-1.4.3 lib/cm_admin/version_manager.rb
cm-admin-1.4.2 lib/cm_admin/version_manager.rb
cm-admin-1.4.1 lib/cm_admin/version_manager.rb
cm-admin-1.4.0 lib/cm_admin/version_manager.rb
cm-admin-1.3.9 lib/cm_admin/version_manager.rb
cm-admin-1.3.8 lib/cm_admin/version_manager.rb
cm-admin-1.3.7 lib/cm_admin/version_manager.rb
cm-admin-1.3.6 lib/cm_admin/version_manager.rb
cm-admin-1.3.5 lib/cm_admin/version_manager.rb
cm-admin-1.3.4 lib/cm_admin/version_manager.rb