Sha256: 7dc00233cc063792640b6870b670d917e61582da8001c2f9073108d685c7cb69

Contents?: true

Size: 904 Bytes

Versions: 12

Compression:

Stored size: 904 Bytes

Contents

# frozen_string_literal: true

module Headdesk
  module Checks
    module Teak
      #
      # Check to make sure that an APK, which uses Teak, has caching enabled.
      #
      class Caching
        include Checks::Teak::APK

        check_name 'caching'
        describe 'Check for io_teak_enable_caching'
        def call
          describe 'Teak SDK version is lower than 2.0.0'
          major, = apk.find_class('io.teak.sdk.Teak')
                      .field('SDKVersion')
                      .value
                      .to_version
          skip_check if: major.to_i >= 2

          describe "APK enables caching of Teak notification content (via 'io_teak_enable_caching')"
          fail_check unless: apk.resources
                                .values
                                .bool
                                .io_teak_enable_caching
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
headdesk-0.12.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.11.3 lib/headdesk/checks/teak/caching.rb
headdesk-0.11.2 lib/headdesk/checks/teak/caching.rb
headdesk-0.11.1 lib/headdesk/checks/teak/caching.rb
headdesk-0.11.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.10.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.9.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.8.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.7.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.6.0 lib/headdesk/checks/teak/caching.rb
headdesk-0.5.2 lib/headdesk/checks/teak/caching.rb
headdesk-0.5.1 lib/headdesk/checks/teak/caching.rb