Compare commits

..

3 Commits

73 changed files with 325 additions and 1883 deletions
+2 -19
View File
@@ -34,22 +34,5 @@ jobs:
run: echo ${{ steps.docker_build.outputs.digest }}
- name: docker state
run: docker image ls
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
bundler-cache: true
- name: Install Chromedriver
uses: nanasess/setup-chromedriver@v1
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Run gollum from Docker
run: |
git clone test/examples/lotr.git /tmp/lotr.git
RUNNER_TRACKING_ID="" docker run --rm -p 4567:4567 -v /tmp/lotr.git:/wiki -e CI=true ${{ env.CI_IMAGE }} --mathjax --mermaid &
sleep 10
netstat -lt
- name: Run capybara tests against Dockerized instance
run: "GOLLUM_CAPYBARA_URL=http://127.0.0.1:4567 bundle exec rake test:capybara"
- name: Run gollum as test
run: docker run -e CI=true ${{ env.CI_IMAGE }} --irb
-22
View File
@@ -44,25 +44,3 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rake
selenium:
name: Selenium on MRI
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install Chromedriver
uses: nanasess/setup-chromedriver@v1
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Run tests
run: bundle exec rake test:capybara
+9 -94
View File
@@ -29,85 +29,14 @@ Lastly, please **consider helping out** by opening a Pull Request!
You can triage issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to gollum on CodeTriage](https://www.codetriage.com/gollum/gollum).
## Set up your development environment
If you want to hack on Gollum, you'll need to set up a development
environment.
To get started, you'll need:
- A recent version of [Git][git]
- A recent version of [Ruby][rubylang].
- A recent version of [Node JS][nodejs].
Refer to their installation instructions. Installation methods differ depending
on your operating system.
Once you have those:
- Install Bundler, the Ruby package manager. In a terminal:
```sh
gem install bundler
```
- Install Yarn, a JavaScript package manager. [See Yarn's install
guide][yarn-install].
Now, you can start setting up Gollum to run locally:
1. Clone the git repository. In a terminal:
```sh
git clone https://github.com/gollum/gollum.git
```
2. Change directory into the cloned project:
```sh
cd gollum
```
3. Bundle the project's Ruby dependencies using Bundler:
```sh
[sudo] bundle install
```
4. Install the project's JavaScript dependencies using Yarn:
```sh
yarn install
```
If all went well, you should now be able to run the test suite using the
following command:
```sh
bundle exec rake
```
If you already have a Gollum wiki, you can also browse it via your local version
of Gollum:
```sh
bundle exec gollum <path/to/my/wiki/root>
```
Or you can clone an example wiki and browse that:
```sh
git clone test/examples/lotr.git ~/lotr-wiki
bundle exec gollum ~/lotr-wiki
```
With this, you're ready to start contributing and open your first [pull
request](#opening-a-pull-request).
[git]: https://git-scm.com/downloads
[nodejs]: https://nodejs.org
[rubylang]: https://www.ruby-lang.org
[yarn-install]: https://yarnpkg.com/getting-started/install
## Opening a Pull Request
Pull Requests fixing bugs, implementing new features, or updating documentation and dependencies are all very welcome! If you would like to help out with the project, you can pick an open issue from the issue tracker. We're more than happy to help you get started! Here's how you can proceed:
1. Fork and clone Gollum. See [Set up your development
environment](#set-up-your-development-environment).
1. Fork and clone Gollum.
2. Create a thoughtfully named topic branch to contain your changes.
3. If you haven't installed dependencies yet, navigate to your clone and execute:
3. If you haven't installed dependencies yet, navigate to your clone and execute:
```
[sudo] bundle install
```
@@ -118,32 +47,23 @@ Pull Requests fixing bugs, implementing new features, or updating documentation
8. Push the branch to your fork on GitHub.
9. Create a pull request for Gollum.
Do not change Gollum's version number, we will do that on our own.
**Notes:**
* Do not change Gollum's version numbers, we will do that on our own.
### Running tests
1. Install [Bundler](http://bundler.io/).
2. Navigate to the cloned source of Gollum.
3. Install dependencies:
3. Install dependencies:
```
[sudo] bundle install
```
4. Run the tests:
4. Run the tests:
```
bundle exec rake test
```
To profile slow tests, you can use the `--verbose` flag:
```sh
bundle exec rake test TESTOPTS="--verbose"
```
You can also run a single test file with the following command:
```sh
bundle exec ruby <test/test_the_file_i_want_to_run.rb>
```
To profile slow tests, you can use `bundle exec rake test TESTOPTS="--verbose"`.
### Working with test repositories
@@ -162,12 +82,7 @@ git push ../lotr.git/ master
## Updating static assets
This is necessary whenever changes have been made to the assets in
`lib/gollum/public/gollum/javascript` (mostly SASS, CSS, and JS files), to
ensure the changes are also present in the [released](#releasing-the-gem)
version of the gem.
Steps:
This is necessary whenever changes have been made to the assets in `lib/gollum/public/gollum/javascript` (mostly SASS, CSS, and JS files), to ensure the changes are also present in the [released](#releasing-the-gem) version of the gem. Steps:
1. `git rm -r lib/gollum/public/assets`
1. `bundle exec rake precompile`
-5
View File
@@ -18,11 +18,6 @@ gem 'warbler', platforms: :jruby
# current CI workflows pass, we should only try to install this version of
# Nokogiri for newer Ruby versions.
group :test do
gem 'selenium-webdriver', require: false
gem 'capybara', require: false
end
gemspec
gem 'rake', '~> 13.0'
+2 -2
View File
@@ -34,7 +34,7 @@
* Bugfixes
* Add autosave feature (#1576)
* Add quick access to diff of each commit in the history
* Add Add quick access to diff of each commit in the history
# 5.0 / 2020-03-17
@@ -82,7 +82,7 @@ Many of these changes have been made possible by removing the default grit adapt
* Major enhancements
* Made the Gollum theme responsive [@rtrvrtg](https://github.com/rtrvrtg) (#831)
* Depends on new [gollum-lib](https://github.com/gollum/gollum-lib) `4.0.0`
* Allows specifying [git adapter](https://github.com/gollum/gollum/wiki/Git-adapters) with `--adapter` [@bartkamphorst](https://github.com/bartkamphorst), [@dometto](https://github.com/dometto)
* Allows specifiying [git adapter](https://github.com/gollum/gollum/wiki/Git-adapters) with `--adapter` [@bartkamphorst](https://github.com/bartkamphorst), [@dometto](https://github.com/dometto)
* Numerous bugfixes
* **NB**: please pass `--h1-title` if you do not want page titles to default to the page's filepath. See [here](https://github.com/gollum/gollum/wiki/Page-titles).
+4 -1
View File
@@ -136,7 +136,6 @@ Gollum comes with the following command line options:
| --template-dir | [PATH] | Specify custom mustache template directory. Only overrides templates that exist in this directory. |
| --template-page | none | Use _Template in root as a template for new pages. Must be committed. |
| --emoji | none | Parse and interpret emoji tags (e.g. `:heart:`) except when the leading colon is backslashed (e.g. `\:heart:`). |
| --default-keybind | none | Set the default keybinding for the editor. Can be set to `vim`, or `emacs`. |
| --lenient-tag-lookup | none | Internal links resolve case-insensitively, will treat spaces as hyphens, and will match the first page found with a certain filename, anywhere in the repository. Provides compatibility with Gollum 4.x. |
| --help | none | Display the list of options on the command line. |
| --version | none | Display the current version of Gollum. |
@@ -158,3 +157,7 @@ When `--config` option is used, certain inner parts of Gollum can be customized.
## CONTRIBUTING
Please consider helping out! See [CONTRIBUTING](CONTRIBUTING.md) for information on how to submit issues, and how to start hacking on gollum.
## THANKS TO
[![Testing Powered By SauceLabs](https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-gray.png?sanitize=true "Testing Powered By SauceLabs")](https://saucelabs.com)
+9 -47
View File
@@ -43,7 +43,7 @@ def bump_version
old_file = File.read("lib/#{name}.rb")
old_version_line = old_file[/^\s*VERSION\s*=\s*.*/]
new_version = next_version
# replace first match of old version with new version
# replace first match of old vesion with new version
old_file.sub!(old_version_line, " VERSION = '#{new_version}'")
File.write("lib/#{name}.rb", old_file)
@@ -72,21 +72,9 @@ end
task :default => :test
require 'rake/testtask'
namespace :test do
Rake::TestTask.new('capybara') do |test|
test.libs << 'lib' << 'test' << '.'
test.pattern = 'test/integration/**/test_*.rb'
test.verbose = true
test.warning = false
end
end
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test' << '.'
test.test_files = FileList.new('test/**/test_*.rb') do |fl|
fl.exclude('test/integration/**/test_*.rb')
end
test.pattern = 'test/**/test_*.rb'
test.verbose = true
test.warning = false
end
@@ -194,7 +182,7 @@ task :validate do
end
end
desc 'Build changelog'
desc 'Build changlog'
task :changelog do
[latest_changes_file, history_file].each do |f|
unless File.exists?(f)
@@ -202,10 +190,10 @@ task :changelog do
exit!
end
end
latest_changes = File.open(latest_changes_file)
version_pattern = "# #{version}"
if !`grep "#{version_pattern}" #{history_file}`.empty?
puts "#{version} is already described in #{history_file}"
exit!
@@ -220,13 +208,13 @@ task :changelog do
puts "#{latest_changes_file} is empty!"
exit!
end
body = latest_changes.read
body.scan(/\s*#\s+\d\.\d.*/) do |match|
puts "#{latest_changes_file} may not contain multiple markdown headers!"
exit!
end
temp = Tempfile.new
temp.puts("#{version_pattern} / #{date}\n#{body}\n")
temp.close
@@ -236,36 +224,11 @@ end
desc 'Precompile assets'
task :precompile do
# Attempt to install JavaScript dependencies managed by Yarn via the
# `package.json` file in Gollum's project root. If it fails, raise an error
# and exit the task early.
puts "\n Installing `yarn`-managed JavaScript dependencies... \n\n"
system "yarn install"
unless $?.success?
raise "This task tried to run `yarn install` to get up-to-date " \
"JavaScript dependencies before precompilation. But it failed. Please " \
"run `yarn install` manually from your shell and resolve any issues. " \
"It's possible that you just need to install `yarn` on your system."
end
require 'uglifier'
module Precious
module Assets
JS_COMPRESSOR = ::Uglifier.new(harmony: true)
end
end
require './lib/gollum/app.rb'
# Next, configure the Sprockets asset pipeline and precompile production-
# ready assets.
Precious::App.set(:environment, :production)
env = Precious::Assets.sprockets
path = ENV.fetch 'GOLLUM_ASSETS_PATH',
File.join(File.dirname(__FILE__), 'lib/gollum/public/assets')
path = ENV.fetch('GOLLUM_ASSETS_PATH', ::File.join(File.dirname(__FILE__), 'lib/gollum/public/assets'))
manifest = Sprockets::Manifest.new(env, path)
Sprockets::Helpers.configure do |config|
config.environment = env
config.prefix = Precious::Assets::ASSET_URL
@@ -273,7 +236,6 @@ task :precompile do
config.public_path = path
config.manifest = manifest
end
puts "\n Precompiling assets to #{path}... \n\n"
puts "Precompiling assets to #{path}..."
manifest.compile(Precious::Assets::MANIFEST)
end
+9 -15
View File
@@ -15,7 +15,7 @@ options = {
}
wiki_options = {
:allow_uploads => false,
:allow_editing => true
:allow_editing => true,
}
opts = OptionParser.new do |opts|
@@ -94,7 +94,13 @@ MSG
'Example: setting this to \'pages\' will make Gollum serve only pages at \'<git-repo>/pages/*\'.') do |path|
wiki_options[:page_file_dir] = path
end
opts.on('--assets [PATH]', 'Set the path to look for stylesheets and javascript. Only used if environment is production/staging. Default: ./public/assets') do |path|
opts.on('--static', 'Use static assets. Defaults to false in development/test, defaults to true in production/staging.') do
wiki_options[:static] = true
end
opts.on('--no-static', 'Do not use static assets (even when in production/staging).') do
wiki_options[:static] = false
end
opts.on('--assets [PATH]', 'Set the path to look for static assets. Only used if --static is set to true, or environment is production/staging. Default: ./public/assets') do |path|
wiki_options[:static_assets_path] = path
end
opts.on('--css', 'Inject custom CSS into each page. The \'<wiki-root>/custom.css\' file is used (must be committed).') do
@@ -129,9 +135,6 @@ MSG
opts.on('--critic-markup', 'Enable support for annotations using CriticMarkup.') do
wiki_options[:critic_markup] = true
end
opts.on('--mermaid', 'Enable support for Mermaid diagrams.') do
wiki_options[:mermaid] = true
end
opts.on('--irb', 'Launch Gollum in \'console mode\', with a predefined API.') do
options[:irb] = true
end
@@ -163,10 +166,6 @@ MSG
opts.on('--emoji', 'Parse and interpret emoji tags (e.g. :heart:) except when the leading colon is backslashed (e.g. \\:heart:).') do
wiki_options[:emoji] = true
end
opts.on('--default-keybinding [KEYBINDING]', Gollum::KEYBINDINGS.drop(1), 'Set the default keybinding for the editor. Can be set to \'vim\', or \'emacs\'.') do |keybinding|
wiki_options[:default_keybinding] = keybinding.to_s
puts wiki_options[:default_keybinding]
end
opts.separator ''
opts.separator ' Common:'
@@ -187,7 +186,7 @@ MSG
gollum_gems = ['gollum-lib', 'gollum-rjgit_adapter', 'rjgit', 'gollum-rugged_adapter', 'rugged']
puts Gem.loaded_specs.select{|name, spec| gollum_gems.include?(name)}.map {|name, spec| "#{name} #{spec.version}"}
puts "Markdown rendering gem: #{GitHub::Markup::Markdown.implementation_name}"
puts 'Other rendering gems:'
puts 'Other renderering gems:'
renderer_gems = ['RedCloth', 'org-ruby', 'creole', 'asciidoctor', 'wikicloth']
renderer_gems.each do |renderer|
begin
@@ -202,11 +201,6 @@ MSG
opts.separator ''
opts.separator ' Development:'
opts.on('--development-assets', 'For development purposes only. Use local stylesheets and javascript instead of the packaged assets.') do
wiki_options[:static] = false
end
end
# Read command line options into `options` hash
+3 -3
View File
@@ -20,11 +20,11 @@ end
opts = OptionParser.new do |opts|
opts.banner = <<EOF
Use this tool to migrate a wiki repository created under Gollum versions 4.x or earlier to a 5.x compatible repo.
Use this tool to migrate a wiki repository created under Gollum versions 4.x or earlier to a 5.x compatibile repo.
It finds and repairs Gollum link tags that no longer work under 5.x for three reasons:
* 5.x wiki internal links may contain spaces. [[Bilbo Baggins]] and [[Bilbo-Baggins]] therefore link to distinct pages.
* 5.x wiki internal links are case sensitive
* 5.x wiki internal links are case senitive
* 5.x wiki internal links are no longer 'global'.
* NB: you can use the --lenient-tag-lookup option in gollum >= 5.x to enable 4.x-backwards compatible tags.
@@ -252,7 +252,7 @@ def find_linked(link)
# If it has an explicit file extension ('Samwi.md'), just test against that.
test_path = ::File.extname(link).empty? ? /#{link}\..+/ : link
# Select pages from the wiki whose path =~ 'Foo/Bar/Samwi.*'
# Match case-insensitively to mimic 4.x behavior!
# Match case-insenstively to mimic 4.x behavior!
Object.class_variable_get(:"@@wiki_tree").select { |path|
path =~ /^\/(.*\/)?#{test_path}/i
}
+1
View File
@@ -1212,6 +1212,7 @@ Gem::Specification.new do |s|
lib/gollum/templates/pagination.mustache
lib/gollum/templates/search.mustache
lib/gollum/templates/searchbar.mustache
lib/gollum/templates/user.mustache
lib/gollum/templates/wiki_content.mustache
lib/gollum/uri_encode_component.rb
lib/gollum/views/commit.rb
+2 -3
View File
@@ -14,10 +14,9 @@ require ::File.expand_path('../gollum/uri_encode_component', __FILE__)
module Gollum
VERSION = '5.3.0'
KEYBINDINGS = ['default', 'vim', 'emacs']
::I18n.available_locales = [:en]
::I18n.load_path = Dir[::File.expand_path("../gollum/locales", __FILE__) + "/*.yml"]
::I18n.load_path = Dir[::File.expand_path("lib/gollum/locales") + "/*.yml"]
def self.assets_path
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
+39 -10
View File
@@ -31,8 +31,6 @@ require File.expand_path '../helpers', __FILE__
Gollum::set_git_timeout(120)
Gollum::set_git_max_filesize(190 * 10**6)
Gollum::Filter::Code.language_handlers[/mermaid/] = Proc.new { |lang, code| "<div class=\"mermaid\">\n#{code}\n</div>" }
# Run the frontend, based on Sinatra
#
# There are a number of wiki options that can be set for the frontend
@@ -112,7 +110,6 @@ module Precious
@show_local_time = settings.wiki_options.fetch(:show_local_time, false)
@wiki_title = settings.wiki_options.fetch(:title, 'Gollum Wiki')
@default_keybinding = settings.wiki_options.fetch(:default_keybinding, 'default')
if settings.wiki_options[:template_dir]
Precious::Views::Layout.extend Precious::Views::TemplateCascade
@@ -128,8 +125,6 @@ module Precious
@js = settings.wiki_options[:js]
@mathjax_config = settings.wiki_options[:mathjax_config]
@mathjax = settings.wiki_options[:mathjax]
@mermaid = settings.wiki_options[:mermaid]
Gollum::Filter::Code.language_handlers.delete(/mermaid/) unless @mermaid
@use_static_assets = settings.wiki_options.fetch(:static, settings.environment != :development)
@static_assets_path = settings.wiki_options.fetch(:static_assets_path, ::File.join(File.dirname(__FILE__), 'public/assets'))
@@ -216,7 +211,7 @@ module Precious
end
get '/edit/*' do
forbid unless @allow_editing
forbid unless @allow_editing && @user_authed
wikip = wiki_page(params[:splat].first)
@name = wikip.fullname
@path = wikip.path
@@ -239,15 +234,29 @@ module Precious
wiki = wiki_new
halt 405 unless wiki.allow_uploads
forbid unless @user_authed
if params[:file]
fullname = params[:file][:filename]
tempfile = params[:file][:tempfile]
end
halt 500 unless tempfile.is_a? Tempfile
dir = wiki.per_page_uploads ? find_per_page_upload_subdir(request.referer, request.host_with_port, wiki.base_path) : 'uploads'
if wiki.per_page_uploads
dir = request.referer.match(/^https?:\/\/#{request.host_with_port}\/(.*)/)[1]
# remove base path if it is set
dir.sub!(/^#{wiki.base_path}/, '') if wiki.base_path
# remove base_url and gollum/* subpath if necessary
dir.sub!(/^\/gollum\/[-\w]+\//, '')
# remove file extension
dir.sub!(/#{::File.extname(dir)}$/, '')
# revert escaped whitespaces
dir.gsub!(/%20/, ' ')
dir = ::File.join('uploads', dir)
else
# store all uploads together
dir = 'uploads'
end
halt 500 if dir.include?('..')
halt 500 unless Pathname(dir).relative?
@@ -282,6 +291,7 @@ module Precious
post '/rename/*' do
wikip = wiki_page(params[:splat].first)
halt 500 if wikip.nil?
forbid unless @user_authed
wiki = wikip.wiki
page = wikip.page
rename = params[:rename]
@@ -325,6 +335,7 @@ module Precious
path = "/#{clean_url(sanitize_empty_params(params[:path]))}"
wiki = wiki_new
page = wiki.page(::File.join(path, params[:page]))
forbid unless @user_authed
return if page.nil?
if etag != page.sha
@@ -345,6 +356,7 @@ module Precious
post '/delete/*' do
forbid unless @allow_editing
forbid unless @user_authed
wiki = wiki_new
filepath = params[:splat].first
unless filepath.nil?
@@ -381,6 +393,7 @@ module Precious
path = sanitize_empty_params(params[:path]) || ''
format = params[:format].intern
wiki = wiki_new
forbid unless @user_authed
path.gsub!(/^\//, '')
@@ -612,7 +625,23 @@ module Precious
def show_page_or_file(fullpath)
wiki = wiki_new
if page = wiki.page(fullpath)
if page = fullpath[-1] != '/' ? wiki.page("#{fullpath}/#{wiki.index_page}") : false
@page = page
@name = page.filename_stripped
@content = page.formatted_data
@upload_dest = find_upload_dest(Pathname.new(fullpath).cleanpath.to_s)
# Extensions and layout data
@editable = true
@toc_content = wiki.universal_toc ? @page.toc_data : nil
@h1_title = wiki.h1_title
@bar_side = wiki.bar_side
@allow_uploads = wiki.allow_uploads
@navbar = true
mustache :page
#redirect_path = "#{fullpath}/#{wiki.index_page}"
#redirect to("#{encodeURIComponent(redirect_path)}")
elsif page = wiki.page(fullpath)
@page = page
@name = page.filename_stripped
@content = page.formatted_data
@@ -631,7 +660,7 @@ module Precious
elsif @redirects_enabled && redirect_path = wiki.redirects[fullpath]
redirect to("#{encodeURIComponent(redirect_path)}?redirected_from=#{encodeURIComponent(fullpath)}")
else
if @allow_editing
if @allow_editing && @user_authed
path = fullpath[-1] == '/' ? "#{fullpath}#{wiki.index_page}" : fullpath # Append default index page if no page name is supplied
redirect to("/gollum/create/#{clean_url(encodeURIComponent(path))}")
else
+3 -8
View File
@@ -2,22 +2,17 @@ require 'octicons'
module Precious
module Assets
MANIFEST = %w(app.js editor.js mermaid.js app.css criticmarkup.css fileview.css ie7.css print.css *.png *.jpg *.svg *.eot *.ttf)
MANIFEST = %w(app.js editor.js app.css criticmarkup.css fileview.css ie7.css print.css *.png *.jpg *.svg *.eot *.ttf)
ASSET_URL = 'gollum/assets'
JS_COMPRESSOR = :uglify unless defined?(JS_COMPRESSOR)
def self.sprockets(dir = File.dirname(File.expand_path(__FILE__)))
env = Sprockets::Environment.new
env.append_path ::File.join(dir, '../../node_modules')
env.append_path ::File.join(dir, 'public/gollum/javascript')
env.append_path ::File.join(dir, 'public/gollum/stylesheets/')
env.append_path ::File.join(dir, 'public/gollum/javascript')
env.append_path ::File.join(dir, 'public/gollum/images')
env.append_path ::File.join(dir, 'public/gollum/fonts')
env.js_compressor = Precious::Assets::JS_COMPRESSOR unless Precious::App.development?
env.js_compressor = :uglify unless Precious::App.development?
env.css_compressor = :scss
env.context_class.class_eval do
-18
View File
@@ -5,20 +5,6 @@ module Precious
module Helpers
EMOJI_PATHNAME = Pathname.new(Gemojione.images_path).freeze
def find_per_page_upload_subdir(referer, host_with_port, base_path)
base = base_path ? remove_leading_and_trailing_slashes(base_path) : ''
dir = referer.match(/^https?:\/\/#{host_with_port}\/#{base}\/?(.*)/)[1]
# remove gollum/* subpath if necessary
dir.sub!(/^gollum\/[-\w]+\//, '')
# remove file extension
dir.sub!(/#{::File.extname(dir)}$/, '')
# revert escaped whitespaces
dir.gsub!(/%20/, ' ')
return ::File.join('uploads', dir)
end
def sanitize_empty_params(param)
[nil, ''].include?(param) ? nil : CGI.unescape(param)
@@ -28,10 +14,6 @@ module Precious
# Check if name already has a format extension, and if so, strip it.
Gollum::Page.valid_extension?(name) ? Gollum::Page.strip_filename(name) : name
end
def remove_leading_and_trailing_slashes(str)
str.sub(%r{^(/+)}, '').sub(%r{/+$}, '')
end
# Remove all slashes from the start of string.
# Remove all double slashes
-41
View File
@@ -1,41 +0,0 @@
en:
editor:
function_bar:
help: Help
pagination:
aria:
label: Pagination
next_page: Next page
previous_page: Previous page
next: Next
previous: Previous
precious/views/compare:
back_to_page_history: Back to Page History
back_to_top: Back to Top
comparison_of: Comparison of
comparing_versions_of: Comparing versions of
comparing_from: "Comparing %{before} to %{after}"
revert: Revert Changes
precious/views/error:
error: Error
precious/views/history:
browse_in_history_description: Browse the page at this point in the history
compare_revisions: Compare Revisions
history_for: History for
precious/views/latest_changes:
title: Latest Changes (Globally)
precious/views/layout:
title: Home
precious/views/overview:
back_to_top: Back to Top
delete_confirmation: "Are you sure you want to delete %{name}?"
no_pages_in: There are no pages in
on: "on"
title: "Overview of %{ref}"
precious/views/search:
aria:
show_all: Show all hits on this page
back_to_top: Back to Top
no_results: There are no results for your search
search_results_for: Search results for
title: "Search results for %{query}"
@@ -0,0 +1 @@
{"files":{"app-f05401ee374f0c7f48fc2bc08e30b4f4db705861fd5895ed70998683b383bfb5.js":{"logical_path":"app.js","mtime":"2021-11-15T20:08:30-08:00","size":136040,"digest":"f05401ee374f0c7f48fc2bc08e30b4f4db705861fd5895ed70998683b383bfb5","integrity":"sha256-8FQB7jdPDH9I/CvAjjC09NtwWGH9WJXtcJmGg7ODv7U="},"editor-9881d0c7ae663293f0e3a7e72729eec7e940fa613185c076709b76d292f5703a.js":{"logical_path":"editor.js","mtime":"2021-11-15T20:08:30-08:00","size":744886,"digest":"9881d0c7ae663293f0e3a7e72729eec7e940fa613185c076709b76d292f5703a","integrity":"sha256-mIHQx65mMpPw46fnJynux+lA+mExhcB2cJt20pL1cDo="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2021-11-15T20:08:30-08:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-08-22T15:24:51-07:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-08-22T15:24:51-07:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-f05401ee374f0c7f48fc2bc08e30b4f4db705861fd5895ed70998683b383bfb5.js","editor.js":"editor-9881d0c7ae663293f0e3a7e72729eec7e940fa613185c076709b76d292f5703a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}}
@@ -1 +0,0 @@
{"files":{"app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js":{"logical_path":"app.js","mtime":"2022-09-21T19:09:39-07:00","size":189238,"digest":"04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef","integrity":"sha256-BNQLwsWVrts+BfOoEG8a4yvyusSnDtmX3n8XRQjuqe8="},"editor-1cd95508a4e4a6c5b9f11a785ab42e56ef01a6e5c4238bb909559abdf8ac12b7.js":{"logical_path":"editor.js","mtime":"2022-09-21T19:09:39-07:00","size":745699,"digest":"1cd95508a4e4a6c5b9f11a785ab42e56ef01a6e5c4238bb909559abdf8ac12b7","integrity":"sha256-HNlVCKTkpsW58Rp4WrQuVu8BpuXEI4u5CVWavfisErc="},"mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js":{"logical_path":"mermaid.js","mtime":"2022-09-21T19:09:39-07:00","size":1215628,"digest":"7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a","integrity":"sha256-czfV5QVg5hKz4gfEDDAu1AZ04Tq/K0t9VHbOVpzFRFo="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2022-09-21T19:09:39-07:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-02-24T23:16:14-08:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-02-24T23:16:14-08:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js","editor.js":"editor-1cd95508a4e4a6c5b9f11a785ab42e56ef01a6e5c4238bb909559abdf8ac12b7.js","mermaid.js":"mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -4
View File
@@ -1,10 +1,7 @@
// Require vendor assets from installed Node modules.
//= require mousetrap/mousetrap.min
// Require application assets.
//= require jquery-1.7.2.min
//= require identicon
//= require date.min
//= require mousetrap.min
//= require clipboard.min
//= require gollum
//= require gollum.dialog
@@ -43,7 +43,7 @@
$('#gollum-saved-msg').text('Saving...');
// Wait 2 seconds, then actually save the text to local storage
// Wait 2 seconds, then actualy save the text to local storage
autoSaveTimer = setTimeout(function() {
localStorage.setItem(storageKey, window.ace_editor.getSession().getValue());
// Save any subpage editor text that might exist
@@ -55,20 +55,6 @@
}, 2000);
}
function setEditorKeyboardHandler(mode) {
var editor = window.ace_editor;
var storage = window.localStorage;
storage.setItem('gollum-kbm', mode)
if (mode == "default") {
editor.setKeyboardHandler();
} else if (mode == "vim" || mode == "emacs") {
editor.setKeyboardHandler("ace/keyboard/" + mode);
} else {
editor.setKeyboardHandler();
}
editor.focus();
}
/**
* $.GollumEditor
*
@@ -111,22 +97,9 @@
});
$('#gollum-autorecover-msg')[0].hidden = false;
}
// Check for user last keybind and ensure ui is correct
var storage = window.localStorage;
var userDefaultKeybind = storage.getItem('gollum-kbm');
if (userDefaultKeybind) {
default_keybinding = userDefaultKeybind;
}
var keybinding = document.getElementById('keybinding')
for (var i = 0; i < keybinding.options.length; ++i) {
if (keybinding.options[i].text === default_keybinding) {
keybinding.options[i].selected = true;
}
}
editor.setTheme("ace/theme/tomorrow");
setEditorKeyboardHandler(default_keybinding);
editor.setKeyboardHandler();
editor.renderer.setShowGutter(false);
editor.getSession().setUseWrapMode(true);
editor.getSession().setValue(textarea.val());
@@ -178,7 +151,15 @@
$("#keybinding").change(function() {
var mode = $(this).val();
setEditorKeyboardHandler(mode)
var editor = window.ace_editor;
if (mode == "default") {
editor.setKeyboardHandler();
} else if (mode == "vim" || mode == "emacs") {
editor.setKeyboardHandler("ace/keyboard/" + mode);
} else {
editor.setKeyboardHandler();
}
editor.focus();
});
// Remove any autosaved text when we hit save or cancel
@@ -717,7 +698,7 @@
deactivate: function() {
// When we switch markup language, unbind all buttons *except* for the text direction (LTR/RTL) switching button
// When we switch markup language, unbind all buttons *except* for the text direction (LTR/RTL) switiching button
$('#gollum-editor-function-bar button.function-button').not('#function-text-direction').unbind('click');
$('#gollum-editor-function-bar').removeClass( 'active' );
FunctionBar.isActive = false;
@@ -108,7 +108,7 @@ var MarkDownHelp = [
{
menuName: 'Emoji',
data: '<p>Gollum uses <a href="https://joypixels.com/emoji/v4" target="_blank">JoyPixels 4</a> for its emoji. To include one, wrap the emoji name in colons and use underscores instead of spaces (e.g. :heart: or :point_up:).</p>'
data: '<p>See the <a href="http://emojione.com/demo/" target="_blank">EmojiOne demo</a> for all available emoji. To include one, wrap the emoji name in colons and use underscores instead of spaces (e.g. :heart: or :point_up:).'
}
]
}
@@ -129,7 +129,7 @@ rdoc_rules = default_rules.dup
rdoc_rules[:path] = 'ace/mode/rdoc_highlight_rules'
rdoc_rules[:rule_name] = 'RDocHighlightRules'
# Create set of extended rules for markups that don't have their own Ace mode, based on the default 'text' highlighter.
# Create set of extended rules for markups that don't have their own Ace mode, based on the default 'text' highligter.
text_rules = default_rules.dup
text_rules[:path] = 'ace/mode/text_highlight_rules'
text_rules[:rule_name] = 'TextHighlightRules'
@@ -1,2 +0,0 @@
// Load mermaid from installed Node module
//= require mermaid/dist/mermaid.min
+11
View File
@@ -0,0 +1,11 @@
/* mousetrap v1.6.1 craig.is/killing/mice */
(function(r,v,f){function w(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return p[a.which]?p[a.which]:t[a.which]?t[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a){return"shift"==a||"ctrl"==a||"alt"==a||
"meta"==a}function B(a,b){var g,c,d,f=[];g=a;"+"===g?g=["+"]:(g=g.replace(/\+{2}/g,"+plus"),g=g.split("+"));for(d=0;d<g.length;++d)c=g[d],C[c]&&(c=C[c]),b&&"keypress"!=b&&D[c]&&(c=D[c],f.push("shift")),x(c)&&f.push(c);g=c;d=b;if(!d){if(!n){n={};for(var q in p)95<q&&112>q||p.hasOwnProperty(q)&&(n[p[q]]=q)}d=n[g]?"keydown":"keypress"}"keypress"==d&&f.length&&(d="keydown");return{key:c,modifiers:f,action:d}}function E(a,b){return null===a||a===v?!1:a===b?!0:E(a.parentNode,b)}function c(a){function b(a){a=
a||{};var b=!1,l;for(l in n)a[l]?b=!0:n[l]=0;b||(y=!1)}function g(a,b,u,e,c,g){var l,m,k=[],f=u.type;if(!h._callbacks[a])return[];"keyup"==f&&x(a)&&(b=[a]);for(l=0;l<h._callbacks[a].length;++l)if(m=h._callbacks[a][l],(e||!m.seq||n[m.seq]==m.level)&&f==m.action){var d;(d="keypress"==f&&!u.metaKey&&!u.ctrlKey)||(d=m.modifiers,d=b.sort().join(",")===d.sort().join(","));d&&(d=e&&m.seq==e&&m.level==g,(!e&&m.combo==c||d)&&h._callbacks[a].splice(l,1),k.push(m))}return k}function f(a,b,c,e){h.stopCallback(b,
b.target||b.srcElement,c,e)||!1!==a(b,c)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function d(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=A(a);b&&("keyup"==a.type&&z===b?z=!1:h.handleKey(b,F(a),a))}function p(a,c,u,e){function l(c){return function(){y=c;++n[a];clearTimeout(r);r=setTimeout(b,1E3)}}function g(c){f(u,c,a);"keyup"!==e&&(z=A(c));setTimeout(b,10)}for(var d=n[a]=0;d<c.length;++d){var m=d+1===c.length?g:l(e||
B(c[d+1]).action);q(c[d],m,e,a,d)}}function q(a,b,c,e,d){h._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1<f.length?p(a,f,b,c):(c=B(a,c),h._callbacks[c.key]=h._callbacks[c.key]||[],g(c.key,c.modifiers,{type:c.action},e,a,d),h._callbacks[c.key][e?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:e,level:d,combo:a}))}var h=this;a=a||v;if(!(h instanceof c))return new c(a);h.target=a;h._callbacks={};h._directMap={};var n={},r,z=!1,t=!1,y=!1;h._handleKey=function(a,
c,d){var e=g(a,c,d),k;c={};var h=0,l=!1;for(k=0;k<e.length;++k)e[k].seq&&(h=Math.max(h,e[k].level));for(k=0;k<e.length;++k)e[k].seq?e[k].level==h&&(l=!0,c[e[k].seq]=1,f(e[k].callback,d,e[k].combo,e[k].seq)):l||f(e[k].callback,d,e[k].combo);e="keypress"==d.type&&t;d.type!=y||x(a)||e||b(c);t=l&&"keydown"==d.type};h._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)q(a[d],b,c)};w(a,"keypress",d);w(a,"keydown",d);w(a,"keyup",d)}if(r){var p={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",
18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},t={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},D={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter",
escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(f=1;20>f;++f)p[111+f]="f"+f;for(f=0;9>=f;++f)p[f+96]=f.toString();c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={};
this._directMap={};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||E(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(p[b]=a[b]);n=null};c.init=function(){var a=c(v),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a,
arguments)}}(b))};c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null);
@@ -24,7 +24,7 @@ Custom:
All arguments are optional.
Accepts any valid CSS dimensional declaration, e.g px, em, rem as an argument for size.
Acceppts any valid CSS dimensional declaration, e.g px, em, rem as an argument for size.
Use either shorthand border declarations or individual 'border-[property] [value]' (no colon!) pairs for the style.
@@ -734,3 +734,12 @@ nav.actions {
display: none;
}
}
/* @section user */
#user p {
text-align: right;
padding-right:0.5em;
font-size: .8em;
line-height: 2.0em;
color: #999;
}
+1 -1
View File
@@ -3,7 +3,7 @@
<h1 class="header-title text-center text-md-left py-4">
{{message}}
</h1>
{{author}} committed <time datetime="{{datetime}}">{{authored_date}}</time>
{{author}} commited <time datetime="{{datetime}}">{{authored_date}}</time>
<span class="px-2 float-right">commit <code>{{version}}</code></span>
</div>
+40 -69
View File
@@ -4,84 +4,55 @@
<h1 class="header-title text-center text-md-left py-4">
<span class="f1-light text-gray-light">
{{t.comparing_versions_of}}
Comparing versions of
</span>
{{name}}
</h1>
</div>
{{#message}}
<p>{{message}}</p>
<p>{{message}}</p>
{{/message}}
<div id="compare-content">
<div id="compare-content">
<div class="py-4" id="actions">
{{#show_revert}}
{{#allow_editing}}
<form name="gollum-revert" action="{{revert_path}}/{{escaped_url_path}}/{{before}}/{{after}}" method="post" id="gollum-revert-form"></form>
<span class="pb-4">
<button
class="btn btn-sm"
onclick="$('#gollum-revert-form').submit()"
type="submit"
>
{{t.revert}}
</button>
</span>
{{/allow_editing}}
{{/show_revert}}
<div class="py-4" id="actions">
{{#show_revert}}
{{#allow_editing}}
<form name="gollum-revert" action="{{revert_path}}/{{escaped_url_path}}/{{before}}/{{after}}" method="post" id="gollum-revert-form"></form>
<span class="pb-4">
<button class="btn btn-sm" type="submit" onclick="$('#gollum-revert-form').submit()">Revert Changes</button>
</span>
{{/allow_editing}}
{{/show_revert}}
<a href="{{history_path}}/{{escaped_url_path}}" class="btn btn-sm action-page-history">Back to Page History</a>
</div>
<a
class="btn btn-sm action-page-history"
href="{{history_path}}/{{escaped_url_path}}"
>
{{t.back_to_page_history}}
</a>
</div>
<div class="Box data highlight">
<div class="Box-header Box--condensed Box-header--gray">{{path}} <span class="px-2 float-right">Comparing {{before}} to {{after}}</span></div>
<table >
{{#lines}}
<tr>
<td class="line_numbers">{{ldln}}</td>
<td class="line_numbers">{{rdln}}</td>
<td>
<div class="{{class}} pl-2">{{line}}</div>
</td>
</tr>
{{/lines}}
</table>
</div>
</div>
<div class="Box data highlight">
<div class="Box-header Box--condensed Box-header--gray">
{{path}}
<span class="px-2 float-right">
{{t.comparing_from}}
</span>
</div>
<table>
{{#lines}}
<tr>
<td class="line_numbers">{{ldln}}</td>
<td class="line_numbers">{{rdln}}</td>
<td>
<div class="{{class}} pl-2">{{line}}</div>
</td>
</tr>
{{/lines}}
</table>
</div>
</div>
<div class="pt-4" id="footer">
{{#show_revert}}
{{#allow_editing}}
<span class="pt-4">
<button
class="btn btn-sm gollum-revert-button"
onclick="$('#gollum-revert-form').submit()"
type="submit"
>
{{t.revert}}
</button>
</span>
{{/allow_editing}}
{{/show_revert}}
<div class="pt-4">
<a href="#">
{{t.back_to_top}}
</a>
</div>
</div>
<div class="pt-4" id="footer">
{{#show_revert}}
{{#allow_editing}}
<span class="pt-4"><button class="btn btn-sm gollum-revert-button" type="submit" onclick="$('#gollum-revert-form').submit()">Revert Changes</button></span>
{{/allow_editing}}
{{/show_revert}}
<div class="pt-4">
<a href="#">Back to Top</a>
</div>
</div>
</div>
+5 -13
View File
@@ -41,27 +41,19 @@
<span class="pr-2"></span>
{{#critic_markup}}
<button class="btn btn-sm function-button" id="function-critic-accept" title="Accept Selected CriticMarkup">{{#octicon}}plus{{/octicon}}</button>
<button class="btn btn-sm function-button" id="function-critic-reject" title="Reject Selected CriticMarkup">{{#octicon}}dash{{/octicon}}</button>
<button class="btn btn-sm function-button" id="function-critic-reject" title="Reject Selected CriticMarkup">{{#octicon}}dash{{/octicon}}</button>
<span class="pr-2"></span>
{{/critic_markup}}
<button class="btn btn-sm function-button" id="function-text-direction" title="Reverse Text Direction">{{#octicon}}arrow-both{{/octicon}}</button>
<button
aria-label="{{tt.editor.function_bar.help}}"
class="btn btn-sm function-button"
data-help-text="{{help_text}}"
id="function-help"
title="{{tt.editor.function_bar.help}}"
>
{{#octicon}}question{{/octicon}}
</button>
<button class="btn btn-sm function-button" id="function-help" title="Help">{{#octicon}}question{{/octicon}}</button>
</div>
<div id="gollum-editor-format-selector">
<label for="format">Keybinding</label>
<select id="keybinding" name="keybinding" class="form-select input-sm">
{{#keybindings}}
<option {{#selected}}selected="selected" {{/selected}}value="{{name}}">{{name}}</option>
{{/keybindings}}
<option selected="selected">default</option>
<option>vim</option>
<option>emacs</option>
</select>
<label for="format">Markup</label>
<select id="wiki_format" name="format" class="form-select input-sm">
+2 -2
View File
@@ -1,8 +1,8 @@
<div id="wiki-wrapper" class="error">
<div id="error">
<h1>{{t.error}}</h1>
<h1>Error</h1>
<p>
{{message}}
</p>
</div>
</div>
</div>
+27 -36
View File
@@ -4,7 +4,7 @@
<h1 class="header-title text-center text-md-left py-4">
<span class="f1-light text-gray-light">
{{t.history_for}}
History for
</span>
{{name}}
</h1>
@@ -14,41 +14,32 @@
{{>pagination}}
<form name="selection-form" id="selection-form" method="get" action="{{compare_path}}/{{escaped_url_path}}"></form>
<form name="selection-form" id="selection-form" method="get" action="{{compare_path}}/{{escaped_url_path}}"></form>
<div id="page-history-list" class="Box Box--condensed flex-auto">
<form id="version-form">
<ul>
{{#versions}}
<li class="Box-row border-top Box-row--hover-gray d-flex flex-items-center">
<span class="pr-2"><input class="checkbox" type="checkbox" name="versions[]" value="{{id}}"></span>
<span class="float-left col-2" id="user-icons">{{>author_template}}</span>
<time class="flex-auto col-1 text-gray-light" datetime="{{datetime}}" data-format="{{date_format}}">{{date}}</time>
<span class="flex-auto col-5">{{message}}</span>
<span class="pl-4 float-right">
<a href="{{href}}" class="btn btn-outline text-mono">{{id7}}</a>
<a
class="btn btn-outline"
href="{{href_page}}"
title="{{t.browse_in_history_description}}"
>
{{#octicon}}code{{/octicon}}
</a>
</span>
</li>
{{/versions}}
</ul>
</form>
</div>
<div id="page-history-list" class="Box Box--condensed flex-auto">
<form id="version-form">
<ul>
{{#versions}}
<li class="Box-row border-top Box-row--hover-gray d-flex flex-items-center">
<span class="pr-2"><input class="checkbox" type="checkbox" name="versions[]" value="{{id}}"></span>
<span class="float-left col-2" id="user-icons">{{>author_template}}</span>
<time class="flex-auto col-1 text-gray-light" datetime="{{datetime}}" data-format="{{date_format}}">{{date}}</time>
<span class="flex-auto col-5">{{message}}</span>
<span class="pl-4 float-right">
<a href="{{href}}" class="btn btn-outline text-mono">{{id7}}</a>
<a href="{{href_page}}" title="Browse the page at this point in the history" class="btn btn-outline">{{#octicon}}code{{/octicon}}</a>
</span>
</li>
{{/versions}}
</ul>
</form>
</div>
<div id="footer">
<div class="pt-4">
<button
class="btn btn-sm action-compare-revision"
type="submit"
>
{{t.compare_revisions}}
</button>
</div>
</div>
<div id="footer">
<div class="pt-4">
<button class="btn btn-sm action-compare-revision" type="submit">Compare Revisions</button>
</div>
</div>
</div>
+1 -22
View File
@@ -8,7 +8,6 @@
{{#sprockets_stylesheet_tag}}app{{/sprockets_stylesheet_tag}}
{{#sprockets_stylesheet_tag}}print print{{/sprockets_stylesheet_tag}}
{{#css}}<link rel="stylesheet" type="text/css" href="{{custom_css}}" media="all">{{/css}}
{{#noindex}}<meta name="robots" content="noindex, nofollow" />{{/noindex}}
@@ -32,16 +31,12 @@
{{#is_create_page}}
var default_markup = '{{default_markup}}';
{{/is_create_page}}
{{#has_editor}}
var default_keybinding = '{{default_keybinding}}';
{{/has_editor}}
</script>
{{#sprockets_javascript_tag}}app{{/sprockets_javascript_tag}}
{{#has_editor}}
{{#sprockets_javascript_tag}}editor{{/sprockets_javascript_tag}}
{{/has_editor}}
{{#mathjax}}
<script type="text/javascript">
window.MathJax = {
@@ -58,30 +53,14 @@
{{/mathjax_config}}
<script defer src="{{mathjax_js}}"></script>
{{/mathjax}}
{{#mermaid}}
<script>
var mermaid_conf = {
startOnLoad: true,
securityLevel: 'strict'
};
</script>
{{/mermaid}}
{{#js}}<script type="text/javascript" src="{{custom_js}}"></script>{{/js}}
{{#mermaid}}
{{#sprockets_javascript_tag}}mermaid{{/sprockets_javascript_tag}}
<script>
mermaid.initialize(mermaid_conf);
</script>
{{/mermaid}}
<title>{{title}}</title>
</head>
<body>
<div class="container-lg clearfix">
{{{yield}}}
{{< user}}
</div>
</body>
</html>
+6 -19
View File
@@ -21,38 +21,25 @@
<span class="pr-2">{{{icon}}}</span>
<span><a href="{{url}}">{{name}}</a></span>
{{#allow_editing}}
{{#is_file}}
<button
class="btn btn-sm float-right delete-file"
data-confirm="{{t.delete_confirmation}}"
data-file-path="{{file_path}}"
>
{{#octicon}}trash{{/octicon}}
</button>
{{/is_file}}
{{/allow_editing}}
{{#is_file}}<button class="btn btn-sm float-right delete-file" data-file-path="{{file_path}}" data-confirm="Are you sure you want to delete {{name}}?">{{#octicon}}trash{{/octicon}}</button>{{/is_file}}
{{/allow_editing}}
</li>
{{/files_folders}}
</ul>
</div>
{{/has_results}}
{{#no_results}}
<p id="no-results">
{{t.no_pages_in}}
<strong>{{current_path}}</strong>
{{t.on}}
<strong>{{ref}}</strong>.
There are no pages in <strong>{{current_path}}</strong> on <strong>{{ref}}</strong>.
</p>
{{/no_results}}
</div>
<div class="pt-4" id="footer">
<a href="#">
{{t.back_to_top}}
</a>
<a href="#">Back to Top</a>
</div>
</div>
+4 -21
View File
@@ -1,23 +1,6 @@
<nav class="paginate-container" aria-label="{{tt.pagination.aria.label}}">
<nav class="paginate-container" aria-label="Pagination">
<div class="pagination" id="pagination">
<a
aria-label="{{td.pagination.aria.previous_page}}"
class="previous_page {{^previous_page}}disabled{{/previous_page}}"
href="?page_num={{previous_page}}{{query_string}}"
id="prev"
rel="prev"
>
{{tt.pagination.previous}}
</a>
<a
aria-label="{{td.pagination.aria.next_page}}"
class="next_page {{^next_page}}disabled{{/next_page}}"
href="?page_num={{next_page}}{{query_string}}"
id="next"
rel="next"
>
{{tt.pagination.next}}
</a>
<a id="prev" href="?page_num={{previous_page}}{{query_string}}" class="previous_page {{^previous_page}}disabled{{/previous_page}}">Previous</span>
<a id="next" href="?page_num={{next_page}}{{query_string}}" class="next_page {{^next_page}}disabled{{/next_page}}" rel="next" aria-label="Next Page">Next</a>
</div>
</nav>
</nav>
+5 -9
View File
@@ -4,7 +4,7 @@
<h1 class="header-title text-center text-md-left py-4">
<span class="f1-light text-gray-light">
{{t.search_results_for}}
Search results for
</span>
{{name}}
</h1>
@@ -21,12 +21,7 @@
<li class="Box-row Box-row--gray">
<span class="Counter Counter--gray tooltipped tooltipped-w" aria-label="{{filename_count}} hits in filename - {{count}} hits in content">{{filename_count}} - {{count}}</span>&nbsp;
<span class="text-bold"><a href="{{href}}">{{name}}</a></span>
<button
class="btn-link tooltipped tooltipped-w float-right toggle-context"
aria-label="{{t.aria.show_all}}"
>
{{#octicon}}search{{/octicon}}
</button>
<button class="btn-link tooltipped tooltipped-w float-right toggle-context" aria-label="Show all {{count}} hits in this page">{{#octicon}}search{{/octicon}}</button>
</li>
<div class="search-context">
@@ -34,6 +29,7 @@
<li class="Box-row border-0"><span class="text-italic">{{.}}</span></li>
{{/context}}
</div>
{{/results}}
</ul>
</div>
@@ -41,12 +37,12 @@
{{#no_results}}
<p id="no-results">
{{t.no_results}} <strong>{{query}}</strong>.
There are no results for your search <strong>{{query}}</strong>.
</p>
{{/no_results}}
<div id="footer" class="mt-4">
<a class="btn" href="#">{{t.back_to_top}}</a>
<a class="btn" href="#">Back to Top</a>
</div>
</div>
+10
View File
@@ -0,0 +1,10 @@
<div id="user">
<p>
{{#user_authed}}
{{user_name}} | {{user_provider}} | <strong><a href="/__omnigollum__/logout">[Logout]</a></strong>
{{/user_authed}}
{{^user_authed}}
not logged in | <strong><a href="/__omnigollum__/login">[Login]</a></strong>
{{/user_authed}}
<p>
</div>
+1 -1
View File
@@ -6,7 +6,7 @@ module Precious
attr_reader :page, :diff, :versions, :message, :allow_editing
def title
[t[:comparison_of], @page.title].join(" ")
"Comparison of #{@page.title}"
end
def before
-12
View File
@@ -4,18 +4,6 @@ module Precious
true
end
def default_keybinding
@default_keybinding
end
def keybindings
Gollum::KEYBINDINGS.map do |kb|
{ :name => kb,
:selected => default_keybinding == kb
}
end
end
def formats(selected = @page.format)
Gollum::Markup.formats.map do |key, val|
{ :name => val[:name],
@@ -21,13 +21,6 @@ module Precious
autofill I18n.t(locale_klass_name)
end
# Returns all I18n translation strings from the root of an I18n YAML file.
# Otherwise, it works exactly like the `#t` method that's also defined in
# this file.
def tt
autofill I18n.t('.')
end
private
# Recursively looks up I18n translation values and autofills any YAML
+1 -1
View File
@@ -9,7 +9,7 @@ module Precious
attr_reader :wiki
def title
t[:title]
"Latest Changes (Globally)"
end
def versions
+19 -10
View File
@@ -20,7 +20,7 @@ module Precious
end
def title
t[:title]
"Home"
end
def has_path
@@ -50,10 +50,6 @@ module Precious
def mathjax_js
"#{page_route('gollum/assets/mathjax/MathJax.js')}?config=TeX-AMS-MML_HTMLorMML"
end
def mermaid
@mermaid
end
def css # custom css
@css
@@ -62,11 +58,11 @@ module Precious
def js # custom js
@js
end
def critic_markup
@critic_markup
end
def per_page_uploads
@per_page_uploads
end
@@ -79,19 +75,32 @@ module Precious
def search
false
end
def history
false
end
def overview
false
end
def latest_changes
false
end
# Passthrough additional omniauth parameters for status bar
def user_authed
@user_authed
end
def user_provider
@user.provider
end
def user_name
@user.name
end
end
end
end
+10 -10
View File
@@ -3,11 +3,11 @@ require 'pathname'
module Precious
module Views
class Overview < Layout
attr_reader :name, :results, :ref, :allow_editing, :newable
attr_reader :results, :ref, :allow_editing, :newable
HIDDEN_PATHS = ['.gitkeep']
def title
t[:title]
"Overview of #{@ref}"
end
# def editable
@@ -38,21 +38,21 @@ module Precious
end
end
def files_folders
if has_results
files_and_folders = []
@results.each do |result|
result_path = result.url_path
result_path = result_path.sub(/^#{Regexp.escape(@path)}\//, '') unless @path.nil?
result_path = result_path.sub(/^#{Regexp.escape(@path)}\//, '') unless @path.nil?
if result_path.include?('/')
# result contains a folder
folder_name = result_path.split('/').first
folder_path = @path ? "#{@path}/#{folder_name}" : folder_name
folder_url = "#{overview_path}/#{folder_path}/"
files_and_folders << {name: folder_name, icon: rocticon('file-directory'), type: 'dir', url: folder_url, is_file: false}
elsif !HIDDEN_PATHS.include?(result_path)
elsif !HIDDEN_PATHS.include?(result_path)
file_url = page_route(result.escaped_url_path)
files_and_folders << {name: result.filename, icon: rocticon('file'), type: 'file', url: file_url, file_path: result.escaped_url_path, is_file: true}
end
@@ -61,7 +61,7 @@ module Precious
files_and_folders.uniq{|f| f[:name]}.sort_by!{|f| [f[:type], f[:name]]}
end
end
def has_results
!@results.empty?
@@ -70,12 +70,12 @@ module Precious
def no_results
@results.empty?
end
def latest_changes
true
end
end
end
end
+1 -1
View File
@@ -10,4 +10,4 @@ module Precious
@page_num == 1 ? nil : (@page_num - 1).to_s
end
end
end
end
+19 -60
View File
@@ -1,84 +1,43 @@
require 'rss'
class RSSView
include Precious::Views::AppHelpers
include Precious::Views::RouteHelpers
attr_reader :base_url
def initialize(base_url, wiki_title, url, changes)
@base_url = base_url
@wiki_title = wiki_title
@url = url
@changes = changes
end
def render
latest_changes = "#{@url}#{latest_changes_path}"
RSS::Maker.make('2.0') do |maker|
maker.channel.author = 'Gollum Wiki'
maker.channel.description = "Latest Changes in #{@wiki_title}"
maker.channel.link = latest_changes_url
maker.channel.title = "#{@wiki_title} Latest Changes"
maker.channel.updated = @changes.first.authored_date
maker.channel.title = "#{@wiki_title} Latest Changes"
maker.channel.description = "Latest Changes in #{@wiki_title}"
maker.channel.link = latest_changes
@changes.each do |change|
maker.items.new_item do |item|
item.description = feed_item_description(change)
item.link = latest_changes_url
item.title = feed_item_title(change)
item.link = latest_changes
item.title = change.message
item.updated = change.authored_date
id = change.id
files = change.stats.files.map do |files|
[files[:old_file], files[:new_file]].compact.map do |file|
f = extract_page_dir(file)
"<li><a href=\"#{@url}#{page_route(f)}/#{id}\">#{f}</a></li>"
end
end
item.description = "Commited by: <a href=\"mailto:#{change.author.email}\">#{change.author.name}</a><br/>Commit ID: #{id[0..6]}<br/><br/>Affected files:<ul>#{files.join}</ul>"
end
end
end.to_s
end
private
def feed_item_commit_body(change)
body = change.message.lines[1..-1].join
body = body.split(/\n{2}/).map { |paragraph| "<p>#{paragraph}</p>" }.join
body.gsub!(/\n/, ' ')
body
end
def feed_item_description(change)
ERB.new(<<~HTML_PARTIAL)
<%= feed_item_commit_body(change) %>
Committed by: <a href="mailto:<%= change.author.email %>">
<%= change.author.name %>
</a><br />
Commit ID: <%= change.id[0..6] %><br /><br />
<%= feed_item_files(change) %>
HTML_PARTIAL
.result(binding)
end
def feed_item_files(change)
file_list = change.stats.files.map { |change_files|
[
change_files[:old_file],
change_files[:new_file]
].compact
}
ERB.new(<<~HTML_PARTIAL)
Affected files: <ul>
<% file_list.each do |change_files| %>
<% change_files.each do |file| %>
<% file_href = "%s%s/%s" % [@url, page_route(file), change.id] %>
<li><a href="<%= file_href %>"><%= file %></a></li>
<% end %>
<% end %>
</ul>
HTML_PARTIAL
.result(binding)
end
def feed_item_title(change)
change.message.lines.first.strip
end
def latest_changes_url
"%s%s" % [@url, latest_changes_path]
end
end
end
+1 -1
View File
@@ -23,7 +23,7 @@ module Precious
end
def title
t[:title]
"Search results for " + @query
end
def search
-9
View File
@@ -1,9 +0,0 @@
{
"dependencies": {
"mermaid": "^9.1.2",
"mousetrap": "^1.6.5"
},
"engines": {
"node": ">=16.15.0"
}
}
-31
View File
@@ -1,31 +0,0 @@
require_relative 'helper'
require 'selenium-webdriver'
require 'capybara/dsl'
Selenium::WebDriver::Chrome.path = ENV['CHROME_PATH'] if ENV['CHROME_PATH']
CAPYBARA_DRIVER =
if ENV['CI']
:selenium_chrome_headless
else
ENV.fetch('CAPYBARA_DRIVER', :selenium_chrome).to_sym
end
Capybara.default_driver = CAPYBARA_DRIVER
Capybara.enable_aria_label = true
if ENV['GOLLUM_CAPYBARA_URL']
Capybara.configure do |config|
config.run_server = false
config.app_host = ENV['GOLLUM_CAPYBARA_URL']
end
else
Capybara.server = :webrick
end
def console_log(page, level = :severe)
page.driver.browser.logs.get(:browser).select { |log| log.level == level.to_s.upcase }
end
@@ -1,7 +1,7 @@
<nav>
<div style="background-color: red;">NAVBAR_OVERRIDE</div>
<p>Still include an original partial to ensure the fallback works even when nested from an overridden partial:</p>
<p>Still include an original partial to ensure the fallback works even when nested from an overriden partial:</p>
<div>
{{>mobilenav}}
</div>
+3 -99
View File
@@ -15,13 +15,12 @@ describe Precious::Views::LocaleHelpers do
end
def setup
I18n.available_locales = [:en, :de]
I18n.load_path = Dir[File.expand_path("test/support/locales" + "/*.yml")]
::I18n.available_locales = [:en, :de]
::I18n.load_path = Dir[File.expand_path("test/support/locales" + "/*.yml")]
end
def teardown
I18n.locale = :en
I18n.load_path = Dir[::File.expand_path("lib/gollum/locales") + "/*.yml"]
end
let(:dummy_instance) { TestClass.new }
@@ -106,7 +105,7 @@ describe Precious::Views::LocaleHelpers do
end
it "does not return translation keys under other classes" do
other_i18n_keys = I18n.t("nonexistent_test_class").keys
other_i18n_keys = I18n.t("nonexistant_test_class").keys
_(subject.keys).wont_include other_i18n_keys
end
@@ -132,99 +131,4 @@ describe Precious::Views::LocaleHelpers do
end
end
end
describe "#tt" do
describe "mustache usage" do
let(:subject) { dummy_instance.render(mustache_template) }
let(:mustache_template) { "{{ tt.test_class.hello_world }}" }
describe "in the default locale" do
it "returns the translation string" do
_(subject).must_equal "Hello world"
end
end
describe "in the configured locale" do
it "returns the translation string" do
I18n.locale = :de
_(subject).must_equal "Hallo Welt"
end
end
describe "translations with YAML arguments" do
let(:mustache_template) { "{{ tt.test_class.author_info.full }}" }
describe "in the default locale" do
it "autofills YAML arguments" do
_(subject).must_equal "Author J.R.R. is from Bloemfontein"
end
end
describe "in the configured locale" do
it "autofills YAML arguments" do
I18n.locale = :de
_(subject).must_equal "Autor J.R.R. ist vom Bloemfontein"
end
end
end
describe "translations with invalid arguments" do
let(:mustache_template) { "{{ tt.test_class.has_invalid_argument }}" }
it "fails gracefully with embedded error message" do
expected_string = "Welcome to " \
"[#{TestClass::NO_METHOD_MESSAGE}: no_matching_method]"
_(subject).must_equal expected_string
end
end
describe "missing translations" do
let(:mustache_template) {
"{{ tt.test_class.nested.nonexistent_key }}"
}
it "outputs an empty string" do
_(subject).must_be_empty
end
end
end
describe "usage" do
let(:subject) { dummy_instance.tt }
it "returns a hash" do
_(subject).must_be_kind_of Hash
end
it "returns all present translation keys" do
i18n_keys = I18n.t(".").keys
_(subject.keys).must_equal i18n_keys
end
it "returns nested keys" do
nested_keys = subject[:test_class][:author_info].keys
_(nested_keys).must_equal [:full]
end
describe "auto-filled YAML arguments" do
let(:subject) { dummy_instance.tt[:test_class][:author_info][:full] }
it "auto-fills in the default locale" do
_(subject).must_equal "Author J.R.R. is from Bloemfontein"
end
it "auto-fills in a configured locale" do
I18n.locale = :de
_(subject).must_equal "Autor J.R.R. ist vom Bloemfontein"
end
end
end
end
end
-1
View File
@@ -32,7 +32,6 @@ ENV['RACK_ENV'] = 'test'
require 'gollum'
require 'gollum/app'
# Disable the metadata feature
$METADATA = false
-52
View File
@@ -1,52 +0,0 @@
require_relative "../capybara_helper"
context "editor interface" do
include Capybara::DSL
setup do
@path = cloned_testpath "examples/lotr.git"
@wiki = Gollum::Wiki.new @path
Precious::App.set :gollum_path, @path
Precious::App.set :wiki_options, {}
Capybara.app = Precious::App
end
teardown do
@path = nil
@wiki = nil
Capybara.reset_sessions!
Capybara.use_default_driver
end
test "editor renders help panel" do
visit "/create/new-article"
in_editor_toolbar do
click_on "Help"
end
help_widget = find "#gollum-editor-help"
within help_widget do
click_on "Miscellaneous"
click_on "Emoji"
assert_includes page.text,
"Gollum uses JoyPixels 4 for its emoji. To include one, wrap the " \
"emoji name in colons and use underscores instead of spaces (e.g. " \
":heart: or :point_up:)."
end
end
def in_editor_toolbar &block
return unless block_given?
within "#gollum-editor-function-bar" do
yield
end
end
end
-49
View File
@@ -1,49 +0,0 @@
require_relative '../capybara_helper'
def console_log(page, level = :severe)
page.driver.browser.logs.get(:browser).select{|log| log.level == level.to_s.upcase }
end
def expected_errors
Regexp.union([
%r{Refused to apply style from 'http:.*/gollum/create/custom.css'},
%r{.*/gollum/create/mathjax.config.js - Failed to load resource: the server responded with a status of 403}
])
end
def assert_only_expected_errors(log)
assert_equal [], log.reject {|err| err.message.match?(expected_errors) }
end
context 'Frontend with mathjax and mermaid' do
include Capybara::DSL
setup do
@path = cloned_testpath("examples/lotr.git")
@wiki = Gollum::Wiki.new(@path)
Precious::App.set(:gollum_path, @path)
Precious::App.set(:wiki_options, {
mathjax: true,
mermaid: true,
mathjax_config: 'mathjax.config.js'
})
Capybara.app = Precious::App
end
test 'no unexpected errors on /' do
visit '/'
log = console_log(page)
assert_only_expected_errors(log)
end
test 'no unexpected errors on /create/' do
visit '/gollum/create/Foobar'
log = console_log(page)
assert_only_expected_errors(log)
end
teardown do
Capybara.reset_sessions!
Capybara.use_default_driver
end
end
-61
View File
@@ -1,61 +0,0 @@
require_relative '../capybara_helper'
context 'Localized frontend' do
include Capybara::DSL
setup do
@path = cloned_testpath "examples/lotr.git"
@wiki = Gollum::Wiki.new(@path)
Precious::App.set :gollum_path, @path
Precious::App.set :wiki_options, {mathjax: true}
Capybara.app = Precious::App
end
test 'can visit search results page' do
visit '/gollum/search'
fill_in('Search', with: 'something-to-return-no-results')
.native
.send_keys(:return)
assert_includes page.text,
'Search results for something-to-return-no-results'
assert_includes page.text,
'There are no results for your search something-to-return-no-results.'
click_on 'Back to Top'
visit '/gollum/search'
fill_in('Search', with: 'Bilbo').native.send_keys(:return)
assert_includes page.text, 'Search results for Bilbo'
click_on 'Show all hits on this page'
click_on 'Bilbo-Baggins.md'
assert page.current_path, '/Bilbo-Baggins.md'
end
test 'can visit overview page' do
visit "/gollum/overview"
assert_includes page.text, 'Overview of master'
assert_includes page.text, 'Home'
click_on 'Back to Top'
click_on 'Bilbo-Baggins.md'
assert page.current_path, '/Bilbo-Baggins.md'
end
teardown do
@path = nil
@wiki = nil
Capybara.reset_sessions!
Capybara.use_default_driver
end
end
+1 -1
View File
@@ -4,5 +4,5 @@ en:
full: Author %{author} is from %{location}
has_invalid_argument: Welcome to %{no_matching_method}
hello_world: Hello world
nonexistent_test_class:
nonexistant_test_class:
never_called: Never called
+14 -106
View File
@@ -63,10 +63,18 @@ context "Frontend" do
end
test 'rss feed' do
channel_title = <<EOF
<title>Gollum Wiki Latest Changes</title>
EOF
item = <<EOF
<description>Commited by: &lt;a href=&quot;mailto:dawa.ometto@phil.uu.nl&quot;&gt;Dawa Ometto&lt;/a&gt;&lt;br/&gt;Commit ID: 02796b1&lt;br/&gt;&lt;br/&gt;Affected files:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://example.org/custom.css/02796b1450691f90db5d6dc6a816a4980ce80d07&quot;&gt;custom.css&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://example.org/custom.js/02796b1450691f90db5d6dc6a816a4980ce80d07&quot;&gt;custom.js&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
EOF
get '/gollum/feed/'
assert last_response.ok?
assert_equal 'application/rss+xml', last_response.headers['Content-Type']
assert last_response.body.start_with?('<?xml')
assert last_response.body.include?(item)
assert last_response.body.include?(channel_title)
end
test "show sidebar, header, footer when present" do
@@ -205,8 +213,8 @@ context "Frontend" do
assert_equal last_response.status, 500
end
test "rename page catches nonexistent target" do
# Nonexistent rename target
test "rename page catches non-existent target" do
# Non-existent rename target
post "/gollum/rename/B", :message => 'def'
assert !last_response.ok?
assert_equal last_response.status, 500
@@ -469,7 +477,7 @@ context "Frontend" do
assert_equal 'abc', file.raw_data
Precious::App.set(:wiki_options, {allow_uploads: false})
end
test "upload a file with mode page" do
temp_upload_file = Tempfile.new(['upload', '.file']) << "abc\r"
temp_upload_file.close
@@ -483,7 +491,7 @@ context "Frontend" do
assert_equal "abc\r", file.raw_data
Precious::App.set(:wiki_options, {allow_uploads: false, per_page_uploads: false})
end
test "upload a file with valid extension" do
temp_upload_file = Tempfile.new(['upload', '.txt']) << "abc\r"
temp_upload_file.close
@@ -498,20 +506,6 @@ context "Frontend" do
Precious::App.set(:wiki_options, {allow_uploads: false, per_page_uploads: false})
end
test 'upload a file with mode page from the edit page (drag and drop)' do
temp_upload_file = Tempfile.new(['upload', '.file']) << "abc\r"
temp_upload_file.close
Precious::App.set(:wiki_options, {allow_uploads: true, per_page_uploads: true})
post "/gollum/upload_file", {:file => Rack::Test::UploadedFile.new(::File.open(temp_upload_file))}, {'HTTP_REFERER' => 'http://localhost:4567/gollum/edit/foo/Bar.md', 'HTTP_HOST' => 'localhost:4567'}
assert_equal 302, last_response.status # redirect is expected
@wiki.clear_cache
# Find the file in a page-specific subdir (here: foo/Bar), based on referer
file = @wiki.file("uploads/foo/Bar/#{::File.basename(temp_upload_file.path)}")
assert_equal "abc\r", file.raw_data
Precious::App.set(:wiki_options, {allow_uploads: false, per_page_uploads: false})
end
test "upload a file with https referer" do
temp_upload_file = Tempfile.new(['https_upload', '.file']) << 'abc'
temp_upload_file.close
@@ -526,6 +520,7 @@ context "Frontend" do
Precious::App.set(:wiki_options, {allow_uploads: false, per_page_uploads: false})
end
test "guard against uploading an existing file" do
temp_upload_file = Tempfile.new(['upload', '.file']) << 'abc'
temp_upload_file.close
@@ -1059,94 +1054,7 @@ context 'Frontend with base path' do
assert_equal '/wiki/gollum/history/Bilbo-Baggins.md', last_request.fullpath
end
test 'upload a file with mode page from the edit page (drag and drop)' do
temp_upload_file = Tempfile.new(['upload', '.file']) << "abc\r"
temp_upload_file.close
Precious::App.set(:wiki_options, {allow_uploads: true, per_page_uploads: true})
post "/wiki/gollum/upload_file", {:file => Rack::Test::UploadedFile.new(::File.open(temp_upload_file))}, {'HTTP_REFERER' => 'http://localhost:4567/wiki/gollum/edit/foo/Bar.md', 'HTTP_HOST' => 'localhost:4567'}
assert_equal 302, last_response.status # redirect is expected
@wiki.clear_cache
# Find the file in a page-specific subdir (here: foo/Bar), based on referer
file = @wiki.file("uploads/foo/Bar/#{::File.basename(temp_upload_file.path)}")
assert_equal "abc\r", file.raw_data
Precious::App.set(:wiki_options, {allow_uploads: false, per_page_uploads: false})
end
def app
Precious::MapGollum.new(@base_path)
end
end
context "Default keybindings" do
include Rack::Test::Methods
setup do
@path = cloned_testpath "examples/empty.git"
@wiki = Gollum::Wiki.new @path
@url = '/gollum/create/test'
Precious::App.set :gollum_path, @path
Precious::App.set :wiki_options, {default_keybinding: nil}
end
teardown do
FileUtils.rm_rf @path
@path = nil
@wiki = nil
@url = nil
end
test 'keybinding unset' do
get @url
assert_equal last_response.body.include?('selected="selected" value="default"'), false
assert_equal last_response.body.include?('selected="selected" value="vim"'), false
assert_equal last_response.body.include?('selected="selected" value="emacs"'), false
end
test 'nonexistent keybinding' do
Precious::App.set :wiki_options, {:default_keybinding => 'does-not-exist'}
get @url
assert_equal last_response.body.include?('selected="selected" value="default"'), false
assert_equal last_response.body.include?('selected="selected" value="vim"'), false
assert_equal last_response.body.include?('selected="selected" value="emacs"'), false
end
test 'keybinding `default`' do
Precious::App.set :wiki_options, {:default_keybinding => 'default'}
get @url
assert_equal last_response.body.include?('selected="selected" value="default"'), true
assert_equal last_response.body.include?('selected="selected" value="vim"'), false
assert_equal last_response.body.include?('selected="selected" value="emacs"'), false
end
test 'keybinding `vim`' do
Precious::App.set :wiki_options, {:default_keybinding => 'vim'}
get @url
assert_equal last_response.body.include?('selected="selected" value="default"'), false
assert_equal last_response.body.include?('selected="selected" value="vim"'), true
assert_equal last_response.body.include?('selected="selected" value="emacs"'), false
end
test 'keybinding `emacs`' do
Precious::App.set :wiki_options, {:default_keybinding => 'emacs'}
get @url
assert_equal last_response.body.include?('selected="selected" value="default"'), false
assert_equal last_response.body.include?('selected="selected" value="vim"'), false
assert_equal last_response.body.include?('selected="selected" value="emacs"'), true
end
def app
Precious::App
end
end
-32
View File
@@ -1,32 +0,0 @@
require File.expand_path(File.join(File.dirname(__FILE__), "helper"))
context 'Precious::Helpers' do
include Precious::Helpers
test 'remove trailing and leading slashes' do
['/wiki', '/wiki/', 'wiki/', '//wiki//'].each do |param|
assert_equal 'wiki', remove_leading_and_trailing_slashes(param)
end
assert_equal 'wi/ki', remove_leading_and_trailing_slashes('/wi/ki/')
assert_equal '', remove_leading_and_trailing_slashes('/')
end
test 'per page upload location helper' do
# https referer with and without base path
host_with_port = 'localhost:4567'
assert_equal 'uploads/Home', find_per_page_upload_subdir('https://localhost:4567/Home.md', host_with_port, nil)
assert_equal 'uploads/Home', find_per_page_upload_subdir('https://localhost:4567/wiki/Home.md', host_with_port, '/wiki')
# http referer with and without base path
assert_equal 'uploads/Home', find_per_page_upload_subdir('http://localhost:4567/Home.md', host_with_port, nil)
assert_equal 'uploads/Home', find_per_page_upload_subdir('http://localhost:4567/wiki/Home.md', host_with_port, '/wiki')
# edit page referer with and without base path
assert_equal 'uploads/foo/Home', find_per_page_upload_subdir('http://localhost:4567/gollum/edit/foo/Home.md', host_with_port, nil)
assert_equal 'uploads/foo/Home', find_per_page_upload_subdir('http://localhost:4567/wiki/gollum/edit/foo/Home.md', host_with_port, '/wiki')
# referer with base path with slashes in the wrong place
assert_equal 'uploads/Home', find_per_page_upload_subdir('http://localhost:4567/wiki/Home.md', host_with_port, '/wiki/')
assert_equal 'uploads/Home', find_per_page_upload_subdir('http://localhost:4567/wiki/Home.md', host_with_port, 'wiki')
end
end
+1 -1
View File
@@ -15,7 +15,7 @@ context "Precious::Views::Compare" do
end
test 'rename diff' do
# JGit returns differently formatted diffs for rename commits. Support both kinds of diff.
# JGit returns differenly formatted diffs for rename commits. Support both kinds of diff.
jgit_diff = "diff --git a/Foo.md b/Bar.md\nsimilarity index 100%\nrename from Foo.md\nrename to Bar.md"
rugged_diff = "diff --git a/Bar.md b/Bar.md\nnew file mode 100644\nindex 0000000..e69de29\n--- /dev/null\n+++ b/Bar.md\n"
+1 -1
View File
@@ -85,7 +85,7 @@ context 'Latest changes with page-file-dir' do
assert body.include?('Elrond.md'), 'latest changes should log changes in page_file_dir'
end
test 'latest changes should strip off page_file_dir' do
test 'latest chages should strip off page_file_dir' do
get('/gollum/latest_changes')
body = last_response.body
assert_equal body.include?('<a href="/Rivendell/Elrond.md/'), false
+1 -1
View File
@@ -67,7 +67,7 @@ context "Precious::Views::Overview" do
test "folders first" do
@page.instance_variable_set("@base_url", "")
results = [FakePageResult.new("Gondor/Boromir.md"), FakePageResult.new("Hobbit.md"), FakePageResult.new("Home.md"), FakePageResult.new("Mordor/Eye-Of-Sauron.md"), FakePageResult.new("Mordor/todo.md"), FakePageResult.new("Rivendell/Elrond.md"), FakePageResult.new("My-Precious.md"), FakePageResult.new("Zamin.md"), FakePageResult.new("Samwise-Gamgee.md"), FakePageResult.new("roast-mutton.md"), FakePageResult.new("Bilbo-Baggins.md")]
results = [FakePageResult.new("Gondor/Bromir.md"), FakePageResult.new("Hobbit.md"), FakePageResult.new("Home.md"), FakePageResult.new("Mordor/Eye-Of-Sauron.md"), FakePageResult.new("Mordor/todo.md"), FakePageResult.new("Rivendell/Elrond.md"), FakePageResult.new("My-Precious.md"), FakePageResult.new("Zamin.md"), FakePageResult.new("Samwise-Gamgee.md"), FakePageResult.new("roast-mutton.md"), FakePageResult.new("Bilbo-Baggins.md")]
@page.instance_variable_set("@results", results)
files = 0
folders = 0
-101
View File
@@ -1,101 +0,0 @@
require_relative "helper"
context "Precious::Views::RSS" do
# Simplistically mimics a `Gollum::Git::Actor` object.
#
MockAuthor = Struct.new(:name, :email)
# Simplistically mimics a `Gollum::Git::Commit` object.
#
MockChange = Class.new do
def author
MockAuthor.new("committer name", "email@example.com")
end
def authored_date
Time.new(1999, 01, 01, 0, 0)
end
def files
["file 1", "file 2"]
end
def id
"f0f0f0f0"
end
def message
<<~COMMIT_MESSAGE
Multi-line commit message
This commit is multiple lines long so we can test how this is
rendered in the feed.
Git's documentation says that the first line of a commit should
be 50 characters or fewer, and the rest of the commit body's
lines should not exceed 72 characters in length.
COMMIT_MESSAGE
end
def stats
OpenStruct.new(files: [{old_file: "old", new_file: "new"}])
end
end
test "renders a valid RSS feed" do
feed = RSSView.new(
"/",
"Wiki Name",
"https://example.com",
[MockChange.new]
).render
# Assert that we have required RSS feed elements.
#
assert_match "<?xml version=\"1.0\" encoding=\"UTF-8\"?>", feed
assert_match /<rss version=\"2.0\"(.*)<\/rss>/m, feed
assert_match /<channel>(.*)<\/channel>/m, feed
# Assert that we have feed metadata.
#
assert_match "<title>Wiki Name Latest Changes</title>", feed
assert_match "<link>https://example.com/gollum/latest_changes</link>", feed
assert_match "<description>Latest Changes in Wiki Name</description>", feed
assert_match /<pubDate>(.*)<\/pubDate>/, feed
# Assert that we have an item in our feed.
#
assert_match /<item>(.*)<\/item>/m, feed
# And it has a title.
#
assert_match "<title>Multi-line commit message</title>", feed
# Assert that the description contains expected content.
#
assert_match /<description>(.*)<\/description>/m, feed
assert_match /&lt;p&gt; This commit(.*)&lt;\/p&gt;/, feed
assert_match /&lt;p&gt;Git's documentation(.*)&lt;\/p&gt;/, feed
# Assert that the description contains information about the commit.
# i.e.:
#
# <a href="mailto:email@example.com">committer name</a>
#
# Commit ID: f0f0f0f0
#
assert_match /Committed by: /, feed
assert_match /\&lt;a href=\&quot;mailto:email@example.com\&quot;\&gt;/, feed
assert_match /\&gt;\n committer name\n\&lt;\/a&gt;/, feed
assert_match "Commit ID: f0f0f0f", feed
# Assert that affected files include links to commits, i.e.:
#
# <a href="https://example.com/old/f0f0f0f0">new</a>
#
assert_match /Affected files: /, feed
assert_match /\&lt;a href=\&quot;https:\/\/example.com\/old\/f0f0f0f0\&quot;/,
feed
assert_match /f0f0f0f0&quot;&gt;new&lt;\/a&gt;/, feed
end
end
-621
View File
@@ -1,621 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@braintree/sanitize-url@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.0.tgz#fe364f025ba74f6de6c837a84ef44bdb1d61e68f"
integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w==
commander@2:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commander@7:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f"
integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==
"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3:
version "3.1.6"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.6.tgz#0342c835925826f49b4d16eb7027aec334ffc97d"
integrity sha512-DCbBBNuKOeiR9h04ySRBMW52TFVc91O9wJziuyXw6Ztmy8D3oZbmCkOO3UHKC7ceNJsN2Mavo9+vwV8EAEUXzA==
dependencies:
internmap "1 - 2"
d3-axis@1:
version "1.0.12"
resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9"
integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==
d3-axis@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322"
integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==
d3-brush@1:
version "1.1.6"
resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.6.tgz#b0a22c7372cabec128bdddf9bddc058592f89e9b"
integrity sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA==
dependencies:
d3-dispatch "1"
d3-drag "1"
d3-interpolate "1"
d3-selection "1"
d3-transition "1"
d3-brush@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c"
integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==
dependencies:
d3-dispatch "1 - 3"
d3-drag "2 - 3"
d3-interpolate "1 - 3"
d3-selection "3"
d3-transition "3"
d3-chord@1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-1.0.6.tgz#309157e3f2db2c752f0280fedd35f2067ccbb15f"
integrity sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==
dependencies:
d3-array "1"
d3-path "1"
d3-chord@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966"
integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==
dependencies:
d3-path "1 - 3"
d3-collection@1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e"
integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==
d3-color@1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a"
integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==
"d3-color@1 - 3", d3-color@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2"
integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==
d3-contour@1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3"
integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==
dependencies:
d3-array "^1.1.1"
d3-contour@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-3.0.1.tgz#2c64255d43059599cd0dba8fe4cc3d51ccdd9bbd"
integrity sha512-0Oc4D0KyhwhM7ZL0RMnfGycLN7hxHB8CMmwZ3+H26PWAG0ozNuYG5hXSDNgmP1SgJkQMrlG6cP20HoaSbvcJTQ==
dependencies:
d3-array "2 - 3"
d3-delaunay@6:
version "6.0.2"
resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz#7fd3717ad0eade2fc9939f4260acfb503f984e92"
integrity sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==
dependencies:
delaunator "5"
d3-dispatch@1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58"
integrity sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==
"d3-dispatch@1 - 3", d3-dispatch@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e"
integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==
d3-drag@1:
version "1.2.5"
resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-1.2.5.tgz#2537f451acd39d31406677b7dc77c82f7d988f70"
integrity sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w==
dependencies:
d3-dispatch "1"
d3-selection "1"
"d3-drag@2 - 3", d3-drag@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba"
integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==
dependencies:
d3-dispatch "1 - 3"
d3-selection "3"
d3-dsv@1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c"
integrity sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==
dependencies:
commander "2"
iconv-lite "0.4"
rw "1"
"d3-dsv@1 - 3", d3-dsv@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73"
integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==
dependencies:
commander "7"
iconv-lite "0.6"
rw "1"
d3-ease@1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.7.tgz#9a834890ef8b8ae8c558b2fe55bd57f5993b85e2"
integrity sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==
"d3-ease@1 - 3", d3-ease@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4"
integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==
d3-fetch@1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.2.0.tgz#15ce2ecfc41b092b1db50abd2c552c2316cf7fc7"
integrity sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA==
dependencies:
d3-dsv "1"
d3-fetch@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22"
integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==
dependencies:
d3-dsv "1 - 3"
d3-force@1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.2.1.tgz#fd29a5d1ff181c9e7f0669e4bd72bdb0e914ec0b"
integrity sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==
dependencies:
d3-collection "1"
d3-dispatch "1"
d3-quadtree "1"
d3-timer "1"
d3-force@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4"
integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==
dependencies:
d3-dispatch "1 - 3"
d3-quadtree "1 - 3"
d3-timer "1 - 3"
d3-format@1:
version "1.4.5"
resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.5.tgz#374f2ba1320e3717eb74a9356c67daee17a7edb4"
integrity sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ==
"d3-format@1 - 3", d3-format@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641"
integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==
d3-geo@1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.12.1.tgz#7fc2ab7414b72e59fbcbd603e80d9adc029b035f"
integrity sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg==
dependencies:
d3-array "1"
d3-geo@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e"
integrity sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA==
dependencies:
d3-array "2.5.0 - 3"
d3-hierarchy@1:
version "1.1.9"
resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz#2f6bee24caaea43f8dc37545fa01628559647a83"
integrity sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==
d3-hierarchy@3:
version "3.1.2"
resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6"
integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==
d3-interpolate@1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987"
integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==
dependencies:
d3-color "1"
"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d"
integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==
dependencies:
d3-color "1 - 3"
d3-path@1:
version "1.0.9"
resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf"
integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==
"d3-path@1 - 3", d3-path@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e"
integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w==
d3-polygon@1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-1.0.6.tgz#0bf8cb8180a6dc107f518ddf7975e12abbfbd38e"
integrity sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ==
d3-polygon@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398"
integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==
d3-quadtree@1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.7.tgz#ca8b84df7bb53763fe3c2f24bd435137f4e53135"
integrity sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA==
"d3-quadtree@1 - 3", d3-quadtree@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f"
integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==
d3-random@1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-1.1.2.tgz#2833be7c124360bf9e2d3fd4f33847cfe6cab291"
integrity sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==
d3-random@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4"
integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==
d3-scale-chromatic@1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz#54e333fc78212f439b14641fb55801dd81135a98"
integrity sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg==
dependencies:
d3-color "1"
d3-interpolate "1"
d3-scale-chromatic@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a"
integrity sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==
dependencies:
d3-color "1 - 3"
d3-interpolate "1 - 3"
d3-scale@2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f"
integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==
dependencies:
d3-array "^1.2.0"
d3-collection "1"
d3-format "1"
d3-interpolate "1"
d3-time "1"
d3-time-format "2"
d3-scale@4:
version "4.0.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396"
integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==
dependencies:
d3-array "2.10.0 - 3"
d3-format "1 - 3"
d3-interpolate "1.2.0 - 3"
d3-time "2.1.1 - 3"
d3-time-format "2 - 4"
d3-selection@1, d3-selection@^1.1.0:
version "1.4.2"
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.2.tgz#dcaa49522c0dbf32d6c1858afc26b6094555bc5c"
integrity sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg==
"d3-selection@2 - 3", d3-selection@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31"
integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==
d3-shape@1:
version "1.3.7"
resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7"
integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==
dependencies:
d3-path "1"
d3-shape@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.1.0.tgz#c8a495652d83ea6f524e482fca57aa3f8bc32556"
integrity sha512-tGDh1Muf8kWjEDT/LswZJ8WF85yDZLvVJpYU9Nq+8+yW1Z5enxrmXOhTArlkaElU+CTn0OTVNli+/i+HP45QEQ==
dependencies:
d3-path "1 - 3"
d3-time-format@2:
version "2.3.0"
resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.3.0.tgz#107bdc028667788a8924ba040faf1fbccd5a7850"
integrity sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==
dependencies:
d3-time "1"
"d3-time-format@2 - 4", d3-time-format@4:
version "4.1.0"
resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a"
integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==
dependencies:
d3-time "1 - 3"
d3-time@1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1"
integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==
"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975"
integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ==
dependencies:
d3-array "2 - 3"
d3-timer@1:
version "1.0.10"
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5"
integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==
"d3-timer@1 - 3", d3-timer@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0"
integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==
d3-transition@1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-1.3.2.tgz#a98ef2151be8d8600543434c1ca80140ae23b398"
integrity sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA==
dependencies:
d3-color "1"
d3-dispatch "1"
d3-ease "1"
d3-interpolate "1"
d3-selection "^1.1.0"
d3-timer "1"
"d3-transition@2 - 3", d3-transition@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f"
integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==
dependencies:
d3-color "1 - 3"
d3-dispatch "1 - 3"
d3-ease "1 - 3"
d3-interpolate "1 - 3"
d3-timer "1 - 3"
d3-voronoi@1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297"
integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==
d3-zoom@1:
version "1.8.3"
resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-1.8.3.tgz#b6a3dbe738c7763121cd05b8a7795ffe17f4fc0a"
integrity sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==
dependencies:
d3-dispatch "1"
d3-drag "1"
d3-interpolate "1"
d3-selection "1"
d3-transition "1"
d3-zoom@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3"
integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==
dependencies:
d3-dispatch "1 - 3"
d3-drag "2 - 3"
d3-interpolate "1 - 3"
d3-selection "2 - 3"
d3-transition "2 - 3"
d3@^5.14:
version "5.16.0"
resolved "https://registry.yarnpkg.com/d3/-/d3-5.16.0.tgz#9c5e8d3b56403c79d4ed42fbd62f6113f199c877"
integrity sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw==
dependencies:
d3-array "1"
d3-axis "1"
d3-brush "1"
d3-chord "1"
d3-collection "1"
d3-color "1"
d3-contour "1"
d3-dispatch "1"
d3-drag "1"
d3-dsv "1"
d3-ease "1"
d3-fetch "1"
d3-force "1"
d3-format "1"
d3-geo "1"
d3-hierarchy "1"
d3-interpolate "1"
d3-path "1"
d3-polygon "1"
d3-quadtree "1"
d3-random "1"
d3-scale "2"
d3-scale-chromatic "1"
d3-selection "1"
d3-shape "1"
d3-time "1"
d3-time-format "2"
d3-timer "1"
d3-transition "1"
d3-voronoi "1"
d3-zoom "1"
d3@^7.0.0:
version "7.4.4"
resolved "https://registry.yarnpkg.com/d3/-/d3-7.4.4.tgz#bfbf87487c37d3196efebd5a63e3a0ed8299d8ff"
integrity sha512-97FE+MYdAlV3R9P74+R3Uar7wUKkIFu89UWMjEaDhiJ9VxKvqaMxauImy8PC2DdBkdM2BxJOIoLxPrcZUyrKoQ==
dependencies:
d3-array "3"
d3-axis "3"
d3-brush "3"
d3-chord "3"
d3-color "3"
d3-contour "3"
d3-delaunay "6"
d3-dispatch "3"
d3-drag "3"
d3-dsv "3"
d3-ease "3"
d3-fetch "3"
d3-force "3"
d3-format "3"
d3-geo "3"
d3-hierarchy "3"
d3-interpolate "3"
d3-path "3"
d3-polygon "3"
d3-quadtree "3"
d3-random "3"
d3-scale "4"
d3-scale-chromatic "3"
d3-selection "3"
d3-shape "3"
d3-time "3"
d3-time-format "4"
d3-timer "3"
d3-transition "3"
d3-zoom "3"
dagre-d3@^0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/dagre-d3/-/dagre-d3-0.6.4.tgz#0728d5ce7f177ca2337df141ceb60fbe6eeb7b29"
integrity sha512-e/6jXeCP7/ptlAM48clmX4xTZc5Ek6T6kagS7Oz2HrYSdqcLZFLqpAfh7ldbZRFfxCZVyh61NEPR08UQRVxJzQ==
dependencies:
d3 "^5.14"
dagre "^0.8.5"
graphlib "^2.1.8"
lodash "^4.17.15"
dagre@^0.8.5:
version "0.8.5"
resolved "https://registry.yarnpkg.com/dagre/-/dagre-0.8.5.tgz#ba30b0055dac12b6c1fcc247817442777d06afee"
integrity sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==
dependencies:
graphlib "^2.1.8"
lodash "^4.17.15"
delaunator@5:
version "5.0.0"
resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b"
integrity sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==
dependencies:
robust-predicates "^3.0.0"
dompurify@2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.8.tgz#224fe9ae57d7ebd9a1ae1ac18c1c1ca3f532226f"
integrity sha512-eVhaWoVibIzqdGYjwsBWodIQIaXFSB+cKDf4cfxLMsK0xiud6SE+/WCVx/Xw/UwQsa4cS3T2eITcdtmTg2UKcw==
graphlib@^2.1.8:
version "2.1.8"
resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.8.tgz#5761d414737870084c92ec7b5dbcb0592c9d35da"
integrity sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==
dependencies:
lodash "^4.17.15"
iconv-lite@0.4:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
dependencies:
safer-buffer ">= 2.1.2 < 3"
iconv-lite@0.6:
version "0.6.3"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
"internmap@1 - 2":
version "2.0.3"
resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009"
integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==
khroma@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.0.0.tgz#7577de98aed9f36c7a474c4d453d94c0d6c6588b"
integrity sha512-2J8rDNlQWbtiNYThZRvmMv5yt44ZakX+Tz5ZIp/mN1pt4snn+m030Va5Z4v8xA0cQFDXBwO/8i42xL4QPsVk3g==
lodash@^4.17.15:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
mermaid@^9.1.2:
version "9.1.2"
resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-9.1.2.tgz#98cdc55603464240987fe1a15f68dd06304c07f1"
integrity sha512-RVf3hBKqiMfyORHboCaEjOAK1TomLO50hYRPvlTrZCXlCniM5pRpe8UlkHBjjpaLtioZnbdYv/vEVj7iKnwkJQ==
dependencies:
"@braintree/sanitize-url" "^6.0.0"
d3 "^7.0.0"
dagre "^0.8.5"
dagre-d3 "^0.6.4"
dompurify "2.3.8"
graphlib "^2.1.8"
khroma "^2.0.0"
moment-mini "^2.24.0"
stylis "^4.0.10"
moment-mini@^2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.24.0.tgz#fa68d98f7fe93ae65bf1262f6abb5fb6983d8d18"
integrity sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ==
mousetrap@^1.6.5:
version "1.6.5"
resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.5.tgz#8a766d8c272b08393d5f56074e0b5ec183485bf9"
integrity sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==
robust-predicates@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a"
integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g==
rw@1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==
"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0":
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
stylis@^4.0.10:
version "4.1.1"
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.1.tgz#e46c6a9bbf7c58db1e65bb730be157311ae1fe12"
integrity sha512-lVrM/bNdhVX2OgBFNa2YJ9Lxj7kPzylieHd3TNjuGE0Re9JB7joL5VUKOVH1kdNNJTgGPpT8hmwIAPLaSyEVFQ==