Sha256: fd9e8512945c5777b201c5f8b21c1068ef681bd1c1bf70a4d63f8c0395798a23

Contents?: true

Size: 1.12 KB

Versions: 23

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

# This script takes care of updating the content of the preloaded json in tests/index.html
# All you need to do is update the `tests_index_html` hash and run the script

require 'bundler/inline'
require 'json'
require 'cgi'

gemfile do
  source 'https://rubygems.org'
  gem 'nokogiri'
end

tests_index_html = {
  env_expandable_keys: [],
  gems_dir: "/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/",
  backtrace_links_enabled: true,
  gems_data: [
    {
      name: "activerecord",
      url: "https://github.com/rails/rails/tree/v6.0.1/activerecord"
    }
  ],
  directories: [
    {
      path: "/var/www/discourse",
      url: "https://github.com/discourse/discourse",
      main_app: true
    },
    {
      path: "/var/www/discourse/plugins/discourse-prometheus",
      url: "https://github.com/discourse/discourse-prometheus"
    }
  ],
  application_version: "ce512452b512b909c38e9c63f2a0e1f8c17a2399"
}

content = File.read("tests/index.html")
json = CGI.escapeHTML(JSON.generate(tests_index_html))
content.sub!(/data-preloaded=".*">$/, "data-preloaded=\"#{json}\">")
File.write("tests/index.html", content)

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
logster-2.12.2 client-app/preload-json-manager.rb
logster-2.12.1 client-app/preload-json-manager.rb
logster-2.11.4 client-app/preload-json-manager.rb
logster-2.11.3 client-app/preload-json-manager.rb
logster-2.11.2 client-app/preload-json-manager.rb
logster-2.11.1 client-app/preload-json-manager.rb
logster-2.11.0 client-app/preload-json-manager.rb
logster-2.10.1 client-app/preload-json-manager.rb
logster-2.10.0 client-app/preload-json-manager.rb
logster-2.9.8 client-app/preload-json-manager.rb
logster-2.9.7 client-app/preload-json-manager.rb
logster-2.9.6 client-app/preload-json-manager.rb
logster-2.9.5 client-app/preload-json-manager.rb
logster-2.9.4 client-app/preload-json-manager.rb
logster-2.9.3 client-app/preload-json-manager.rb
logster-2.9.2 client-app/preload-json-manager.rb
logster-2.9.1 client-app/preload-json-manager.rb
logster-2.9.0 client-app/preload-json-manager.rb
logster-2.8.0 client-app/preload-json-manager.rb
logster-2.7.1 client-app/preload-json-manager.rb