Update samples' dependencies
This commit is contained in:
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
||||||
id "org.springframework.boot" version "2.4.7"
|
id "org.springframework.boot" version "2.6.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
||||||
id "org.springframework.boot" version "2.4.7"
|
id "org.springframework.boot" version "2.6.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
@@ -34,7 +34,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
|
|
||||||
testImplementation 'io.rest-assured:rest-assured:3.0.2'
|
testImplementation 'io.rest-assured:rest-assured'
|
||||||
testImplementation('org.junit.vintage:junit-vintage-engine') {
|
testImplementation('org.junit.vintage:junit-vintage-engine') {
|
||||||
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.springframework.boot" version "2.4.7"
|
id "org.springframework.boot" version "2.6.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
|
|||||||
12
samples/rest-notes-slate/slate/.dockerignore
Normal file
12
samples/rest-notes-slate/slate/.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.git/
|
||||||
|
.github/
|
||||||
|
build/
|
||||||
|
.editorconfig
|
||||||
|
.gitattributes
|
||||||
|
.gitignore
|
||||||
|
CHANGELOG.md
|
||||||
|
CODE_OF_CONDUCT.md
|
||||||
|
deploy.sh
|
||||||
|
font-selection.json
|
||||||
|
README.md
|
||||||
|
Vagrantfile
|
||||||
@@ -1,5 +1,70 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 2.12.0
|
||||||
|
|
||||||
|
*November 04, 2021*
|
||||||
|
|
||||||
|
* Bump nokogiri from 1.12.3 to 1.12.5
|
||||||
|
* Bump ffi from 1.15.0 to 1.15.4
|
||||||
|
* Bump rouge from 3.26.0 to 3.26.1
|
||||||
|
* Bump middleman from 4.4.0 to 4.4.2
|
||||||
|
* Remove unnecessary files from docker images
|
||||||
|
|
||||||
|
## Version 2.11.0
|
||||||
|
|
||||||
|
*August 12, 2021*
|
||||||
|
|
||||||
|
* __[Security]__ Bump addressable transitive dependency from 2.7.0 to 2.8.0
|
||||||
|
* Support specifying custom meta tags in YAML front-matter
|
||||||
|
* Bump nokogiri from 1.11.3 to 1.12.3 (minimum supported version is 1.11.4)
|
||||||
|
* Bump middleman-autoprefixer from 2.10.1 to 3.0.0
|
||||||
|
* Bump jquery from 3.5.1 to 3.6.0
|
||||||
|
* Bump middleman from [`d180ca3`](https://github.com/middleman/middleman/commit/d180ca337202873f2601310c74ba2b6b4cf063ec) to 4.4.0
|
||||||
|
|
||||||
|
## Version 2.10.0
|
||||||
|
|
||||||
|
*April 13, 2021*
|
||||||
|
|
||||||
|
* Add support for Ruby 3.0 (thanks @shaun-scale)
|
||||||
|
* Add requirement for Git on installing dependencies
|
||||||
|
* Bump nokogiri from 1.11.2 to 1.11.3
|
||||||
|
* Bump middleman from 4.3.11 to [`d180ca3`](https://github.com/middleman/middleman/commit/d180ca337202873f2601310c74ba2b6b4cf063ec)
|
||||||
|
|
||||||
|
## Version 2.9.2
|
||||||
|
|
||||||
|
*March 30, 2021*
|
||||||
|
|
||||||
|
* __[Security]__ Bump kramdown from 2.3.0 to 2.3.1
|
||||||
|
* Bump nokogiri from 1.11.1 to 1.11.2
|
||||||
|
|
||||||
|
## Version 2.9.1
|
||||||
|
|
||||||
|
*February 27, 2021*
|
||||||
|
|
||||||
|
* Fix Slate language tabs not working if localStorage is disabled
|
||||||
|
|
||||||
|
## Version 2.9.0
|
||||||
|
|
||||||
|
*January 19, 2021*
|
||||||
|
|
||||||
|
* __Drop support for Ruby 2.3 and 2.4__
|
||||||
|
* __[Security]__ Bump nokogiri from 1.10.10 to 1.11.1
|
||||||
|
* __[Security]__ Bump redcarpet from 3.5.0 to 3.5.1
|
||||||
|
* Specify slate is not supported on Ruby 3.x
|
||||||
|
* Bump rouge from 3.24.0 to 3.26.0
|
||||||
|
|
||||||
|
## Version 2.8.0
|
||||||
|
|
||||||
|
*October 27, 2020*
|
||||||
|
|
||||||
|
* Remove last trailing newline when using the copy code button
|
||||||
|
* Rework docker image and make available at slatedocs/slate
|
||||||
|
* Improve Dockerfile layout to improve caching (thanks @micvbang)
|
||||||
|
* Bump rouge from 3.20 to 3.24
|
||||||
|
* Bump nokogiri from 1.10.9 to 1.10.10
|
||||||
|
* Bump middleman from 4.3.8 to 4.3.11
|
||||||
|
* Bump lunr.js from 2.3.8 to 2.3.9
|
||||||
|
|
||||||
## Version 2.7.1
|
## Version 2.7.1
|
||||||
|
|
||||||
*August 13, 2020*
|
*August 13, 2020*
|
||||||
|
|||||||
@@ -2,19 +2,28 @@ FROM ruby:2.6-slim
|
|||||||
|
|
||||||
WORKDIR /srv/slate
|
WORKDIR /srv/slate
|
||||||
|
|
||||||
|
VOLUME /srv/slate/build
|
||||||
VOLUME /srv/slate/source
|
VOLUME /srv/slate/source
|
||||||
|
|
||||||
EXPOSE 4567
|
EXPOSE 4567
|
||||||
|
|
||||||
COPY . /srv/slate
|
COPY Gemfile .
|
||||||
|
COPY Gemfile.lock .
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
git \
|
||||||
nodejs \
|
nodejs \
|
||||||
&& gem install bundler \
|
&& gem install bundler \
|
||||||
&& bundle install \
|
&& bundle install \
|
||||||
&& apt-get remove -y build-essential \
|
&& apt-get remove -y build-essential git \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
|
COPY . /srv/slate
|
||||||
|
|
||||||
|
RUN chmod +x /srv/slate/slate.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/srv/slate/slate.sh"]
|
||||||
|
CMD ["build"]
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
ruby '>=2.3.1'
|
ruby '>= 2.5'
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# Middleman
|
# Middleman
|
||||||
gem 'middleman', '~>4.3'
|
gem 'middleman', '~> 4.4'
|
||||||
gem 'middleman-syntax', '~> 3.2'
|
gem 'middleman-syntax', '~> 3.2'
|
||||||
gem 'middleman-autoprefixer', '~> 2.7'
|
gem 'middleman-autoprefixer', '~> 3.0'
|
||||||
gem 'middleman-sprockets', '~> 4.1'
|
gem 'middleman-sprockets', '~> 4.1'
|
||||||
gem 'rouge', '~> 3.20'
|
gem 'rouge', '~> 3.21'
|
||||||
gem 'redcarpet', '~> 3.5.0'
|
gem 'redcarpet', '~> 3.5.0'
|
||||||
gem 'nokogiri', '~> 1.10.8'
|
gem 'nokogiri', '~> 1.12.1'
|
||||||
gem 'sass'
|
gem 'sass'
|
||||||
|
gem 'webrick'
|
||||||
|
|||||||
@@ -1,58 +1,59 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (5.2.4.3)
|
activesupport (6.1.4.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.7.0)
|
zeitwerk (~> 2.3)
|
||||||
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
autoprefixer-rails (9.5.1.1)
|
autoprefixer-rails (10.2.5.0)
|
||||||
execjs
|
execjs (< 2.8.0)
|
||||||
backports (3.18.1)
|
backports (3.21.0)
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.7)
|
concurrent-ruby (1.1.9)
|
||||||
contracts (0.13.0)
|
contracts (0.13.0)
|
||||||
dotenv (2.7.6)
|
dotenv (2.7.6)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
fast_blank (1.0.0)
|
fast_blank (1.0.1)
|
||||||
fastimage (2.2.0)
|
fastimage (2.2.5)
|
||||||
ffi (1.13.1)
|
ffi (1.15.4)
|
||||||
haml (5.1.2)
|
haml (5.2.2)
|
||||||
temple (>= 0.8.0)
|
temple (>= 0.8.0)
|
||||||
tilt
|
tilt
|
||||||
hamster (3.0.0)
|
hamster (3.0.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
hashie (3.6.0)
|
hashie (3.6.0)
|
||||||
i18n (0.9.5)
|
i18n (1.6.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
kramdown (2.3.0)
|
kramdown (2.3.1)
|
||||||
rexml
|
rexml
|
||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
memoist (0.16.2)
|
memoist (0.16.2)
|
||||||
middleman (4.3.8)
|
middleman (4.4.2)
|
||||||
coffee-script (~> 2.2)
|
coffee-script (~> 2.2)
|
||||||
haml (>= 4.0.5)
|
haml (>= 4.0.5)
|
||||||
kramdown (>= 2.3.0)
|
kramdown (>= 2.3.0)
|
||||||
middleman-cli (= 4.3.8)
|
middleman-cli (= 4.4.2)
|
||||||
middleman-core (= 4.3.8)
|
middleman-core (= 4.4.2)
|
||||||
middleman-autoprefixer (2.10.1)
|
middleman-autoprefixer (3.0.0)
|
||||||
autoprefixer-rails (~> 9.1)
|
autoprefixer-rails (~> 10.0)
|
||||||
middleman-core (>= 3.3.3)
|
middleman-core (>= 4.0.0)
|
||||||
middleman-cli (4.3.8)
|
middleman-cli (4.4.2)
|
||||||
thor (>= 0.17.0, < 2.0)
|
thor (>= 0.17.0, < 2.0)
|
||||||
middleman-core (4.3.8)
|
middleman-core (4.4.2)
|
||||||
activesupport (>= 4.2, < 6.0)
|
activesupport (>= 6.1, < 7.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.4)
|
||||||
backports (~> 3.6)
|
backports (~> 3.6)
|
||||||
bundler
|
bundler (~> 2.0)
|
||||||
contracts (~> 0.13.0)
|
contracts (~> 0.13.0)
|
||||||
dotenv
|
dotenv
|
||||||
erubis
|
erubis
|
||||||
@@ -61,41 +62,45 @@ GEM
|
|||||||
fastimage (~> 2.0)
|
fastimage (~> 2.0)
|
||||||
hamster (~> 3.0)
|
hamster (~> 3.0)
|
||||||
hashie (~> 3.4)
|
hashie (~> 3.4)
|
||||||
i18n (~> 0.9.0)
|
i18n (~> 1.6.0)
|
||||||
listen (~> 3.0.0)
|
listen (~> 3.0.0)
|
||||||
memoist (~> 0.14)
|
memoist (~> 0.14)
|
||||||
padrino-helpers (~> 0.13.0)
|
padrino-helpers (~> 0.15.0)
|
||||||
parallel
|
parallel
|
||||||
rack (>= 1.4.5, < 3)
|
rack (>= 1.4.5, < 3)
|
||||||
sassc (~> 2.0)
|
sassc (~> 2.0)
|
||||||
servolux
|
servolux
|
||||||
tilt (~> 2.0.9)
|
tilt (~> 2.0.9)
|
||||||
|
toml
|
||||||
uglifier (~> 3.0)
|
uglifier (~> 3.0)
|
||||||
|
webrick
|
||||||
middleman-sprockets (4.1.1)
|
middleman-sprockets (4.1.1)
|
||||||
middleman-core (~> 4.0)
|
middleman-core (~> 4.0)
|
||||||
sprockets (>= 3.0)
|
sprockets (>= 3.0)
|
||||||
middleman-syntax (3.2.0)
|
middleman-syntax (3.2.0)
|
||||||
middleman-core (>= 3.2)
|
middleman-core (>= 3.2)
|
||||||
rouge (~> 3.2)
|
rouge (~> 3.2)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.6.1)
|
||||||
minitest (5.14.1)
|
minitest (5.14.4)
|
||||||
nokogiri (1.10.9)
|
nokogiri (1.12.5)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.6.1)
|
||||||
padrino-helpers (0.13.3.4)
|
racc (~> 1.4)
|
||||||
i18n (~> 0.6, >= 0.6.7)
|
padrino-helpers (0.15.1)
|
||||||
padrino-support (= 0.13.3.4)
|
i18n (>= 0.6.7, < 2)
|
||||||
|
padrino-support (= 0.15.1)
|
||||||
tilt (>= 1.4.1, < 3)
|
tilt (>= 1.4.1, < 3)
|
||||||
padrino-support (0.13.3.4)
|
padrino-support (0.15.1)
|
||||||
activesupport (>= 3.1)
|
parallel (1.21.0)
|
||||||
parallel (1.19.2)
|
parslet (2.0.0)
|
||||||
public_suffix (4.0.5)
|
public_suffix (4.0.6)
|
||||||
|
racc (1.5.2)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rb-fsevent (0.10.4)
|
rb-fsevent (0.11.0)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
redcarpet (3.5.0)
|
redcarpet (3.5.1)
|
||||||
rexml (3.2.4)
|
rexml (3.2.5)
|
||||||
rouge (3.20.0)
|
rouge (3.26.1)
|
||||||
sass (3.7.4)
|
sass (3.7.4)
|
||||||
sass-listen (~> 4.0.0)
|
sass-listen (~> 4.0.0)
|
||||||
sass-listen (4.0.0)
|
sass-listen (4.0.0)
|
||||||
@@ -108,29 +113,33 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
temple (0.8.2)
|
temple (0.8.2)
|
||||||
thor (1.0.1)
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
tzinfo (1.2.7)
|
toml (0.3.0)
|
||||||
thread_safe (~> 0.1)
|
parslet (>= 1.8.0, < 3.0.0)
|
||||||
|
tzinfo (2.0.4)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (3.2.0)
|
uglifier (3.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
|
webrick (1.7.0)
|
||||||
|
zeitwerk (2.5.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
middleman (~> 4.3)
|
middleman (~> 4.4)
|
||||||
middleman-autoprefixer (~> 2.7)
|
middleman-autoprefixer (~> 3.0)
|
||||||
middleman-sprockets (~> 4.1)
|
middleman-sprockets (~> 4.1)
|
||||||
middleman-syntax (~> 3.2)
|
middleman-syntax (~> 3.2)
|
||||||
nokogiri (~> 1.10.8)
|
nokogiri (~> 1.12.1)
|
||||||
redcarpet (~> 3.5.0)
|
redcarpet (~> 3.5.0)
|
||||||
rouge (~> 3.20)
|
rouge (~> 3.21)
|
||||||
sass
|
sass
|
||||||
|
webrick
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.3.3p222
|
ruby 2.7.2p137
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.1.4
|
2.2.22
|
||||||
|
|||||||
82
samples/rest-notes-slate/slate/README.md
Normal file
82
samples/rest-notes-slate/slate/README.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img src="https://raw.githubusercontent.com/slatedocs/img/main/logo-slate.png" alt="Slate: API Documentation Generator" width="226">
|
||||||
|
<br>
|
||||||
|
<a href="https://github.com/slatedocs/slate/actions?query=workflow%3ABuild+branch%3Amain"><img src="https://github.com/slatedocs/slate/workflows/Build/badge.svg?branch=main" alt="Build Status"></a>
|
||||||
|
<a href="https://hub.docker.com/r/slatedocs/slate"><img src="https://img.shields.io/docker/v/slatedocs/slate?sort=semver" alt="Docker Version" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">Slate helps you create beautiful, intelligent, responsive API documentation.</p>
|
||||||
|
|
||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/slatedocs/img/main/screenshot-slate.png" width=700 alt="Screenshot of Example Documentation created with Slate"></p>
|
||||||
|
|
||||||
|
<p align="center"><em>The example above was created with Slate. Check it out at <a href="https://slatedocs.github.io/slate">slatedocs.github.io/slate</a>.</em></p>
|
||||||
|
|
||||||
|
Features
|
||||||
|
------------
|
||||||
|
|
||||||
|
* **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [PayPal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print.
|
||||||
|
|
||||||
|
* **Everything on a single page** — Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy.
|
||||||
|
|
||||||
|
* **Slate is just Markdown** — When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks.
|
||||||
|
|
||||||
|
* **Write code samples in multiple languages** — If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with GitHub Flavored Markdown.
|
||||||
|
|
||||||
|
* **Out-of-the-box syntax highlighting** for [over 100 languages](https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required.
|
||||||
|
|
||||||
|
* **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents.
|
||||||
|
|
||||||
|
* **Let your users update your documentation for you** — By default, your Slate-generated documentation is hosted in a public GitHub repository. Not only does this mean you get free hosting for your docs with GitHub Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere.
|
||||||
|
|
||||||
|
* **RTL Support** Full right-to-left layout for RTL languages such as Arabic, Persian (Farsi), Hebrew etc.
|
||||||
|
|
||||||
|
Getting started with Slate is super easy! Simply press the green "use this template" button above and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](https://slatedocs.github.io/slate/).
|
||||||
|
|
||||||
|
Getting Started with Slate
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
To get started with Slate, please check out the [Getting Started](https://github.com/slatedocs/slate/wiki#getting-started)
|
||||||
|
section in our [wiki](https://github.com/slatedocs/slate/wiki).
|
||||||
|
|
||||||
|
We support running Slate in three different ways:
|
||||||
|
* [Natively](https://github.com/slatedocs/slate/wiki/Using-Slate-Natively)
|
||||||
|
* [Using Vagrant](https://github.com/slatedocs/slate/wiki/Using-Slate-in-Vagrant)
|
||||||
|
* [Using Docker](https://github.com/slatedocs/slate/wiki/Using-Slate-in-Docker)
|
||||||
|
|
||||||
|
Companies Using Slate
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
* [NASA](https://api.nasa.gov)
|
||||||
|
* [Sony](http://developers.cimediacloud.com)
|
||||||
|
* [Best Buy](https://bestbuyapis.github.io/api-documentation/)
|
||||||
|
* [Travis-CI](https://docs.travis-ci.com/api/)
|
||||||
|
* [Greenhouse](https://developers.greenhouse.io/harvest.html)
|
||||||
|
* [WooCommerce](http://woocommerce.github.io/woocommerce-rest-api-docs/)
|
||||||
|
* [Dwolla](https://docs.dwolla.com/)
|
||||||
|
* [Clearbit](https://clearbit.com/docs)
|
||||||
|
* [Coinbase](https://developers.coinbase.com/api)
|
||||||
|
* [Parrot Drones](http://developer.parrot.com/docs/bebop/)
|
||||||
|
* [CoinAPI](https://docs.coinapi.io/)
|
||||||
|
|
||||||
|
You can view more in [the list on the wiki](https://github.com/slatedocs/slate/wiki/Slate-in-the-Wild).
|
||||||
|
|
||||||
|
Questions? Need Help? Found a bug?
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
If you've got questions about setup, deploying, special feature implementation in your fork, or just want to chat with the developer, please feel free to [start a thread in our Discussions tab](https://github.com/slatedocs/slate/discussions)!
|
||||||
|
|
||||||
|
Found a bug with upstream Slate? Go ahead and [submit an issue](https://github.com/slatedocs/slate/issues). And, of course, feel free to submit pull requests with bug fixes or changes to the `dev` branch.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Slate was built by [Robert Lord](https://lord.io) while at [TripIt](https://www.tripit.com/). The project is now maintained by [Matthew Peveler](https://github.com/MasterOdin) and [Mike Ralphson](https://github.com/MikeRalphson).
|
||||||
|
|
||||||
|
Thanks to the following people who have submitted major pull requests:
|
||||||
|
|
||||||
|
- [@chrissrogers](https://github.com/chrissrogers)
|
||||||
|
- [@bootstraponline](https://github.com/bootstraponline)
|
||||||
|
- [@realityking](https://github.com/realityking)
|
||||||
|
- [@cvkef](https://github.com/cvkef)
|
||||||
|
|
||||||
|
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
|
||||||
1
samples/rest-notes-slate/slate/Vagrantfile
vendored
1
samples/rest-notes-slate/slate/Vagrantfile
vendored
@@ -28,6 +28,7 @@ Vagrant.configure(2) do |config|
|
|||||||
echo "=============================================="
|
echo "=============================================="
|
||||||
echo "Installing app dependencies"
|
echo "Installing app dependencies"
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
|
sudo gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
|
||||||
bundle config build.nokogiri --use-system-libraries
|
bundle config build.nokogiri --use-system-libraries
|
||||||
bundle install
|
bundle install
|
||||||
SHELL
|
SHELL
|
||||||
|
|||||||
248
samples/rest-notes-slate/slate/slate.sh
Executable file
248
samples/rest-notes-slate/slate/slate.sh
Executable file
@@ -0,0 +1,248 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit #abort if any command fails
|
||||||
|
|
||||||
|
me=$(basename "$0")
|
||||||
|
|
||||||
|
help_message="\
|
||||||
|
Usage: $me [<options>] <command> [<command-options>]
|
||||||
|
Run commands related to the slate process.
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
|
||||||
|
serve Run the middleman server process, useful for
|
||||||
|
development.
|
||||||
|
build Run the build process.
|
||||||
|
deploy Will build and deploy files to branch. Use
|
||||||
|
--no-build to only deploy.
|
||||||
|
|
||||||
|
Global Options:
|
||||||
|
|
||||||
|
-h, --help Show this help information.
|
||||||
|
-v, --verbose Increase verbosity. Useful for debugging.
|
||||||
|
|
||||||
|
Deploy options:
|
||||||
|
-e, --allow-empty Allow deployment of an empty directory.
|
||||||
|
-m, --message MESSAGE Specify the message used when committing on the
|
||||||
|
deploy branch.
|
||||||
|
-n, --no-hash Don't append the source commit's hash to the deploy
|
||||||
|
commit's message.
|
||||||
|
--no-build Do not build the source files.
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
run_serve() {
|
||||||
|
exec bundle exec middleman serve --watcher-force-polling
|
||||||
|
}
|
||||||
|
|
||||||
|
run_build() {
|
||||||
|
bundle exec middleman build --clean
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_args() {
|
||||||
|
# Set args from a local environment file.
|
||||||
|
if [ -e ".env" ]; then
|
||||||
|
source .env
|
||||||
|
fi
|
||||||
|
|
||||||
|
command=
|
||||||
|
|
||||||
|
# Parse arg flags
|
||||||
|
# If something is exposed as an environment variable, set/overwrite it
|
||||||
|
# here. Otherwise, set/overwrite the internal variable instead.
|
||||||
|
while : ; do
|
||||||
|
if [[ $1 = "-h" || $1 = "--help" ]]; then
|
||||||
|
echo "$help_message"
|
||||||
|
exit 0
|
||||||
|
elif [[ $1 = "-v" || $1 = "--verbose" ]]; then
|
||||||
|
verbose=true
|
||||||
|
shift
|
||||||
|
elif [[ $1 = "-e" || $1 = "--allow-empty" ]]; then
|
||||||
|
allow_empty=true
|
||||||
|
shift
|
||||||
|
elif [[ ( $1 = "-m" || $1 = "--message" ) && -n $2 ]]; then
|
||||||
|
commit_message=$2
|
||||||
|
shift 2
|
||||||
|
elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then
|
||||||
|
GIT_DEPLOY_APPEND_HASH=false
|
||||||
|
shift
|
||||||
|
elif [[ $1 = "--no-build" ]]; then
|
||||||
|
no_build=true
|
||||||
|
shift
|
||||||
|
elif [[ $1 = "serve" || $1 = "build" || $1 = "deploy" ]]; then
|
||||||
|
if [ ! -z "${command}" ]; then
|
||||||
|
>&2 echo "You can only specify one command."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
command=$1
|
||||||
|
shift
|
||||||
|
elif [ -z $1 ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "${command}" ]; then
|
||||||
|
>&2 echo "Command not specified."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set internal option vars from the environment and arg flags. All internal
|
||||||
|
# vars should be declared here, with sane defaults if applicable.
|
||||||
|
|
||||||
|
# Source directory & target branch.
|
||||||
|
deploy_directory=build
|
||||||
|
deploy_branch=gh-pages
|
||||||
|
|
||||||
|
#if no user identity is already set in the current git environment, use this:
|
||||||
|
default_username=${GIT_DEPLOY_USERNAME:-deploy.sh}
|
||||||
|
default_email=${GIT_DEPLOY_EMAIL:-}
|
||||||
|
|
||||||
|
#repository to deploy to. must be readable and writable.
|
||||||
|
repo=origin
|
||||||
|
|
||||||
|
#append commit hash to the end of message by default
|
||||||
|
append_hash=${GIT_DEPLOY_APPEND_HASH:-true}
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
enable_expanded_output
|
||||||
|
|
||||||
|
if ! git diff --exit-code --quiet --cached; then
|
||||||
|
echo Aborting due to uncommitted changes in the index >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
commit_title=`git log -n 1 --format="%s" HEAD`
|
||||||
|
commit_hash=` git log -n 1 --format="%H" HEAD`
|
||||||
|
|
||||||
|
#default commit message uses last title if a custom one is not supplied
|
||||||
|
if [[ -z $commit_message ]]; then
|
||||||
|
commit_message="publish: $commit_title"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#append hash to commit message unless no hash flag was found
|
||||||
|
if [ $append_hash = true ]; then
|
||||||
|
commit_message="$commit_message"$'\n\n'"generated from commit $commit_hash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
previous_branch=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
|
||||||
|
if [ ! -d "$deploy_directory" ]; then
|
||||||
|
echo "Deploy directory '$deploy_directory' does not exist. Aborting." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# must use short form of flag in ls for compatibility with macOS and BSD
|
||||||
|
if [[ -z `ls -A "$deploy_directory" 2> /dev/null` && -z $allow_empty ]]; then
|
||||||
|
echo "Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then
|
||||||
|
# deploy_branch exists in $repo; make sure we have the latest version
|
||||||
|
|
||||||
|
disable_expanded_output
|
||||||
|
git fetch --force $repo $deploy_branch:$deploy_branch
|
||||||
|
enable_expanded_output
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if deploy_branch exists locally
|
||||||
|
if git show-ref --verify --quiet "refs/heads/$deploy_branch"
|
||||||
|
then incremental_deploy
|
||||||
|
else initial_deploy
|
||||||
|
fi
|
||||||
|
|
||||||
|
restore_head
|
||||||
|
}
|
||||||
|
|
||||||
|
initial_deploy() {
|
||||||
|
git --work-tree "$deploy_directory" checkout --orphan $deploy_branch
|
||||||
|
git --work-tree "$deploy_directory" add --all
|
||||||
|
commit+push
|
||||||
|
}
|
||||||
|
|
||||||
|
incremental_deploy() {
|
||||||
|
#make deploy_branch the current branch
|
||||||
|
git symbolic-ref HEAD refs/heads/$deploy_branch
|
||||||
|
#put the previously committed contents of deploy_branch into the index
|
||||||
|
git --work-tree "$deploy_directory" reset --mixed --quiet
|
||||||
|
git --work-tree "$deploy_directory" add --all
|
||||||
|
|
||||||
|
set +o errexit
|
||||||
|
diff=$(git --work-tree "$deploy_directory" diff --exit-code --quiet HEAD --)$?
|
||||||
|
set -o errexit
|
||||||
|
case $diff in
|
||||||
|
0) echo No changes to files in $deploy_directory. Skipping commit.;;
|
||||||
|
1) commit+push;;
|
||||||
|
*)
|
||||||
|
echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to main, use: git symbolic-ref HEAD refs/heads/main && git reset --mixed >&2
|
||||||
|
return $diff
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
commit+push() {
|
||||||
|
set_user_id
|
||||||
|
git --work-tree "$deploy_directory" commit -m "$commit_message"
|
||||||
|
|
||||||
|
disable_expanded_output
|
||||||
|
#--quiet is important here to avoid outputting the repo URL, which may contain a secret token
|
||||||
|
git push --quiet $repo $deploy_branch
|
||||||
|
enable_expanded_output
|
||||||
|
}
|
||||||
|
|
||||||
|
#echo expanded commands as they are executed (for debugging)
|
||||||
|
enable_expanded_output() {
|
||||||
|
if [ $verbose ]; then
|
||||||
|
set -o xtrace
|
||||||
|
set +o verbose
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#this is used to avoid outputting the repo URL, which may contain a secret token
|
||||||
|
disable_expanded_output() {
|
||||||
|
if [ $verbose ]; then
|
||||||
|
set +o xtrace
|
||||||
|
set -o verbose
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_user_id() {
|
||||||
|
if [[ -z `git config user.name` ]]; then
|
||||||
|
git config user.name "$default_username"
|
||||||
|
fi
|
||||||
|
if [[ -z `git config user.email` ]]; then
|
||||||
|
git config user.email "$default_email"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
restore_head() {
|
||||||
|
if [[ $previous_branch = "HEAD" ]]; then
|
||||||
|
#we weren't on any branch before, so just set HEAD back to the commit it was on
|
||||||
|
git update-ref --no-deref HEAD $commit_hash $deploy_branch
|
||||||
|
else
|
||||||
|
git symbolic-ref HEAD refs/heads/$previous_branch
|
||||||
|
fi
|
||||||
|
|
||||||
|
git reset --mixed
|
||||||
|
}
|
||||||
|
|
||||||
|
filter() {
|
||||||
|
sed -e "s|$repo|\$repo|g"
|
||||||
|
}
|
||||||
|
|
||||||
|
sanitize() {
|
||||||
|
"$@" 2> >(filter 1>&2) | filter
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_args "$@"
|
||||||
|
|
||||||
|
if [ "${command}" = "serve" ]; then
|
||||||
|
run_serve
|
||||||
|
elif [[ "${command}" = "build" ]]; then
|
||||||
|
run_build
|
||||||
|
elif [[ ${command} = "deploy" ]]; then
|
||||||
|
if [[ ${no_build} != true ]]; then
|
||||||
|
run_build
|
||||||
|
fi
|
||||||
|
main "$@"
|
||||||
|
fi
|
||||||
@@ -17,6 +17,10 @@ includes:
|
|||||||
search: true
|
search: true
|
||||||
|
|
||||||
code_clipboard: true
|
code_clipboard: true
|
||||||
|
|
||||||
|
meta:
|
||||||
|
- name: description
|
||||||
|
content: Documentation for the Kittn API
|
||||||
---
|
---
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
@@ -45,7 +49,7 @@ api = kittn.authorize('meowmeowmeow')
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# With shell, you can just pass the correct header with each request
|
# With shell, you can just pass the correct header with each request
|
||||||
curl "api_endpoint_here"
|
curl "api_endpoint_here" \
|
||||||
-H "Authorization: meowmeowmeow"
|
-H "Authorization: meowmeowmeow"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -86,7 +90,7 @@ api.kittens.get()
|
|||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl "http://example.com/api/kittens"
|
curl "http://example.com/api/kittens" \
|
||||||
-H "Authorization: meowmeowmeow"
|
-H "Authorization: meowmeowmeow"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -152,7 +156,7 @@ api.kittens.get(2)
|
|||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl "http://example.com/api/kittens/2"
|
curl "http://example.com/api/kittens/2" \
|
||||||
-H "Authorization: meowmeowmeow"
|
-H "Authorization: meowmeowmeow"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -206,8 +210,8 @@ api.kittens.delete(2)
|
|||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl "http://example.com/api/kittens/2"
|
curl "http://example.com/api/kittens/2" \
|
||||||
-X DELETE
|
-X DELETE \
|
||||||
-H "Authorization: meowmeowmeow"
|
-H "Authorization: meowmeowmeow"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
function copyToClipboard(container) {
|
function copyToClipboard(container) {
|
||||||
const el = document.createElement('textarea');
|
const el = document.createElement('textarea');
|
||||||
el.value = container.textContent;
|
el.value = container.textContent.replace(/\n$/, '');
|
||||||
document.body.appendChild(el);
|
document.body.appendChild(el);
|
||||||
el.select();
|
el.select();
|
||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
|
|||||||
@@ -129,11 +129,16 @@ under the License.
|
|||||||
history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
|
history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
|
||||||
|
|
||||||
// save language as next default
|
// save language as next default
|
||||||
localStorage.setItem("language", language);
|
if (localStorage) {
|
||||||
|
localStorage.setItem("language", language);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupLanguages(l) {
|
function setupLanguages(l) {
|
||||||
var defaultLanguage = localStorage.getItem("language");
|
var defaultLanguage = null;
|
||||||
|
if (localStorage) {
|
||||||
|
defaultLanguage = localStorage.getItem("language");
|
||||||
|
}
|
||||||
|
|
||||||
languages = l;
|
languages = l;
|
||||||
|
|
||||||
@@ -142,7 +147,9 @@ under the License.
|
|||||||
// the language is in the URL, so use that language!
|
// the language is in the URL, so use that language!
|
||||||
activateLanguage(presetLanguage);
|
activateLanguage(presetLanguage);
|
||||||
|
|
||||||
localStorage.setItem("language", presetLanguage);
|
if (localStorage) {
|
||||||
|
localStorage.setItem("language", presetLanguage);
|
||||||
|
}
|
||||||
} else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
|
} else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
|
||||||
// the language was the last selected one saved in localstorage, so use that language!
|
// the language was the last selected one saved in localstorage, so use that language!
|
||||||
activateLanguage(defaultLanguage);
|
activateLanguage(defaultLanguage);
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
/*!
|
/*!
|
||||||
* jQuery JavaScript Library v3.5.1
|
* jQuery JavaScript Library v3.6.0
|
||||||
* https://jquery.com/
|
* https://jquery.com/
|
||||||
*
|
*
|
||||||
* Includes Sizzle.js
|
* Includes Sizzle.js
|
||||||
* https://sizzlejs.com/
|
* https://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright JS Foundation and other contributors
|
* Copyright OpenJS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://jquery.org/license
|
* https://jquery.org/license
|
||||||
*
|
*
|
||||||
* Date: 2020-05-04T22:49Z
|
* Date: 2021-03-02T17:08Z
|
||||||
*/
|
*/
|
||||||
( function( global, factory ) {
|
( function( global, factory ) {
|
||||||
|
|
||||||
@@ -76,12 +76,16 @@ var support = {};
|
|||||||
|
|
||||||
var isFunction = function isFunction( obj ) {
|
var isFunction = function isFunction( obj ) {
|
||||||
|
|
||||||
// Support: Chrome <=57, Firefox <=52
|
// Support: Chrome <=57, Firefox <=52
|
||||||
// In some browsers, typeof returns "function" for HTML <object> elements
|
// In some browsers, typeof returns "function" for HTML <object> elements
|
||||||
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
||||||
// We don't want to classify *any* DOM node as a function.
|
// We don't want to classify *any* DOM node as a function.
|
||||||
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
||||||
};
|
// Plus for old WebKit, typeof returns "function" for HTML collections
|
||||||
|
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
||||||
|
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
||||||
|
typeof obj.item !== "function";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
var isWindow = function isWindow( obj ) {
|
var isWindow = function isWindow( obj ) {
|
||||||
@@ -147,7 +151,7 @@ function toType( obj ) {
|
|||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
version = "3.5.1",
|
version = "3.6.0",
|
||||||
|
|
||||||
// Define a local copy of jQuery
|
// Define a local copy of jQuery
|
||||||
jQuery = function( selector, context ) {
|
jQuery = function( selector, context ) {
|
||||||
@@ -401,7 +405,7 @@ jQuery.extend( {
|
|||||||
if ( isArrayLike( Object( arr ) ) ) {
|
if ( isArrayLike( Object( arr ) ) ) {
|
||||||
jQuery.merge( ret,
|
jQuery.merge( ret,
|
||||||
typeof arr === "string" ?
|
typeof arr === "string" ?
|
||||||
[ arr ] : arr
|
[ arr ] : arr
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
push.call( ret, arr );
|
push.call( ret, arr );
|
||||||
@@ -496,9 +500,9 @@ if ( typeof Symbol === "function" ) {
|
|||||||
|
|
||||||
// Populate the class2type map
|
// Populate the class2type map
|
||||||
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
||||||
function( _i, name ) {
|
function( _i, name ) {
|
||||||
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
function isArrayLike( obj ) {
|
function isArrayLike( obj ) {
|
||||||
|
|
||||||
@@ -518,14 +522,14 @@ function isArrayLike( obj ) {
|
|||||||
}
|
}
|
||||||
var Sizzle =
|
var Sizzle =
|
||||||
/*!
|
/*!
|
||||||
* Sizzle CSS Selector Engine v2.3.5
|
* Sizzle CSS Selector Engine v2.3.6
|
||||||
* https://sizzlejs.com/
|
* https://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright JS Foundation and other contributors
|
* Copyright JS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://js.foundation/
|
* https://js.foundation/
|
||||||
*
|
*
|
||||||
* Date: 2020-03-14
|
* Date: 2021-02-16
|
||||||
*/
|
*/
|
||||||
( function( window ) {
|
( function( window ) {
|
||||||
var i,
|
var i,
|
||||||
@@ -1108,8 +1112,8 @@ support = Sizzle.support = {};
|
|||||||
* @returns {Boolean} True iff elem is a non-HTML XML node
|
* @returns {Boolean} True iff elem is a non-HTML XML node
|
||||||
*/
|
*/
|
||||||
isXML = Sizzle.isXML = function( elem ) {
|
isXML = Sizzle.isXML = function( elem ) {
|
||||||
var namespace = elem.namespaceURI,
|
var namespace = elem && elem.namespaceURI,
|
||||||
docElem = ( elem.ownerDocument || elem ).documentElement;
|
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
||||||
|
|
||||||
// Support: IE <=8
|
// Support: IE <=8
|
||||||
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
||||||
@@ -3024,9 +3028,9 @@ var rneedsContext = jQuery.expr.match.needsContext;
|
|||||||
|
|
||||||
function nodeName( elem, name ) {
|
function nodeName( elem, name ) {
|
||||||
|
|
||||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||||
|
|
||||||
};
|
}
|
||||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||||
|
|
||||||
|
|
||||||
@@ -3997,8 +4001,8 @@ jQuery.extend( {
|
|||||||
resolveContexts = Array( i ),
|
resolveContexts = Array( i ),
|
||||||
resolveValues = slice.call( arguments ),
|
resolveValues = slice.call( arguments ),
|
||||||
|
|
||||||
// the master Deferred
|
// the primary Deferred
|
||||||
master = jQuery.Deferred(),
|
primary = jQuery.Deferred(),
|
||||||
|
|
||||||
// subordinate callback factory
|
// subordinate callback factory
|
||||||
updateFunc = function( i ) {
|
updateFunc = function( i ) {
|
||||||
@@ -4006,30 +4010,30 @@ jQuery.extend( {
|
|||||||
resolveContexts[ i ] = this;
|
resolveContexts[ i ] = this;
|
||||||
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
||||||
if ( !( --remaining ) ) {
|
if ( !( --remaining ) ) {
|
||||||
master.resolveWith( resolveContexts, resolveValues );
|
primary.resolveWith( resolveContexts, resolveValues );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Single- and empty arguments are adopted like Promise.resolve
|
// Single- and empty arguments are adopted like Promise.resolve
|
||||||
if ( remaining <= 1 ) {
|
if ( remaining <= 1 ) {
|
||||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
||||||
!remaining );
|
!remaining );
|
||||||
|
|
||||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||||
if ( master.state() === "pending" ||
|
if ( primary.state() === "pending" ||
|
||||||
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
||||||
|
|
||||||
return master.then();
|
return primary.then();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multiple arguments are aggregated like Promise.all array elements
|
// Multiple arguments are aggregated like Promise.all array elements
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
||||||
}
|
}
|
||||||
|
|
||||||
return master.promise();
|
return primary.promise();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@@ -4180,8 +4184,8 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|||||||
for ( ; i < len; i++ ) {
|
for ( ; i < len; i++ ) {
|
||||||
fn(
|
fn(
|
||||||
elems[ i ], key, raw ?
|
elems[ i ], key, raw ?
|
||||||
value :
|
value :
|
||||||
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5089,10 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var
|
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||||
rkeyEvent = /^key/,
|
|
||||||
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
|
||||||
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
||||||
|
|
||||||
function returnTrue() {
|
function returnTrue() {
|
||||||
return true;
|
return true;
|
||||||
@@ -5387,8 +5388,8 @@ jQuery.event = {
|
|||||||
event = jQuery.event.fix( nativeEvent ),
|
event = jQuery.event.fix( nativeEvent ),
|
||||||
|
|
||||||
handlers = (
|
handlers = (
|
||||||
dataPriv.get( this, "events" ) || Object.create( null )
|
dataPriv.get( this, "events" ) || Object.create( null )
|
||||||
)[ event.type ] || [],
|
)[ event.type ] || [],
|
||||||
special = jQuery.event.special[ event.type ] || {};
|
special = jQuery.event.special[ event.type ] || {};
|
||||||
|
|
||||||
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
||||||
@@ -5512,12 +5513,12 @@ jQuery.event = {
|
|||||||
get: isFunction( hook ) ?
|
get: isFunction( hook ) ?
|
||||||
function() {
|
function() {
|
||||||
if ( this.originalEvent ) {
|
if ( this.originalEvent ) {
|
||||||
return hook( this.originalEvent );
|
return hook( this.originalEvent );
|
||||||
}
|
}
|
||||||
} :
|
} :
|
||||||
function() {
|
function() {
|
||||||
if ( this.originalEvent ) {
|
if ( this.originalEvent ) {
|
||||||
return this.originalEvent[ name ];
|
return this.originalEvent[ name ];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -5656,7 +5657,13 @@ function leverageNative( el, type, expectSync ) {
|
|||||||
// Cancel the outer synthetic event
|
// Cancel the outer synthetic event
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return result.value;
|
|
||||||
|
// Support: Chrome 86+
|
||||||
|
// In Chrome, if an element having a focusout handler is blurred by
|
||||||
|
// clicking outside of it, it invokes the handler synchronously. If
|
||||||
|
// that handler calls `.remove()` on the element, the data is cleared,
|
||||||
|
// leaving `result` undefined. We need to guard against this.
|
||||||
|
return result && result.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is an inner synthetic event for an event with a bubbling surrogate
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
||||||
@@ -5821,34 +5828,7 @@ jQuery.each( {
|
|||||||
targetTouches: true,
|
targetTouches: true,
|
||||||
toElement: true,
|
toElement: true,
|
||||||
touches: true,
|
touches: true,
|
||||||
|
which: true
|
||||||
which: function( event ) {
|
|
||||||
var button = event.button;
|
|
||||||
|
|
||||||
// Add which for key events
|
|
||||||
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
|
||||||
return event.charCode != null ? event.charCode : event.keyCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
|
||||||
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
|
||||||
if ( button & 1 ) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( button & 2 ) {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( button & 4 ) {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return event.which;
|
|
||||||
}
|
|
||||||
}, jQuery.event.addProp );
|
}, jQuery.event.addProp );
|
||||||
|
|
||||||
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
||||||
@@ -5874,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Suppress native focus or blur as it's already being fired
|
||||||
|
// in leverageNative.
|
||||||
|
_default: function() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
delegateType: delegateType
|
delegateType: delegateType
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
@@ -6541,6 +6527,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||||||
// set in CSS while `offset*` properties report correct values.
|
// set in CSS while `offset*` properties report correct values.
|
||||||
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
||||||
// some versions of this test; make sure not to make it pass there!
|
// some versions of this test; make sure not to make it pass there!
|
||||||
|
//
|
||||||
|
// Support: Firefox 70+
|
||||||
|
// Only Firefox includes border widths
|
||||||
|
// in computed dimensions. (gh-4529)
|
||||||
reliableTrDimensions: function() {
|
reliableTrDimensions: function() {
|
||||||
var table, tr, trChild, trStyle;
|
var table, tr, trChild, trStyle;
|
||||||
if ( reliableTrDimensionsVal == null ) {
|
if ( reliableTrDimensionsVal == null ) {
|
||||||
@@ -6548,17 +6538,32 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||||||
tr = document.createElement( "tr" );
|
tr = document.createElement( "tr" );
|
||||||
trChild = document.createElement( "div" );
|
trChild = document.createElement( "div" );
|
||||||
|
|
||||||
table.style.cssText = "position:absolute;left:-11111px";
|
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
||||||
|
tr.style.cssText = "border:1px solid";
|
||||||
|
|
||||||
|
// Support: Chrome 86+
|
||||||
|
// Height set through cssText does not get applied.
|
||||||
|
// Computed height then comes back as 0.
|
||||||
tr.style.height = "1px";
|
tr.style.height = "1px";
|
||||||
trChild.style.height = "9px";
|
trChild.style.height = "9px";
|
||||||
|
|
||||||
|
// Support: Android 8 Chrome 86+
|
||||||
|
// In our bodyBackground.html iframe,
|
||||||
|
// display for all div elements is set to "inline",
|
||||||
|
// which causes a problem only in Android 8 Chrome 86.
|
||||||
|
// Ensuring the div is display: block
|
||||||
|
// gets around this issue.
|
||||||
|
trChild.style.display = "block";
|
||||||
|
|
||||||
documentElement
|
documentElement
|
||||||
.appendChild( table )
|
.appendChild( table )
|
||||||
.appendChild( tr )
|
.appendChild( tr )
|
||||||
.appendChild( trChild );
|
.appendChild( trChild );
|
||||||
|
|
||||||
trStyle = window.getComputedStyle( tr );
|
trStyle = window.getComputedStyle( tr );
|
||||||
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
|
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
||||||
|
parseInt( trStyle.borderTopWidth, 10 ) +
|
||||||
|
parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
||||||
|
|
||||||
documentElement.removeChild( table );
|
documentElement.removeChild( table );
|
||||||
}
|
}
|
||||||
@@ -7022,10 +7027,10 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) {
|
|||||||
// Running getBoundingClientRect on a disconnected node
|
// Running getBoundingClientRect on a disconnected node
|
||||||
// in IE throws an error.
|
// in IE throws an error.
|
||||||
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
||||||
swap( elem, cssShow, function() {
|
swap( elem, cssShow, function() {
|
||||||
return getWidthOrHeight( elem, dimension, extra );
|
return getWidthOrHeight( elem, dimension, extra );
|
||||||
} ) :
|
} ) :
|
||||||
getWidthOrHeight( elem, dimension, extra );
|
getWidthOrHeight( elem, dimension, extra );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -7084,7 +7089,7 @@ jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
|||||||
swap( elem, { marginLeft: 0 }, function() {
|
swap( elem, { marginLeft: 0 }, function() {
|
||||||
return elem.getBoundingClientRect().left;
|
return elem.getBoundingClientRect().left;
|
||||||
} )
|
} )
|
||||||
) + "px";
|
) + "px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -7223,7 +7228,7 @@ Tween.propHooks = {
|
|||||||
if ( jQuery.fx.step[ tween.prop ] ) {
|
if ( jQuery.fx.step[ tween.prop ] ) {
|
||||||
jQuery.fx.step[ tween.prop ]( tween );
|
jQuery.fx.step[ tween.prop ]( tween );
|
||||||
} else if ( tween.elem.nodeType === 1 && (
|
} else if ( tween.elem.nodeType === 1 && (
|
||||||
jQuery.cssHooks[ tween.prop ] ||
|
jQuery.cssHooks[ tween.prop ] ||
|
||||||
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
||||||
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
||||||
} else {
|
} else {
|
||||||
@@ -7468,7 +7473,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|||||||
|
|
||||||
anim.done( function() {
|
anim.done( function() {
|
||||||
|
|
||||||
/* eslint-enable no-loop-func */
|
/* eslint-enable no-loop-func */
|
||||||
|
|
||||||
// The final step of a "hide" animation is actually hiding the element
|
// The final step of a "hide" animation is actually hiding the element
|
||||||
if ( !hidden ) {
|
if ( !hidden ) {
|
||||||
@@ -7588,7 +7593,7 @@ function Animation( elem, properties, options ) {
|
|||||||
tweens: [],
|
tweens: [],
|
||||||
createTween: function( prop, end ) {
|
createTween: function( prop, end ) {
|
||||||
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
||||||
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
||||||
animation.tweens.push( tween );
|
animation.tweens.push( tween );
|
||||||
return tween;
|
return tween;
|
||||||
},
|
},
|
||||||
@@ -7761,7 +7766,8 @@ jQuery.fn.extend( {
|
|||||||
anim.stop( true );
|
anim.stop( true );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
doAnimation.finish = doAnimation;
|
|
||||||
|
doAnimation.finish = doAnimation;
|
||||||
|
|
||||||
return empty || optall.queue === false ?
|
return empty || optall.queue === false ?
|
||||||
this.each( doAnimation ) :
|
this.each( doAnimation ) :
|
||||||
@@ -8401,8 +8407,8 @@ jQuery.fn.extend( {
|
|||||||
if ( this.setAttribute ) {
|
if ( this.setAttribute ) {
|
||||||
this.setAttribute( "class",
|
this.setAttribute( "class",
|
||||||
className || value === false ?
|
className || value === false ?
|
||||||
"" :
|
"" :
|
||||||
dataPriv.get( this, "__className__" ) || ""
|
dataPriv.get( this, "__className__" ) || ""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8417,7 +8423,7 @@ jQuery.fn.extend( {
|
|||||||
while ( ( elem = this[ i++ ] ) ) {
|
while ( ( elem = this[ i++ ] ) ) {
|
||||||
if ( elem.nodeType === 1 &&
|
if ( elem.nodeType === 1 &&
|
||||||
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8707,9 +8713,7 @@ jQuery.extend( jQuery.event, {
|
|||||||
special.bindType || type;
|
special.bindType || type;
|
||||||
|
|
||||||
// jQuery handler
|
// jQuery handler
|
||||||
handle = (
|
handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
||||||
dataPriv.get( cur, "events" ) || Object.create( null )
|
|
||||||
)[ event.type ] &&
|
|
||||||
dataPriv.get( cur, "handle" );
|
dataPriv.get( cur, "handle" );
|
||||||
if ( handle ) {
|
if ( handle ) {
|
||||||
handle.apply( cur, data );
|
handle.apply( cur, data );
|
||||||
@@ -8856,7 +8860,7 @@ var rquery = ( /\?/ );
|
|||||||
|
|
||||||
// Cross-browser xml parsing
|
// Cross-browser xml parsing
|
||||||
jQuery.parseXML = function( data ) {
|
jQuery.parseXML = function( data ) {
|
||||||
var xml;
|
var xml, parserErrorElem;
|
||||||
if ( !data || typeof data !== "string" ) {
|
if ( !data || typeof data !== "string" ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -8865,12 +8869,17 @@ jQuery.parseXML = function( data ) {
|
|||||||
// IE throws on parseFromString with invalid input.
|
// IE throws on parseFromString with invalid input.
|
||||||
try {
|
try {
|
||||||
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||||
} catch ( e ) {
|
} catch ( e ) {}
|
||||||
xml = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
||||||
jQuery.error( "Invalid XML: " + data );
|
if ( !xml || parserErrorElem ) {
|
||||||
|
jQuery.error( "Invalid XML: " + (
|
||||||
|
parserErrorElem ?
|
||||||
|
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
||||||
|
return el.textContent;
|
||||||
|
} ).join( "\n" ) :
|
||||||
|
data
|
||||||
|
) );
|
||||||
}
|
}
|
||||||
return xml;
|
return xml;
|
||||||
};
|
};
|
||||||
@@ -8971,16 +8980,14 @@ jQuery.fn.extend( {
|
|||||||
// Can add propHook for "elements" to filter or add form elements
|
// Can add propHook for "elements" to filter or add form elements
|
||||||
var elements = jQuery.prop( this, "elements" );
|
var elements = jQuery.prop( this, "elements" );
|
||||||
return elements ? jQuery.makeArray( elements ) : this;
|
return elements ? jQuery.makeArray( elements ) : this;
|
||||||
} )
|
} ).filter( function() {
|
||||||
.filter( function() {
|
|
||||||
var type = this.type;
|
var type = this.type;
|
||||||
|
|
||||||
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
||||||
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
||||||
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
||||||
( this.checked || !rcheckableType.test( type ) );
|
( this.checked || !rcheckableType.test( type ) );
|
||||||
} )
|
} ).map( function( _i, elem ) {
|
||||||
.map( function( _i, elem ) {
|
|
||||||
var val = jQuery( this ).val();
|
var val = jQuery( this ).val();
|
||||||
|
|
||||||
if ( val == null ) {
|
if ( val == null ) {
|
||||||
@@ -9033,7 +9040,8 @@ var
|
|||||||
|
|
||||||
// Anchor tag for parsing the document origin
|
// Anchor tag for parsing the document origin
|
||||||
originAnchor = document.createElement( "a" );
|
originAnchor = document.createElement( "a" );
|
||||||
originAnchor.href = location.href;
|
|
||||||
|
originAnchor.href = location.href;
|
||||||
|
|
||||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||||
function addToPrefiltersOrTransports( structure ) {
|
function addToPrefiltersOrTransports( structure ) {
|
||||||
@@ -9414,8 +9422,8 @@ jQuery.extend( {
|
|||||||
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
||||||
globalEventContext = s.context &&
|
globalEventContext = s.context &&
|
||||||
( callbackContext.nodeType || callbackContext.jquery ) ?
|
( callbackContext.nodeType || callbackContext.jquery ) ?
|
||||||
jQuery( callbackContext ) :
|
jQuery( callbackContext ) :
|
||||||
jQuery.event,
|
jQuery.event,
|
||||||
|
|
||||||
// Deferreds
|
// Deferreds
|
||||||
deferred = jQuery.Deferred(),
|
deferred = jQuery.Deferred(),
|
||||||
@@ -9727,8 +9735,10 @@ jQuery.extend( {
|
|||||||
response = ajaxHandleResponses( s, jqXHR, responses );
|
response = ajaxHandleResponses( s, jqXHR, responses );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use a noop converter for missing script
|
// Use a noop converter for missing script but not if jsonp
|
||||||
if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
|
if ( !isSuccess &&
|
||||||
|
jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
||||||
|
jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
||||||
s.converters[ "text script" ] = function() {};
|
s.converters[ "text script" ] = function() {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10466,12 +10476,6 @@ jQuery.offset = {
|
|||||||
options.using.call( elem, props );
|
options.using.call( elem, props );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ( typeof props.top === "number" ) {
|
|
||||||
props.top += "px";
|
|
||||||
}
|
|
||||||
if ( typeof props.left === "number" ) {
|
|
||||||
props.left += "px";
|
|
||||||
}
|
|
||||||
curElem.css( props );
|
curElem.css( props );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10640,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
|||||||
|
|
||||||
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
||||||
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||||
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
jQuery.each( {
|
||||||
function( defaultExtra, funcName ) {
|
padding: "inner" + name,
|
||||||
|
content: type,
|
||||||
|
"": "outer" + name
|
||||||
|
}, function( defaultExtra, funcName ) {
|
||||||
|
|
||||||
// Margin is only for outerHeight, outerWidth
|
// Margin is only for outerHeight, outerWidth
|
||||||
jQuery.fn[ funcName ] = function( margin, value ) {
|
jQuery.fn[ funcName ] = function( margin, value ) {
|
||||||
@@ -10726,7 +10733,8 @@ jQuery.fn.extend( {
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
jQuery.each(
|
||||||
|
( "blur focus focusin focusout resize scroll click dblclick " +
|
||||||
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
||||||
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
||||||
function( _i, name ) {
|
function( _i, name ) {
|
||||||
@@ -10737,7 +10745,8 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
|||||||
this.on( name, null, data, fn ) :
|
this.on( name, null, data, fn ) :
|
||||||
this.trigger( name );
|
this.trigger( name );
|
||||||
};
|
};
|
||||||
} );
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8
|
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -54,10 +54,10 @@ var lunr = function (config) {
|
|||||||
return builder.build()
|
return builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
lunr.version = "2.3.8"
|
lunr.version = "2.3.9"
|
||||||
/*!
|
/*!
|
||||||
* lunr.utils
|
* lunr.utils
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -177,7 +177,7 @@ lunr.FieldRef.prototype.toString = function () {
|
|||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
* lunr.Set
|
* lunr.Set
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -211,8 +211,8 @@ lunr.Set.complete = {
|
|||||||
return other
|
return other
|
||||||
},
|
},
|
||||||
|
|
||||||
union: function (other) {
|
union: function () {
|
||||||
return other
|
return this
|
||||||
},
|
},
|
||||||
|
|
||||||
contains: function () {
|
contains: function () {
|
||||||
@@ -389,7 +389,7 @@ lunr.Token.prototype.clone = function (fn) {
|
|||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
* lunr.tokenizer
|
* lunr.tokenizer
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -465,7 +465,7 @@ lunr.tokenizer = function (obj, metadata) {
|
|||||||
lunr.tokenizer.separator = /[\s\-]+/
|
lunr.tokenizer.separator = /[\s\-]+/
|
||||||
/*!
|
/*!
|
||||||
* lunr.Pipeline
|
* lunr.Pipeline
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -732,7 +732,7 @@ lunr.Pipeline.prototype.toJSON = function () {
|
|||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
* lunr.Vector
|
* lunr.Vector
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -929,7 +929,7 @@ lunr.Vector.prototype.toJSON = function () {
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/*!
|
/*!
|
||||||
* lunr.stemmer
|
* lunr.stemmer
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -1151,7 +1151,7 @@ lunr.stemmer = (function(){
|
|||||||
lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')
|
lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')
|
||||||
/*!
|
/*!
|
||||||
* lunr.stopWordFilter
|
* lunr.stopWordFilter
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1316,7 +1316,7 @@ lunr.stopWordFilter = lunr.generateStopWordFilter([
|
|||||||
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')
|
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')
|
||||||
/*!
|
/*!
|
||||||
* lunr.trimmer
|
* lunr.trimmer
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1343,7 +1343,7 @@ lunr.trimmer = function (token) {
|
|||||||
lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')
|
lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')
|
||||||
/*!
|
/*!
|
||||||
* lunr.TokenSet
|
* lunr.TokenSet
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1827,7 +1827,7 @@ lunr.TokenSet.Builder.prototype.minimize = function (downTo) {
|
|||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
* lunr.Index
|
* lunr.Index
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1994,7 +1994,7 @@ lunr.Index.prototype.query = function (fn) {
|
|||||||
*/
|
*/
|
||||||
var clause = query.clauses[i],
|
var clause = query.clauses[i],
|
||||||
terms = null,
|
terms = null,
|
||||||
clauseMatches = lunr.Set.complete
|
clauseMatches = lunr.Set.empty
|
||||||
|
|
||||||
if (clause.usePipeline) {
|
if (clause.usePipeline) {
|
||||||
terms = this.pipeline.runString(clause.term, {
|
terms = this.pipeline.runString(clause.term, {
|
||||||
@@ -2319,7 +2319,7 @@ lunr.Index.load = function (serializedIndex) {
|
|||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
* lunr.Builder
|
* lunr.Builder
|
||||||
* Copyright (C) 2019 Oliver Nightingale
|
* Copyright (C) 2020 Oliver Nightingale
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,6 +29,15 @@ under the License.
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<% if current_page.data.key?('meta') %>
|
||||||
|
<% current_page.data.meta.each do |meta| %>
|
||||||
|
<meta
|
||||||
|
<% meta.each do |key, value| %>
|
||||||
|
<%= "#{key}=\"#{value}\"" %>
|
||||||
|
<% end %>
|
||||||
|
>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
<title><%= current_page.data.title || "API Documentation" %></title>
|
<title><%= current_page.data.title || "API Documentation" %></title>
|
||||||
|
|
||||||
<style media="screen">
|
<style media="screen">
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ public class ApiDocumentation {
|
|||||||
.andDo(document("error-example",
|
.andDo(document("error-example",
|
||||||
responseFields(
|
responseFields(
|
||||||
fieldWithPath("error").description("The HTTP error that occurred, e.g. `Bad Request`"),
|
fieldWithPath("error").description("The HTTP error that occurred, e.g. `Bad Request`"),
|
||||||
fieldWithPath("message").description("A description of the cause of the error"),
|
|
||||||
fieldWithPath("path").description("The path to which the request was made"),
|
fieldWithPath("path").description("The path to which the request was made"),
|
||||||
fieldWithPath("status").description("The HTTP status code, e.g. `400`"),
|
fieldWithPath("status").description("The HTTP status code, e.g. `400`"),
|
||||||
fieldWithPath("timestamp").description("The time, in milliseconds, at which the error occurred"))));
|
fieldWithPath("timestamp").description("The time, in milliseconds, at which the error occurred"))));
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.4.7</version>
|
<version>2.6.2</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-restdocs.version>2.0.6.BUILD-SNAPSHOT</spring-restdocs.version>
|
<spring-restdocs.version>2.0.6.BUILD-SNAPSHOT</spring-restdocs.version>
|
||||||
|
<h2.version>2.0.206</h2.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014-2020 the original author or authors.
|
* Copyright 2014-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -99,7 +99,6 @@ public class ApiDocumentation {
|
|||||||
.andDo(document("error-example",
|
.andDo(document("error-example",
|
||||||
responseFields(
|
responseFields(
|
||||||
fieldWithPath("error").description("The HTTP error that occurred, e.g. `Bad Request`"),
|
fieldWithPath("error").description("The HTTP error that occurred, e.g. `Bad Request`"),
|
||||||
fieldWithPath("message").description("A description of the cause of the error"),
|
|
||||||
fieldWithPath("path").description("The path to which the request was made"),
|
fieldWithPath("path").description("The path to which the request was made"),
|
||||||
fieldWithPath("status").description("The HTTP status code, e.g. `400`"),
|
fieldWithPath("status").description("The HTTP status code, e.g. `400`"),
|
||||||
fieldWithPath("timestamp").description("The time, in milliseconds, at which the error occurred"))));
|
fieldWithPath("timestamp").description("The time, in milliseconds, at which the error occurred"))));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
||||||
id "org.springframework.boot" version "2.4.7"
|
id "org.springframework.boot" version "2.6.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
||||||
id "org.springframework.boot" version "2.4.7"
|
id "org.springframework.boot" version "2.6.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ apply plugin: 'java'
|
|||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
maven { url 'https://repo.spring.io/milestone' }
|
maven { url 'https://repo.spring.io/milestone' }
|
||||||
maven { url 'https://repo.spring.io/snapshot' }
|
maven { url 'https://repo.spring.io/snapshot' }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'com.example'
|
group = 'com.example'
|
||||||
@@ -30,12 +30,12 @@ configurations {
|
|||||||
dependencies {
|
dependencies {
|
||||||
asciidoctorExtensions "org.springframework.restdocs:spring-restdocs-asciidoctor:${project.ext['spring-restdocs.version']}"
|
asciidoctorExtensions "org.springframework.restdocs:spring-restdocs-asciidoctor:${project.ext['spring-restdocs.version']}"
|
||||||
|
|
||||||
implementation 'io.projectreactor.ipc:reactor-netty:0.7.1.RELEASE'
|
implementation 'io.projectreactor.netty:reactor-netty-http:1.0.15'
|
||||||
implementation 'org.springframework:spring-context:5.0.1.RELEASE'
|
implementation 'org.springframework:spring-context:5.3.14'
|
||||||
implementation 'org.springframework:spring-webflux:5.0.1.RELEASE'
|
implementation 'org.springframework:spring-webflux:5.3.14'
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.13.1'
|
||||||
testImplementation 'org.springframework:spring-test:5.0.1.RELEASE'
|
testImplementation 'org.springframework:spring-test:5.3.14'
|
||||||
testImplementation "org.springframework.restdocs:spring-restdocs-webtestclient:${project.ext['spring-restdocs.version']}"
|
testImplementation "org.springframework.restdocs:spring-restdocs-webtestclient:${project.ext['spring-restdocs.version']}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014-2017 the original author or authors.
|
* Copyright 2014-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -27,7 +27,7 @@ import org.springframework.web.reactive.function.server.RouterFunction;
|
|||||||
import org.springframework.web.reactive.function.server.RouterFunctions;
|
import org.springframework.web.reactive.function.server.RouterFunctions;
|
||||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||||
|
|
||||||
import reactor.ipc.netty.http.server.HttpServer;
|
import reactor.netty.http.server.HttpServer;
|
||||||
|
|
||||||
@EnableWebFlux
|
@EnableWebFlux
|
||||||
@Configuration
|
@Configuration
|
||||||
@@ -41,8 +41,8 @@ public class SampleWebTestClientApplication {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
RouterFunction<?> routerFunction = new AnnotationConfigApplicationContext(SampleWebTestClientApplication.class).getBean(RouterFunction.class);
|
RouterFunction<?> routerFunction = new AnnotationConfigApplicationContext(SampleWebTestClientApplication.class).getBean(RouterFunction.class);
|
||||||
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(RouterFunctions.toHttpHandler(routerFunction));
|
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(RouterFunctions.toHttpHandler(routerFunction));
|
||||||
HttpServer httpServer = HttpServer.create(8080);
|
HttpServer httpServer = HttpServer.create().handle(adapter);
|
||||||
httpServer.startAndAwait(adapter);
|
httpServer.bindNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user