Sha256: d3048ff7ebcd3f62b703d3b75f9280d80daf8258ef18b56470a367ceecef24ba

Contents?: true

Size: 590 Bytes

Versions: 19

Compression:

Stored size: 590 Bytes

Contents

module Cucumber
  module HTMLFormatter
    class AssetsLoader
      def template
        read_asset('index.mustache.html')
      end

      def css
        read_asset('cucumber-html.css')
      end

      def script
        read_asset('cucumber-html.js')
      end

      private

      def read_asset(name)
        File.read(File.join(assets_path, name))
      end

      def assets_path
        "#{html_formatter_path}/assets"
      end

      def html_formatter_path
        Gem.loaded_specs['cucumber-html-formatter'].full_gem_path
      rescue
        '.'
      end

    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/assets_loader.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/assets_loader.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/assets_loader.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-20.2.1 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-20.2.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-20.1.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-20.0.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-19.2.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-19.1.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-19.0.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-18.0.0 lib/cucumber/html_formatter/assets_loader.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/cucumber-html-formatter-17.0.0/lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-17.0.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-16.0.1 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-16.0.0 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-15.0.2 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-15.0.1 lib/cucumber/html_formatter/assets_loader.rb
cucumber-html-formatter-15.0.0 lib/cucumber/html_formatter/assets_loader.rb