From ab0b3e6d8e8c1ec9417b67c3cb412d7a17284bcd Mon Sep 17 00:00:00 2001
From: Robert Lord
Date: Thu, 5 Jul 2018 16:55:45 -0700
Subject: [PATCH 001/164] Update issue template to direct users to changelog
instead of git commits
---
.github/ISSUE_TEMPLATE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index c026a82da63..9c25c1acce2 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -9,7 +9,7 @@ If you've found a bug with Slate upstream that you're still encountering even in
-->
Operating system: ✍️ TODO
-Last upstream commit (run `git log --author="Robert Lord" | head -n 1`): ✍️ TODO
+Last upstream version (check `CHANGELOG.md` for the latest version): ✍️ TODO
Browser version(s): ✍️ TODO
Ruby version (run `ruby -v`): ✍️ TODO
From 1d6404a7b5396bed7525e1e8b9a9030301dc343a Mon Sep 17 00:00:00 2001
From: Grey Baker
Date: Wed, 7 Nov 2018 00:58:32 +0000
Subject: [PATCH 002/164] [Security] Bump nokogiri from 1.8.2 to 1.8.5 (#1026)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.2 to 1.8.5. **This update includes security fixes.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.2...v1.8.5)
Signed-off-by: dependabot[bot]
---
Gemfile | 2 +-
Gemfile.lock | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 79d41fff6dd..6c8967ffeef 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,4 +8,4 @@ gem 'middleman-autoprefixer', '~> 2.7.0'
gem 'middleman-sprockets', '~> 4.1.0'
gem 'rouge', '~> 2.0.5'
gem 'redcarpet', '~> 3.4.0'
-gem 'nokogiri', '~> 1.8.2'
+gem 'nokogiri', '~> 1.8.5'
diff --git a/Gemfile.lock b/Gemfile.lock
index eebb95a9694..cff46a21ecc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -81,7 +81,7 @@ GEM
rouge (~> 2.0)
mini_portile2 (2.3.0)
minitest (5.10.1)
- nokogiri (1.8.2)
+ nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
padrino-helpers (0.13.3.3)
i18n (~> 0.6, >= 0.6.7)
@@ -118,7 +118,7 @@ DEPENDENCIES
middleman-autoprefixer (~> 2.7.0)
middleman-sprockets (~> 4.1.0)
middleman-syntax (~> 3.0.0)
- nokogiri (~> 1.8.2)
+ nokogiri (~> 1.8.5)
redcarpet (~> 3.4.0)
rouge (~> 2.0.5)
From 99cdc40578aa57d2e048cf21dd3e964808eb9c13 Mon Sep 17 00:00:00 2001
From: Christian Oliff
Date: Mon, 4 Feb 2019 03:28:05 +0900
Subject: [PATCH 003/164] Update link in .editorconfig to https (#1049)
---
.editorconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.editorconfig b/.editorconfig
index b54e172c0db..1692977cec8 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# EditorConfig is awesome: https://EditorConfig.org
# Top-most EditorConfig file
root = true
From c8b73553558380474bf2b5617879b20f20fb4f8b Mon Sep 17 00:00:00 2001
From: Jeff Stieler
Date: Sun, 3 Feb 2019 11:30:15 -0700
Subject: [PATCH 004/164] Fix lowercase "c" in "WooCommerce". (#1043)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c9017010ae6..675aad33460 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ Companies Using Slate
* [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/)
+* [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)
From 16d2b1e27c171f607d3dec88c3b06517da23b242 Mon Sep 17 00:00:00 2001
From: Grey Baker
Date: Sat, 1 Jun 2019 19:08:00 +0100
Subject: [PATCH 005/164] [Security] Bump ffi from 1.9.17 to 1.9.25 (#1017)
Bumps [ffi](https://github.com/ffi/ffi) from 1.9.17 to 1.9.25. **This update includes security fixes.**
- [Release notes](https://github.com/ffi/ffi/releases)
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/compare/1.9.17...1.9.25)
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index cff46a21ecc..95d793e1636 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -25,7 +25,7 @@ GEM
fast_blank (1.0.0)
fastimage (2.0.1)
addressable (~> 2)
- ffi (1.9.17)
+ ffi (1.9.25)
haml (4.0.7)
tilt
hamster (3.0.0)
From 3dfde2c078881c0df1f10774a9d33441989cd966 Mon Sep 17 00:00:00 2001
From: Grey Baker
Date: Sat, 1 Jun 2019 19:11:08 +0100
Subject: [PATCH 006/164] [Security] Bump rack from 2.0.5 to 2.0.6 (#1038)
Bumps [rack](https://github.com/rack/rack) from 2.0.5 to 2.0.6. **This update includes security fixes.**
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.5...2.0.6)
Signed-off-by: dependabot[bot]
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 95d793e1636..cb455faa095 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -91,7 +91,7 @@ GEM
activesupport (>= 3.1)
parallel (1.10.0)
public_suffix (2.0.5)
- rack (2.0.5)
+ rack (2.0.6)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
From 98951d5ca970eeda84cd5d522adef81ef73c0216 Mon Sep 17 00:00:00 2001
From: Robert Lord
Date: Sat, 1 Jun 2019 13:18:59 -0700
Subject: [PATCH 007/164] Bundle update; upgrade middleman, add sass gem
Patch taken from #1092, thanks jakemack
---
Gemfile | 9 ++--
Gemfile.lock | 115 +++++++++++++++++++++++++++------------------------
2 files changed, 66 insertions(+), 58 deletions(-)
diff --git a/Gemfile b/Gemfile
index 6c8967ffeef..a77f013adca 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,10 +2,11 @@ ruby '>=2.3.1'
source 'https://rubygems.org'
# Middleman
-gem 'middleman', '~>4.2.1'
-gem 'middleman-syntax', '~> 3.0.0'
-gem 'middleman-autoprefixer', '~> 2.7.0'
-gem 'middleman-sprockets', '~> 4.1.0'
+gem 'middleman', '~>4.3'
+gem 'middleman-syntax', '~> 3.0'
+gem 'middleman-autoprefixer', '~> 2.7'
+gem 'middleman-sprockets', '~> 4.1'
gem 'rouge', '~> 2.0.5'
gem 'redcarpet', '~> 3.4.0'
gem 'nokogiri', '~> 1.8.5'
+gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index cb455faa095..142d13eeec8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,60 +1,57 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.0.1)
+ activesupport (5.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (~> 0.7)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- addressable (2.5.0)
- public_suffix (~> 2.0, >= 2.0.2)
- autoprefixer-rails (6.6.1)
+ addressable (2.6.0)
+ public_suffix (>= 2.0.2, < 4.0)
+ autoprefixer-rails (9.5.1.1)
execjs
- backports (3.6.8)
+ backports (3.15.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- compass-import-once (1.0.5)
- sass (>= 3.2, < 3.5)
- concurrent-ruby (1.0.5)
+ concurrent-ruby (1.1.5)
contracts (0.13.0)
- dotenv (2.2.0)
+ dotenv (2.7.2)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
- fastimage (2.0.1)
- addressable (~> 2)
- ffi (1.9.25)
- haml (4.0.7)
+ fastimage (2.1.5)
+ ffi (1.11.1)
+ haml (5.1.1)
+ temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
- hashie (3.5.1)
- i18n (0.7.0)
- kramdown (1.13.2)
+ hashie (3.6.0)
+ i18n (0.9.5)
+ concurrent-ruby (~> 1.0)
+ kramdown (1.17.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- memoist (0.15.0)
- middleman (4.2.1)
+ memoist (0.16.0)
+ middleman (4.3.4)
coffee-script (~> 2.2)
- compass-import-once (= 1.0.5)
haml (>= 4.0.5)
kramdown (~> 1.2)
- middleman-cli (= 4.2.1)
- middleman-core (= 4.2.1)
- sass (>= 3.4.0, < 4.0)
- middleman-autoprefixer (2.7.1)
- autoprefixer-rails (>= 6.5.2, < 7.0.0)
+ middleman-cli (= 4.3.4)
+ middleman-core (= 4.3.4)
+ middleman-autoprefixer (2.10.1)
+ autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.2.1)
+ middleman-cli (4.3.4)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.2.1)
+ middleman-core (4.3.4)
activesupport (>= 4.2, < 5.1)
addressable (~> 2.3)
backports (~> 3.6)
- bundler (~> 1.1)
+ bundler
contracts (~> 0.13.0)
dotenv
erubis
@@ -63,67 +60,77 @@ GEM
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
- i18n (~> 0.7.0)
+ i18n (~> 0.9.0)
listen (~> 3.0.0)
memoist (~> 0.14)
padrino-helpers (~> 0.13.0)
parallel
rack (>= 1.4.5, < 3)
- sass (>= 3.4)
+ sassc (~> 2.0)
servolux
- tilt (~> 2.0)
+ tilt (~> 2.0.9)
uglifier (~> 3.0)
- middleman-sprockets (4.1.0)
+ middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
middleman-syntax (3.0.0)
middleman-core (>= 3.2)
rouge (~> 2.0)
mini_portile2 (2.3.0)
- minitest (5.10.1)
+ minitest (5.11.3)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
- padrino-helpers (0.13.3.3)
+ padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
- padrino-support (= 0.13.3.3)
+ padrino-support (= 0.13.3.4)
tilt (>= 1.4.1, < 3)
- padrino-support (0.13.3.3)
+ padrino-support (0.13.3.4)
activesupport (>= 3.1)
- parallel (1.10.0)
- public_suffix (2.0.5)
- rack (2.0.6)
- rb-fsevent (0.9.8)
- rb-inotify (0.9.8)
- ffi (>= 0.5.0)
+ parallel (1.17.0)
+ public_suffix (3.1.0)
+ rack (2.0.7)
+ rake (12.3.2)
+ rb-fsevent (0.10.3)
+ rb-inotify (0.10.0)
+ ffi (~> 1.0)
redcarpet (3.4.0)
rouge (2.0.7)
- sass (3.4.23)
- servolux (0.12.0)
+ sass (3.7.4)
+ sass-listen (~> 4.0.0)
+ sass-listen (4.0.0)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ sassc (2.0.1)
+ ffi (~> 1.9)
+ rake
+ servolux (0.13.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
- thor (0.19.4)
- thread_safe (0.3.5)
- tilt (2.0.6)
- tzinfo (1.2.2)
+ temple (0.8.1)
+ thor (0.20.3)
+ thread_safe (0.3.6)
+ tilt (2.0.9)
+ tzinfo (1.2.5)
thread_safe (~> 0.1)
- uglifier (3.0.4)
+ uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
PLATFORMS
ruby
DEPENDENCIES
- middleman (~> 4.2.1)
- middleman-autoprefixer (~> 2.7.0)
- middleman-sprockets (~> 4.1.0)
- middleman-syntax (~> 3.0.0)
+ middleman (~> 4.3)
+ middleman-autoprefixer (~> 2.7)
+ middleman-sprockets (~> 4.1)
+ middleman-syntax (~> 3.0)
nokogiri (~> 1.8.5)
redcarpet (~> 3.4.0)
rouge (~> 2.0.5)
+ sass
RUBY VERSION
ruby 2.3.3p222
BUNDLED WITH
- 1.15.4
+ 2.0.1
From 0b195a99083b997ddfe152d583432cbd75b82af9 Mon Sep 17 00:00:00 2001
From: Robert Lord
Date: Sat, 1 Jun 2019 13:27:21 -0700
Subject: [PATCH 008/164] Update to bundler 2.0 in travis.yml
---
.travis.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 0d6d210d94a..9b52b6b18db 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,5 +6,9 @@ rvm:
- 2.3.3
- 2.4.0
+before_install:
+ - gem update --system
+ - gem install bundler
+
cache: bundler
script: bundle exec middleman build
From f81909ea6ee0696573f35d4c549bcb3e9a13eade Mon Sep 17 00:00:00 2001
From: Dan <48282179+dan-os@users.noreply.github.com>
Date: Thu, 16 May 2019 23:40:45 +0100
Subject: [PATCH 009/164] Update issue templates
---
.../start-here.md} | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
rename .github/{ISSUE_TEMPLATE.md => ISSUE_TEMPLATE/start-here.md} (81%)
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/start-here.md
similarity index 81%
rename from .github/ISSUE_TEMPLATE.md
rename to .github/ISSUE_TEMPLATE/start-here.md
index 9c25c1acce2..4199c901d58 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE/start-here.md
@@ -1,3 +1,12 @@
+---
+name: Start Here
+about: Help improve Slate!
+title: "✍️ TODO"
+labels: ''
+assignees: ''
+
+---
+
Operating system: ✍️ TODO
-Last upstream version (check `CHANGELOG.md` for the latest version): ✍️ TODO
+Last upstream commit (run `git log --author="Robert Lord" | head -n 1`): ✍️ TODO
Browser version(s): ✍️ TODO
Ruby version (run `ruby -v`): ✍️ TODO
From 36b7e4430d81ddfd34bf4ed5bc1f571382e1c206 Mon Sep 17 00:00:00 2001
From: Sam Gilman
Date: Sun, 2 Jun 2019 05:36:44 +0800
Subject: [PATCH 010/164] updated config.rb to activate asset_hash (#1076)
---
config.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/config.rb b/config.rb
index 24887979fea..b3ba23ed052 100644
--- a/config.rb
+++ b/config.rb
@@ -40,6 +40,7 @@
# Build Configuration
configure :build do
+ activate :asset_hash
# If you're having trouble with Middleman hanging, commenting
# out the following two lines has been known to help
activate :minify_css
From e7eb64785b52ed4d45a77210ac37adbb8fc691ce Mon Sep 17 00:00:00 2001
From: daniel-korbit
Date: Sun, 8 Sep 2019 04:21:17 +0900
Subject: [PATCH 011/164] change example link correctly (#1130)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 675aad33460..a73fdf8f648 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
-The example above was created with Slate. Check it out at lord.github.io/slate .
+The example above was created with Slate. Check it out at slatedocs.github.io/slate .
Features
------------
From 151c3034c1cc05c948d17389cfa13e345a187ae1 Mon Sep 17 00:00:00 2001
From: Arun
Date: Tue, 15 Oct 2019 00:27:23 +0530
Subject: [PATCH 012/164] Change default value of base fork in PR template
(#1137)
---
.github/PULL_REQUEST_TEMPLATE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index eebe789aa08..151e45d78cd 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,5 @@
\ No newline at end of file
From 894534b5d3830518a5b6142b26967a9bc5b39013 Mon Sep 17 00:00:00 2001
From: Gustavo Gawryszewski <318831+gawry@users.noreply.github.com>
Date: Mon, 14 Oct 2019 15:59:32 -0300
Subject: [PATCH 013/164] Updated README.md from lord/slate to slatedocs/slate
(#1140)
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index a73fdf8f648..04081e5aa3f 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Features
* **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 fork this repository 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](http://lord.github.io/slate).
+Getting started with Slate is super easy! Simply fork this repository 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
------------------------------
@@ -60,9 +60,9 @@ vagrant up
You can now see the docs at http://localhost:4567. Whoa! That was fast!
-Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/lord/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/lord/slate/wiki/Deploying-Slate).
+Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/slatedocs/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/slatedocs/slate/wiki/Deploying-Slate).
-If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/lord/slate/wiki/Docker).
+If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/slatedocs/slate/wiki/Docker).
### Note on JavaScript Runtime
@@ -83,14 +83,14 @@ Companies Using Slate
* [Parrot Drones](http://developer.parrot.com/docs/bebop/)
* [Scale](https://docs.scaleapi.com/)
-You can view more in [the list on the wiki](https://github.com/lord/slate/wiki/Slate-in-the-Wild).
+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 Spectrum community](https://spectrum.chat/slate)!
-Found a bug with upstream Slate? Go ahead and [submit an issue](https://github.com/lord/slate/issues). And, of course, feel free to submit pull requests with bug fixes or changes to the `dev` branch.
+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
--------------------
From b3a4f1f5c575940eb23e6c53dba7106caaf58f76 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 14 Oct 2019 16:04:23 -0300
Subject: [PATCH 014/164] Update url for travis badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 04081e5aa3f..d1e1768e2d9 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-
+
Slate helps you create beautiful, intelligent, responsive API documentation.
From bc5b66f9f8c728e3a6c59cd11b2699767a4d4dac Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 19 Oct 2019 04:40:44 -0300
Subject: [PATCH 015/164] [Security] Upgrade nokogiri to 1.10.4 (#1150)
---
Gemfile | 2 +-
Gemfile.lock | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Gemfile b/Gemfile
index a77f013adca..d6ec76e6ffa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,5 +8,5 @@ gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
gem 'rouge', '~> 2.0.5'
gem 'redcarpet', '~> 3.4.0'
-gem 'nokogiri', '~> 1.8.5'
+gem 'nokogiri', '~> 1.10.4'
gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index 142d13eeec8..15e3d633504 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -76,10 +76,10 @@ GEM
middleman-syntax (3.0.0)
middleman-core (>= 3.2)
rouge (~> 2.0)
- mini_portile2 (2.3.0)
+ mini_portile2 (2.4.0)
minitest (5.11.3)
- nokogiri (1.8.5)
- mini_portile2 (~> 2.3.0)
+ nokogiri (1.10.4)
+ mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
@@ -124,7 +124,7 @@ DEPENDENCIES
middleman-autoprefixer (~> 2.7)
middleman-sprockets (~> 4.1)
middleman-syntax (~> 3.0)
- nokogiri (~> 1.8.5)
+ nokogiri (~> 1.10.4)
redcarpet (~> 3.4.0)
rouge (~> 2.0.5)
sass
@@ -133,4 +133,4 @@ RUBY VERSION
ruby 2.3.3p222
BUNDLED WITH
- 2.0.1
+ 2.0.2
From 2019c63b839d7dc70c7258f0b52b368e95343f9a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 19 Oct 2019 04:56:11 -0300
Subject: [PATCH 016/164] Cut version 2.4.0
---
CHANGELOG.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 218f5caa99e..496939c105a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## Version 2.4.0
+
+*October 19, 2019*
+
+- Move repository from lord/slate to slatedocs/slate
+- Fix documentation to point at new repo link, thanks to [Arun](https://github.com/slash-arun), [Gustavo Gawryszewski](https://github.com/gawry), and [Daniel Korbit](https://github.com/danielkorbit)
+- Update `nokogiri` to 1.10.4
+- Update `ffi` in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jackmack](https://github.com/jakemack)
+- Update `rack` to 2.0.7 in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jackmack](https://github.com/jakemack)
+- Update middleman to `4.3` and relax constraints on middleman related gems, thanks to [jackmack](https://github.com/jakemack)
+- Add sass gem, thanks to [jackmack](https://github.com/jackmack)
+- Activate `asset_cache` in middleman to improve cacheability of static files, thanks to [Sam Gilman](https://github.com/thenengah)
+- Update to using bundler 2 for `Gemfile.lock`, thanks to [jackmack](https://github.com/jakemack)
+
## Version 2.3.1
*July 5, 2018*
From c51fa227cf8012d6e1d69b7091f7fa1d1e274e0b Mon Sep 17 00:00:00 2001
From: BigBlueHat
Date: Fri, 10 Jan 2020 09:27:41 -0500
Subject: [PATCH 017/164] Use the full Apache License 2.0 text in LICENSE
Per the Apache Software Foundation guidelines for applying the Apache License 2.0:
https://www.apache.org/foundation/license-faq.html#Apply-My-Software
> You should include a copy of the Apache License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file.
---
LICENSE | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 198 insertions(+), 10 deletions(-)
diff --git a/LICENSE b/LICENSE
index 5ceddf59f68..261eeb9e9f8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,13 +1,201 @@
-Copyright 2008-2013 Concur Technologies, Inc.
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
-Licensed under the Apache License, Version 2.0 (the "License"); you may
-not use this file except in compliance with the License. You may obtain
-a copy of the License at
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- http://www.apache.org/licenses/LICENSE-2.0
+ 1. Definitions.
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations
-under the License.
\ No newline at end of file
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
From 274949c002b5bae5385ff112cc0889de3a28ca11 Mon Sep 17 00:00:00 2001
From: Alex Mayer
Date: Tue, 4 Feb 2020 08:32:50 -0500
Subject: [PATCH 018/164] Update GitHub Links on example generated site (#1196)
---
source/index.html.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/index.html.md b/source/index.html.md
index e101e66ef94..27cf28aa991 100644
--- a/source/index.html.md
+++ b/source/index.html.md
@@ -9,7 +9,7 @@ language_tabs: # must be one of https://git.io/vQNgJ
toc_footers:
- Sign Up for a Developer Key
- - Documentation Powered by Slate
+ - Documentation Powered by Slate
includes:
- errors
@@ -23,7 +23,7 @@ Welcome to the Kittn API! You can use our API to access Kittn API endpoints, whi
We have language bindings in Shell, Ruby, Python, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
-This example API documentation page was created with [Slate](https://github.com/lord/slate). Feel free to edit it and use it as a base for your own API's documentation.
+This example API documentation page was created with [Slate](https://github.com/slatedocs/slate). Feel free to edit it and use it as a base for your own API's documentation.
# Authentication
From 1be12d20273e22f77f1459e48dce38c99204091d Mon Sep 17 00:00:00 2001
From: Brad Thurber
Date: Thu, 31 Oct 2019 08:16:12 -0400
Subject: [PATCH 019/164] Update Vagrantfile to Ubuntu 18.04 (#1158)
* Slate 2.4 breaks vagrant
* Update Vagrantfile
* Update Vagrantfile
---
Vagrantfile | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Vagrantfile b/Vagrantfile
index 6f2444e2133..0ad63944257 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,5 +1,5 @@
Vagrant.configure(2) do |config|
- config.vm.box = "ubuntu/trusty64"
+ config.vm.box = "ubuntu/bionic64"
config.vm.network :forwarded_port, guest: 4567, host: 4567
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
@@ -8,12 +8,11 @@ Vagrant.configure(2) do |config|
config.vm.provision "bootstrap",
type: "shell",
inline: <<-SHELL
- sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
- sudo apt-get install -yq ruby2.4 ruby2.4-dev
+ sudo apt-get install -yq ruby ruby-dev
sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
sudo apt-get autoremove -yq
- gem2.4 install --no-ri --no-rdoc bundler
+ gem install --no-ri --no-rdoc bundler
SHELL
# add the local user git config to the vm
From 73e45c537c9cbabd09256626b6ac691164b21be6 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 31 Oct 2019 09:20:14 -0300
Subject: [PATCH 020/164] Ignore generated log file from running Vagrant
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index 10501583560..1d5d08dd245 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@ build/
_yardoc
doc/
.idea/
+
+# Vagrant artifacts
+ubuntu-*-console.log
From 391f3d82065f2ec0ed762d86dc0285fe825a8755 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 31 Oct 2019 12:05:53 -0300
Subject: [PATCH 021/164] Update tested versions of ruby on Travis (#1160)
---
.travis.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 9b52b6b18db..f51c859e4bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,14 @@
-sudo: false
-
language: ruby
-
rvm:
- - 2.3.3
- - 2.4.0
+ - 2.3
+ - 2.4
+ - 2.5
+ - 2.6
+
+cache: bundler
before_install:
- gem update --system
- gem install bundler
-cache: bundler
script: bundle exec middleman build
From 252a48b31e7d34b4099b590bead3ea021a65cff6 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 5 Nov 2019 10:39:26 -0300
Subject: [PATCH 022/164] Fully parse arguments first in deploy (#1153)
* Do not build sources when using --help
* Use variables for build/push if statements
* fix error message
---
deploy.sh | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/deploy.sh b/deploy.sh
index f122ba7ce62..f872d23f713 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -36,7 +36,7 @@ parse_args() {
while : ; do
if [[ $1 = "-h" || $1 = "--help" ]]; then
echo "$help_message"
- return 0
+ exit 0
elif [[ $1 = "-v" || $1 = "--verbose" ]]; then
verbose=true
shift
@@ -49,11 +49,22 @@ parse_args() {
elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then
GIT_DEPLOY_APPEND_HASH=false
shift
+ elif [[ $1 = "--source-only" ]]; then
+ source_only=true
+ shift
+ elif [[ $1 = "--push-only" ]]; then
+ push_only=true
+ shift
else
break
fi
done
+ if [ ${source_only} ] && [ ${push_only} ]; then
+ >&2 echo "You can only specify one of --source-only or --push-only"
+ 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.
@@ -73,8 +84,6 @@ parse_args() {
}
main() {
- parse_args "$@"
-
enable_expanded_output
if ! git diff --exit-code --quiet --cached; then
@@ -205,9 +214,11 @@ sanitize() {
"$@" 2> >(filter 1>&2) | filter
}
-if [[ $1 = --source-only ]]; then
+parse_args "$@"
+
+if [[ ${source_only} ]]; then
run_build
-elif [[ $1 = --push-only ]]; then
+elif [[ ${push_only} ]]; then
main "$@"
else
run_build
From a4854b03a4e4df8d016c2144fbcc831af0b6b8eb Mon Sep 17 00:00:00 2001
From: Robert Lord
Date: Tue, 3 Dec 2019 10:14:59 -0500
Subject: [PATCH 023/164] List maintainers in README (#1164)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d1e1768e2d9..fa3c23487c0 100644
--- a/README.md
+++ b/README.md
@@ -95,7 +95,7 @@ Found a bug with upstream Slate? Go ahead and [submit an issue](https://github.c
Contributors
--------------------
-Slate was built by [Robert Lord](https://lord.io) while interning at [TripIt](https://www.tripit.com/).
+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:
From 375af3c6cc9945e4305359c59981e4b8dbf77c84 Mon Sep 17 00:00:00 2001
From: Fernando Aguilar
Date: Wed, 19 Feb 2020 10:00:58 -0800
Subject: [PATCH 024/164] Install nodejs in Vagrantfile (#1202)
Co-authored-by: Matthew Peveler
---
Vagrantfile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Vagrantfile b/Vagrantfile
index 0ad63944257..4166fb6ba24 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -8,6 +8,9 @@ Vagrant.configure(2) do |config|
config.vm.provision "bootstrap",
type: "shell",
inline: <<-SHELL
+ # add nodejs v12 repository
+ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
+
sudo apt-get update
sudo apt-get install -yq ruby ruby-dev
sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
From d11eb1f13c50428c0780b55b4fc84dffe4820e8e Mon Sep 17 00:00:00 2001
From: KaliArch <18329903316@163.com>
Date: Thu, 2 Apr 2020 21:27:33 +0800
Subject: [PATCH 025/164] add Dockerfile (#1124)
* add Dockerfile
add Dockerfile
* Update Dockerfile
Co-authored-by: Matthew Peveler
---
Dockerfile | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000000..5a9526fd42f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM ruby:2.5-alpine
+
+RUN apk --no-cache add \
+ g++ \
+ gcc \
+ libc-dev \
+ make \
+ nodejs \
+ && gem install bundler
+
+WORKDIR /srv/slate
+
+COPY . /srv/slate
+
+RUN bundle install
+
+VOLUME /srv/slate/source
+
+EXPOSE 4567
+
+CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
From 7cecafe5ff7b1dcb8ae18a9903ad0bf0eb0ff387 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 2 Apr 2020 09:29:14 -0400
Subject: [PATCH 026/164] add instructions to running docker to README
Signed-off-by: Matthew Peveler
---
.dockerignore | 2 ++
README.md | 4 ++++
2 files changed, 6 insertions(+)
create mode 100644 .dockerignore
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000000..1cf061121fc
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+build/
+.github/
diff --git a/README.md b/README.md
index fa3c23487c0..0166dc1a876 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,10 @@ bundle exec middleman server
# OR run this to run with vagrant
vagrant up
+
+# OR run this to run with docker
+docker build . -t slate:latest # this only needs to be run once
+docker run -p 4567:4567 -v $(pwd)/source:/srv/slate/source slate:latest
```
You can now see the docs at http://localhost:4567. Whoa! That was fast!
From a8eb386690684e2296d2e64ba099c121338d82d0 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 2 Apr 2020 20:53:30 -0400
Subject: [PATCH 027/164] Remove line in README about Docker wiki
Signed-off-by: Matthew Peveler
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index 0166dc1a876..e695302cf19 100644
--- a/README.md
+++ b/README.md
@@ -66,8 +66,6 @@ You can now see the docs at http://localhost:4567. Whoa! That was fast!
Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/slatedocs/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/slatedocs/slate/wiki/Deploying-Slate).
-If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/slatedocs/slate/wiki/Docker).
-
### Note on JavaScript Runtime
For those who don't have JavaScript runtime or are experiencing JavaScript runtime issues with ExecJS, it is recommended to add the [rubyracer gem](https://github.com/cowboyd/therubyracer) to your gemfile and run `bundle` again.
From f31c73831ec86e77606e1754886d3ea339c73184 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Fri, 3 Apr 2020 16:25:19 -0400
Subject: [PATCH 028/164] update middleman dep to 4.3.6
Signed-off-by: Matthew Peveler
---
Gemfile.lock | 52 +++++++++++++++++++++++++---------------------------
1 file changed, 25 insertions(+), 27 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 15e3d633504..68a69be694d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -6,24 +6,24 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- addressable (2.6.0)
- public_suffix (>= 2.0.2, < 4.0)
+ addressable (2.7.0)
+ public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.15.0)
+ backports (3.17.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.1.5)
+ concurrent-ruby (1.1.6)
contracts (0.13.0)
- dotenv (2.7.2)
+ dotenv (2.7.5)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
- fastimage (2.1.5)
- ffi (1.11.1)
- haml (5.1.1)
+ fastimage (2.1.7)
+ ffi (1.12.2)
+ haml (5.1.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
@@ -35,19 +35,19 @@ GEM
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- memoist (0.16.0)
- middleman (4.3.4)
+ memoist (0.16.2)
+ middleman (4.3.6)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (~> 1.2)
- middleman-cli (= 4.3.4)
- middleman-core (= 4.3.4)
+ middleman-cli (= 4.3.6)
+ middleman-core (= 4.3.6)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.4)
+ middleman-cli (4.3.6)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.4)
+ middleman-core (4.3.6)
activesupport (>= 4.2, < 5.1)
addressable (~> 2.3)
backports (~> 3.6)
@@ -77,7 +77,7 @@ GEM
middleman-core (>= 3.2)
rouge (~> 2.0)
mini_portile2 (2.4.0)
- minitest (5.11.3)
+ minitest (5.14.0)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
@@ -86,12 +86,11 @@ GEM
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
- parallel (1.17.0)
- public_suffix (3.1.0)
- rack (2.0.7)
- rake (12.3.2)
+ parallel (1.19.1)
+ public_suffix (4.0.3)
+ rack (2.2.2)
rb-fsevent (0.10.3)
- rb-inotify (0.10.0)
+ rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.4.0)
rouge (2.0.7)
@@ -100,18 +99,17 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sassc (2.0.1)
+ sassc (2.2.1)
ffi (~> 1.9)
- rake
servolux (0.13.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
- temple (0.8.1)
- thor (0.20.3)
+ temple (0.8.2)
+ thor (1.0.1)
thread_safe (0.3.6)
- tilt (2.0.9)
- tzinfo (1.2.5)
+ tilt (2.0.10)
+ tzinfo (1.2.7)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
@@ -133,4 +131,4 @@ RUBY VERSION
ruby 2.3.3p222
BUNDLED WITH
- 2.0.2
+ 2.1.4
From 88b28d4d6f684d3940f208f76481ccc23f391e08 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Fri, 3 Apr 2020 16:34:14 -0400
Subject: [PATCH 029/164] update middleman-syntax and rouge to ~>3.2
Signed-off-by: Matthew Peveler
---
Gemfile | 4 ++--
Gemfile.lock | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Gemfile b/Gemfile
index d6ec76e6ffa..80d521548e2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,10 +3,10 @@ source 'https://rubygems.org'
# Middleman
gem 'middleman', '~>4.3'
-gem 'middleman-syntax', '~> 3.0'
+gem 'middleman-syntax', '~> 3.2'
gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
-gem 'rouge', '~> 2.0.5'
+gem 'rouge', '~> 3.2'
gem 'redcarpet', '~> 3.4.0'
gem 'nokogiri', '~> 1.10.4'
gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index 68a69be694d..08acc767875 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -73,9 +73,9 @@ GEM
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
- middleman-syntax (3.0.0)
+ middleman-syntax (3.2.0)
middleman-core (>= 3.2)
- rouge (~> 2.0)
+ rouge (~> 3.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
nokogiri (1.10.4)
@@ -93,7 +93,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.4.0)
- rouge (2.0.7)
+ rouge (3.17.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
@@ -121,10 +121,10 @@ DEPENDENCIES
middleman (~> 4.3)
middleman-autoprefixer (~> 2.7)
middleman-sprockets (~> 4.1)
- middleman-syntax (~> 3.0)
+ middleman-syntax (~> 3.2)
nokogiri (~> 1.10.4)
redcarpet (~> 3.4.0)
- rouge (~> 2.0.5)
+ rouge (~> 3.2)
sass
RUBY VERSION
From 5b25b04c343cd4fe059e519876c016dc2803bd94 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Fri, 8 May 2020 19:31:43 -0400
Subject: [PATCH 030/164] update nokogiri to ~> 1.10.8
Signed-off-by: Matthew Peveler
---
Gemfile | 2 +-
Gemfile.lock | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 80d521548e2..95029e39a5c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,5 +8,5 @@ gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
gem 'rouge', '~> 3.2'
gem 'redcarpet', '~> 3.4.0'
-gem 'nokogiri', '~> 1.10.4'
+gem 'nokogiri', '~> 1.10.8'
gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index 08acc767875..d6d48a62fd2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -78,7 +78,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
- nokogiri (1.10.4)
+ nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
@@ -122,7 +122,7 @@ DEPENDENCIES
middleman-autoprefixer (~> 2.7)
middleman-sprockets (~> 4.1)
middleman-syntax (~> 3.2)
- nokogiri (~> 1.10.4)
+ nokogiri (~> 1.10.8)
redcarpet (~> 3.4.0)
rouge (~> 3.2)
sass
From 4f5b12fe86e49345c42b5fafb6424dce96613766 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Fri, 8 May 2020 20:12:50 -0400
Subject: [PATCH 031/164] add 2.5.0 release to changelog
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 496939c105a..8d318cb8558 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## Version 2.5.0
+
+*May 8, 2020*
+
+* __[security]__ update nokogiri to ~> 1.10.8
+* Update links in example docs to https://github.com/slatedocs/slate from https://github.com/lord/slate
+* Update LICENSE to include full Apache 2.0 text
+* Test slate against Ruby 2.5 and 2.6 on Travis-CI
+* Update Vagrantfile to use Ubuntu 18.04 (thanks @bradthurber)
+* Parse arguments and flags for deploy.sh on script start, instead of potentially after building source files
+* Install nodejs inside Vagrantfile (thanks @fernandoaguilar)
+* Add Dockerfile for running slate (thanks @redhatxl)
+* update middleman-syntax and rouge to ~>3.2
+* update middleman to 4.3.6
+
## Version 2.4.0
*October 19, 2019*
From 33c4acc09972dca0a58d4f6c5c18f4c19d113253 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 12 May 2020 18:45:41 +0300
Subject: [PATCH 032/164] update screenshot in README with new rouge styling
(#1228)
Signed-off-by: Matthew Peveler
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index e695302cf19..a12f37c91a1 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-
+
Slate helps you create beautiful, intelligent, responsive API documentation.
-
+
The example above was created with Slate. Check it out at slatedocs.github.io/slate .
From aace071f89993ccbaf3809273bdeaf199c0ebf90 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 12 May 2020 15:33:23 +0300
Subject: [PATCH 033/164] fix bc style breaks from rouge 3.x (#1226)
* fix bc style breaks from rouge 3.x
Signed-off-by: Matthew Peveler
* use bright_pink for Name::Label
Signed-off-by: Matthew Peveler
---
config.rb | 1 +
lib/monokai_sublime_slate.rb | 95 ++++++++++++++++++++++++++++++
source/layouts/layout.erb | 2 +-
source/stylesheets/screen.css.scss | 4 ++
4 files changed, 101 insertions(+), 1 deletion(-)
create mode 100644 lib/monokai_sublime_slate.rb
diff --git a/config.rb b/config.rb
index b3ba23ed052..22e956dd8df 100644
--- a/config.rb
+++ b/config.rb
@@ -23,6 +23,7 @@
# Activate the syntax highlighter
activate :syntax
ready do
+ require './lib/monokai_sublime_slate.rb'
require './lib/multilang.rb'
end
diff --git a/lib/monokai_sublime_slate.rb b/lib/monokai_sublime_slate.rb
new file mode 100644
index 00000000000..cd2de33172d
--- /dev/null
+++ b/lib/monokai_sublime_slate.rb
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*- #
+# frozen_string_literal: true
+
+# this is based on https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/themes/monokai_sublime.rb
+# but without the added background, and changed styling for JSON keys to be soft_yellow instead of white
+
+module Rouge
+ module Themes
+ class MonokaiSublimeSlate < CSSTheme
+ name 'monokai.sublime.slate'
+
+ palette :black => '#000000'
+ palette :bright_green => '#a6e22e'
+ palette :bright_pink => '#f92672'
+ palette :carmine => '#960050'
+ palette :dark => '#49483e'
+ palette :dark_grey => '#888888'
+ palette :dark_red => '#aa0000'
+ palette :dimgrey => '#75715e'
+ palette :emperor => '#555555'
+ palette :grey => '#999999'
+ palette :light_grey => '#aaaaaa'
+ palette :light_violet => '#ae81ff'
+ palette :soft_cyan => '#66d9ef'
+ palette :soft_yellow => '#e6db74'
+ palette :very_dark => '#1e0010'
+ palette :whitish => '#f8f8f2'
+ palette :orange => '#f6aa11'
+ palette :white => '#ffffff'
+
+ style Generic::Heading, :fg => :grey
+ style Literal::String::Regex, :fg => :orange
+ style Generic::Output, :fg => :dark_grey
+ style Generic::Prompt, :fg => :emperor
+ style Generic::Strong, :bold => false
+ style Generic::Subheading, :fg => :light_grey
+ style Name::Builtin, :fg => :orange
+ style Comment::Multiline,
+ Comment::Preproc,
+ Comment::Single,
+ Comment::Special,
+ Comment, :fg => :dimgrey
+ style Error,
+ Generic::Error,
+ Generic::Traceback, :fg => :carmine
+ style Generic::Deleted,
+ Generic::Inserted,
+ Generic::Emph, :fg => :dark
+ style Keyword::Constant,
+ Keyword::Declaration,
+ Keyword::Reserved,
+ Name::Constant,
+ Keyword::Type, :fg => :soft_cyan
+ style Literal::Number::Float,
+ Literal::Number::Hex,
+ Literal::Number::Integer::Long,
+ Literal::Number::Integer,
+ Literal::Number::Oct,
+ Literal::Number,
+ Literal::String::Char,
+ Literal::String::Escape,
+ Literal::String::Symbol, :fg => :light_violet
+ style Literal::String::Doc,
+ Literal::String::Double,
+ Literal::String::Backtick,
+ Literal::String::Heredoc,
+ Literal::String::Interpol,
+ Literal::String::Other,
+ Literal::String::Single,
+ Literal::String, :fg => :soft_yellow
+ style Name::Attribute,
+ Name::Class,
+ Name::Decorator,
+ Name::Exception,
+ Name::Function, :fg => :bright_green
+ style Name::Variable::Class,
+ Name::Namespace,
+ Name::Entity,
+ Name::Builtin::Pseudo,
+ Name::Variable::Global,
+ Name::Variable::Instance,
+ Name::Variable,
+ Text::Whitespace,
+ Text,
+ Name, :fg => :white
+ style Name::Label, :fg => :bright_pink
+ style Operator::Word,
+ Name::Tag,
+ Keyword,
+ Keyword::Namespace,
+ Keyword::Pseudo,
+ Operator, :fg => :bright_pink
+ end
+ end
+ end
diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb
index 29b80d72a32..14537281a17 100644
--- a/source/layouts/layout.erb
+++ b/source/layouts/layout.erb
@@ -32,7 +32,7 @@ under the License.
<%= current_page.data.title || "API Documentation" %>
<%= stylesheet_link_tag :screen, media: :screen %>
<%= stylesheet_link_tag :print, media: :print %>
diff --git a/source/stylesheets/screen.css.scss b/source/stylesheets/screen.css.scss
index 83da68cca2c..ed23b312215 100644
--- a/source/stylesheets/screen.css.scss
+++ b/source/stylesheets/screen.css.scss
@@ -511,6 +511,10 @@ html, body {
// This is all the stuff that appears in the right half of the page
.content {
+ &>div.highlight {
+ clear:none;
+ }
+
pre, blockquote {
background-color: $code-bg;
color: #fff;
From 589df5fd21eaeee25456e2edabec433c5a1d61d7 Mon Sep 17 00:00:00 2001
From: lord
Date: Sat, 16 May 2020 09:38:35 -0700
Subject: [PATCH 034/164] Change instructions to use templates instead of
forking (#1234)
---
README.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index a12f37c91a1..7d5e450233a 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Features
* **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 fork this repository 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 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
------------------------------
@@ -44,10 +44,11 @@ You're going to need:
### Getting Set Up
-1. Fork this repository on GitHub.
-2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
-3. `cd slate`
-4. Initialize and start Slate. You can either do this locally, or with Vagrant:
+1. Press the green "use this template" button at the top of this page.
+2. Follow the instructions to create a new copy of the Slate repository.
+3. Clone your repository (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
+4. `cd slate`
+5. Initialize and start Slate. You can either do this locally, or with Vagrant:
```shell
# either run this to run locally
From 8c329dcf2a6bf44a64ce06bffb7827846f1b09c9 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 18 May 2020 07:16:00 +0300
Subject: [PATCH 035/164] disable asset hash for woff and woff2 files out of
the box (#1231)
Signed-off-by: Matthew Peveler
---
config.rb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/config.rb b/config.rb
index 22e956dd8df..6f8b677f617 100644
--- a/config.rb
+++ b/config.rb
@@ -41,13 +41,16 @@
# Build Configuration
configure :build do
- activate :asset_hash
+ # We do want to hash woff and woff2 as there's a bug where woff2 will use
+ # woff asset hash which breaks things. Trying to use a combination of ignore and
+ # rewrite_ignore does not work as it conflicts weirdly with relative_assets. Disabling
+ # the .woff2 extension only does not work as .woff will still activate it so have to
+ # have both. See https://github.com/slatedocs/slate/issues/1171 for more details.
+ activate :asset_hash, :exts => app.config[:asset_extensions] - %w[.woff .woff2]
# If you're having trouble with Middleman hanging, commenting
# out the following two lines has been known to help
activate :minify_css
activate :minify_javascript
- # activate :relative_assets
- # activate :asset_hash
# activate :gzip
end
From 8bea1238ab3eeedbfb869bf798f38db4c0423b2a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 18 May 2020 07:16:10 +0300
Subject: [PATCH 036/164] switch to using debian for docker base for bash
(#1233)
Signed-off-by: Matthew Peveler
---
Dockerfile | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 5a9526fd42f..33b80ca4216 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,21 +1,20 @@
-FROM ruby:2.5-alpine
-
-RUN apk --no-cache add \
- g++ \
- gcc \
- libc-dev \
- make \
- nodejs \
- && gem install bundler
+FROM ruby:2.6-slim
WORKDIR /srv/slate
-COPY . /srv/slate
-
-RUN bundle install
-
VOLUME /srv/slate/source
-
EXPOSE 4567
+COPY . /srv/slate
+
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends \
+ build-essential \
+ nodejs \
+ && gem install bundler \
+ && bundle install \
+ && apt-get remove -y build-essential \
+ && apt-get autoremove -y \
+ && rm -rf /var/lib/apt/lists/*
+
CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
From 3582930885fe0e4641f542281da7aeee32d0594f Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 19 May 2020 16:51:24 -0400
Subject: [PATCH 037/164] update sassc to 2.3.0 in Gemfile.lock
Signed-off-by: Matthew Peveler
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index d6d48a62fd2..76bafa3044d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -99,7 +99,7 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sassc (2.2.1)
+ sassc (2.3.0)
ffi (~> 1.9)
servolux (0.13.0)
sprockets (3.7.2)
From f0e8682e78d8a142f14f9c4336aab8aab0596a95 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 19 May 2020 23:52:20 +0300
Subject: [PATCH 038/164] v2.6.0 release
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d318cb8558..493b25f0c41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## Version 2.6.0
+
+*May 18, 2020*
+
+__Note__: 2.5.0 was "pulled" due to a breaking bug discovered after release. It is recommended to skip it, and move straight to 2.6.0.
+
+* Fix large whitespace gap in middle column for sections with codeblocks
+* Fix highlighted code elements having a different background than rest of code block
+* Change JSON keys to have a different font color than their values
+* Disable asset hashing for woff and woff2 elements due to middleman bug breaking woff2 asset hashing in general
+* Move Dockerfile to Debian from Alpine
+* Converted repo to a [GitHub template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-template-repository)
+* Update sassc to 2.3.0 in Gemfile.lock
+
## Version 2.5.0
*May 8, 2020*
From c7c9eaa27fdc69b9bcbc64bda8f6ad7f580fa327 Mon Sep 17 00:00:00 2001
From: lord
Date: Thu, 21 May 2020 15:21:14 -0700
Subject: [PATCH 039/164] Update bug report templates, remove links to Spectrum
(#1239)
---
.github/ISSUE_TEMPLATE/bug.md | 22 ++++++++++++++++++++++
.github/ISSUE_TEMPLATE/config.yml | 5 +++++
.github/ISSUE_TEMPLATE/start-here.md | 27 ---------------------------
README.md | 2 +-
4 files changed, 28 insertions(+), 28 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/bug.md
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
delete mode 100644 .github/ISSUE_TEMPLATE/start-here.md
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
new file mode 100644
index 00000000000..25fcdb1d2e0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -0,0 +1,22 @@
+---
+name: Report a Bug
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Bug Description**
+A clear and concise description of what the bug is and how to reproduce it.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Browser (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Last upstream Slate commit (run `git log --author="Robert Lord" | head -n 1`):**
+Put the commit hash here
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000000..16f4beed616
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Questions, Ideas, Discussions
+ url: https://github.com/slatedocs/slate/discussions
+ about: Ask and answer questions, and propose new features.
diff --git a/.github/ISSUE_TEMPLATE/start-here.md b/.github/ISSUE_TEMPLATE/start-here.md
deleted file mode 100644
index 4199c901d58..00000000000
--- a/.github/ISSUE_TEMPLATE/start-here.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: Start Here
-about: Help improve Slate!
-title: "✍️ TODO"
-labels: ''
-assignees: ''
-
----
-
- https://spectrum.chat/slate <-
-
-If you've found a bug with Slate upstream that you're still encountering even in a lightly modified Slate, you're in the right place! Please fill out the form below with the issue you're having and we'll take a look. :)
--->
-
-Operating system: ✍️ TODO
-Last upstream commit (run `git log --author="Robert Lord" | head -n 1`): ✍️ TODO
-Browser version(s): ✍️ TODO
-Ruby version (run `ruby -v`): ✍️ TODO
-
----
-
-✍️ TODO write your issue here
diff --git a/README.md b/README.md
index 7d5e450233a..57b3ffa0842 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,7 @@ You can view more in [the list on the wiki](https://github.com/slatedocs/slate/w
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 Spectrum community](https://spectrum.chat/slate)!
+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.
From ce2c03444331e863c39ec3ac4afdef5234e94a7a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 23 May 2020 17:29:31 +0300
Subject: [PATCH 040/164] Replace travis with github actions (#1240)
Signed-off-by: Matthew Peveler
---
.github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++
.github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++
.travis.yml | 14 --------------
README.md | 2 +-
4 files changed, 69 insertions(+), 15 deletions(-)
create mode 100644 .github/workflows/build.yml
create mode 100644 .github/workflows/deploy.yml
delete mode 100644 .travis.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000000..3d55c61d605
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,36 @@
+name: Build
+
+on:
+ push:
+ branches: [ '*' ]
+ pull_request:
+ branches: [ '*' ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby-version }}
+
+ - uses: actions/cache@v1
+ with:
+ path: vendor/bundle
+ key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+
+ # necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache
+ # can remove once ruby 2.3 is no longer supported
+ - run: gem update --system
+
+ - run: bundle config set deployment 'true'
+ - run: bundle install
+
+ - run: bundle exec middleman build
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 00000000000..cc64ac35ea5
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,32 @@
+name: Deploy
+
+on:
+ push:
+ branches: [ 'master' ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ env:
+ ruby-version: 2.5
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ env.ruby-version }}
+
+ - uses: actions/cache@v1
+ with:
+ path: vendor/bundle
+ key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+
+ - run: bundle config set deployment 'true'
+ - run: bundle install
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./build
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index f51c859e4bb..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: ruby
-rvm:
- - 2.3
- - 2.4
- - 2.5
- - 2.6
-
-cache: bundler
-
-before_install:
- - gem update --system
- - gem install bundler
-
-script: bundle exec middleman build
diff --git a/README.md b/README.md
index 57b3ffa0842..fb6dd0ed6e6 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-
+
Slate helps you create beautiful, intelligent, responsive API documentation.
From 215e6ee1a630039da8b53b1546e624c388a0f39e Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 23 May 2020 10:36:58 -0400
Subject: [PATCH 041/164] add missing middleman build step to deploy gh
workflow
Signed-off-by: Matthew Peveler
---
.github/workflows/deploy.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index cc64ac35ea5..7eff1f14ea4 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -5,7 +5,7 @@ on:
branches: [ 'master' ]
jobs:
- test:
+ deploy:
runs-on: ubuntu-latest
env:
ruby-version: 2.5
@@ -25,6 +25,8 @@ jobs:
- run: bundle config set deployment 'true'
- run: bundle install
+ - run: bundle exec middleman build
+
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
From 887f6bbf1018b47e9dc225cf326f0a727f16cff8 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Fri, 29 May 2020 00:48:54 +0300
Subject: [PATCH 042/164] Replace README Getting Started with links to wiki
(#1246)
---
README.md | 41 ++++++-----------------------------------
1 file changed, 6 insertions(+), 35 deletions(-)
diff --git a/README.md b/README.md
index fb6dd0ed6e6..b5f95f0651e 100644
--- a/README.md
+++ b/README.md
@@ -34,42 +34,13 @@ Getting started with Slate is super easy! Simply press the green "use this templ
Getting Started with Slate
------------------------------
-### Prerequisites
+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/slate/wiki).
-You're going to need:
-
- - **Linux or macOS** — Windows may work, but is unsupported.
- - **Ruby, version 2.3.1 or newer**
- - **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal.
-
-### Getting Set Up
-
-1. Press the green "use this template" button at the top of this page.
-2. Follow the instructions to create a new copy of the Slate repository.
-3. Clone your repository (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
-4. `cd slate`
-5. Initialize and start Slate. You can either do this locally, or with Vagrant:
-
-```shell
-# either run this to run locally
-bundle install
-bundle exec middleman server
-
-# OR run this to run with vagrant
-vagrant up
-
-# OR run this to run with docker
-docker build . -t slate:latest # this only needs to be run once
-docker run -p 4567:4567 -v $(pwd)/source:/srv/slate/source slate:latest
-```
-
-You can now see the docs at http://localhost:4567. Whoa! That was fast!
-
-Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/slatedocs/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/slatedocs/slate/wiki/Deploying-Slate).
-
-### Note on JavaScript Runtime
-
-For those who don't have JavaScript runtime or are experiencing JavaScript runtime issues with ExecJS, it is recommended to add the [rubyracer gem](https://github.com/cowboyd/therubyracer) to your gemfile and run `bundle` again.
+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
---------------------------------
From fb25af567197a8a65dfef6d853916013856e1eca Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 28 May 2020 17:52:02 -0400
Subject: [PATCH 043/164] Bump middleman from 4.3.6 to 4.3.7 (#1247)
Bumps [middleman](https://github.com/middleman/middleman) from 4.3.6 to 4.3.7.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Changelog](https://github.com/middleman/middleman/blob/v4.3.7/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman/compare/v4.3.6...v4.3.7)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 76bafa3044d..b3c7f116a3f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.0.7.2)
+ activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -10,7 +10,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.17.0)
+ backports (3.17.2)
coffee-script (2.4.1)
coffee-script-source
execjs
@@ -36,19 +36,19 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.6)
+ middleman (4.3.7)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (~> 1.2)
- middleman-cli (= 4.3.6)
- middleman-core (= 4.3.6)
+ middleman-cli (= 4.3.7)
+ middleman-core (= 4.3.7)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.6)
+ middleman-cli (4.3.7)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.6)
- activesupport (>= 4.2, < 5.1)
+ middleman-core (4.3.7)
+ activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
backports (~> 3.6)
bundler
@@ -77,7 +77,7 @@ GEM
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.4.0)
- minitest (5.14.0)
+ minitest (5.14.1)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
@@ -87,9 +87,9 @@ GEM
padrino-support (0.13.3.4)
activesupport (>= 3.1)
parallel (1.19.1)
- public_suffix (4.0.3)
+ public_suffix (4.0.5)
rack (2.2.2)
- rb-fsevent (0.10.3)
+ rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.4.0)
From 595b532832b1487dae6198e0ffcb35b8ba96fd89 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 30 May 2020 21:29:38 +0300
Subject: [PATCH 044/164] cut v2.6.1 release (#1249)
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 493b25f0c41..2ef19cb3b0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## Version 2.6.1
+
+*May 30, 2020*
+
+* __[security]__ update child dependency activesupport in Gemfile.lock to 5.4.2.3
+* Update Middleman in Gemfile.lock to 4.3.7
+* Replace Travis-CI with GitHub actions for continuous integration
+* Replace Spectrum with GitHub discussions
+
## Version 2.6.0
*May 18, 2020*
From 4df1048d4d392f4e6c9234b4334d49ad6af62244 Mon Sep 17 00:00:00 2001
From: Ritesh Kumar
Date: Mon, 1 Jun 2020 19:53:29 +0530
Subject: [PATCH 045/164] Fix broken "Getting Started" link in README (#1251)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b5f95f0651e..d052a1139da 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ Getting started with Slate is super easy! Simply press the green "use this templ
Getting Started with Slate
------------------------------
-To get started with Slate, please check out the Getting Started](https://github.com/slatedocs/slate/wiki#getting-started)
+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/slate/wiki).
We support running Slate in three different ways:
From fc7612cccacfdb9b15ff7e0ad57e479ae10009eb Mon Sep 17 00:00:00 2001
From: Simon Marcus
Date: Wed, 3 Jun 2020 23:11:21 -0400
Subject: [PATCH 046/164] Fix link to wiki in README (#1253)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d052a1139da..5920785ee37 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ 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/slate/wiki).
+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)
From 297fa7ce4475d91a3327ffdfa07908f886478ce7 Mon Sep 17 00:00:00 2001
From: lord
Date: Sat, 20 Jun 2020 12:37:55 -0700
Subject: [PATCH 047/164] master -> main (#1264)
---
README.md | 6 +++---
deploy.sh | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 5920785ee37..e4d014e4214 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-
+
-
+
Slate helps you create beautiful, intelligent, responsive API documentation.
-
+
The example above was created with Slate. Check it out at slatedocs.github.io/slate .
diff --git a/deploy.sh b/deploy.sh
index f872d23f713..9dbd7db9c72 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -154,7 +154,7 @@ incremental_deploy() {
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 master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2
+ 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
From 7c288d9756c52e3f4a2afbf803fce84740a5db37 Mon Sep 17 00:00:00 2001
From: lord
Date: Sat, 20 Jun 2020 12:45:22 -0700
Subject: [PATCH 048/164] Update deploy.yml (#1265)
master -> main branch
---
.github/workflows/deploy.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 7eff1f14ea4..8df9d720a38 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -2,7 +2,7 @@ name: Deploy
on:
push:
- branches: [ 'master' ]
+ branches: [ 'main' ]
jobs:
deploy:
From 933b1ae3e929739ae34589a6f5d0ab2fccd257bd Mon Sep 17 00:00:00 2001
From: Mike Ralphson
Date: Sun, 21 Jun 2020 18:02:09 +0100
Subject: [PATCH 049/164] Remove outdated special thanks section: README.md
(#1267)
Fixes #1243
---
README.md | 8 --------
1 file changed, 8 deletions(-)
diff --git a/README.md b/README.md
index e4d014e4214..7d15f8646eb 100644
--- a/README.md
+++ b/README.md
@@ -79,11 +79,3 @@ Thanks to the following people who have submitted major pull requests:
- [@cvkef](https://github.com/cvkef)
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
-
-Special Thanks
---------------------
-- [Middleman](https://github.com/middleman/middleman)
-- [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js)
-- [middleman-syntax](https://github.com/middleman/middleman-syntax)
-- [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages)
-- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
From 1b78587ff1a0efe397f8421d39fe89cf51d20731 Mon Sep 17 00:00:00 2001
From: jakemack
Date: Mon, 8 Jun 2020 16:54:58 -0700
Subject: [PATCH 050/164] Fix username typo in changelog (#1256)
Correct Github username to jakemack from jackmack
---
CHANGELOG.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ef19cb3b0c..8b6e1833ee0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,12 +45,12 @@ __Note__: 2.5.0 was "pulled" due to a breaking bug discovered after release. It
- Move repository from lord/slate to slatedocs/slate
- Fix documentation to point at new repo link, thanks to [Arun](https://github.com/slash-arun), [Gustavo Gawryszewski](https://github.com/gawry), and [Daniel Korbit](https://github.com/danielkorbit)
- Update `nokogiri` to 1.10.4
-- Update `ffi` in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jackmack](https://github.com/jakemack)
-- Update `rack` to 2.0.7 in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jackmack](https://github.com/jakemack)
-- Update middleman to `4.3` and relax constraints on middleman related gems, thanks to [jackmack](https://github.com/jakemack)
-- Add sass gem, thanks to [jackmack](https://github.com/jackmack)
+- Update `ffi` in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jakemack](https://github.com/jakemack)
+- Update `rack` to 2.0.7 in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jakemack](https://github.com/jakemack)
+- Update middleman to `4.3` and relax constraints on middleman related gems, thanks to [jakemack](https://github.com/jakemack)
+- Add sass gem, thanks to [jakemack](https://github.com/jakemack)
- Activate `asset_cache` in middleman to improve cacheability of static files, thanks to [Sam Gilman](https://github.com/thenengah)
-- Update to using bundler 2 for `Gemfile.lock`, thanks to [jackmack](https://github.com/jakemack)
+- Update to using bundler 2 for `Gemfile.lock`, thanks to [jakemack](https://github.com/jakemack)
## Version 2.3.1
From 36f82aa880280a76e92571d189168effc7249362 Mon Sep 17 00:00:00 2001
From: Mike Ralphson
Date: Tue, 9 Jun 2020 00:55:30 +0100
Subject: [PATCH 051/164] Update JavaScript dependencies (#1248)
Signed-off-by: Mike Ralphson
---
README.md | 10 +
source/javascripts/app/_search.js | 44 +-
source/javascripts/lib/_imagesloaded.min.js | 4 +-
source/javascripts/lib/_jquery.js | 2489 ++++++----
source/javascripts/lib/_lunr.js | 4835 ++++++++++++-------
5 files changed, 4790 insertions(+), 2592 deletions(-)
diff --git a/README.md b/README.md
index 7d15f8646eb..28d0fa7c970 100644
--- a/README.md
+++ b/README.md
@@ -79,3 +79,13 @@ Thanks to the following people who have submitted major pull requests:
- [@cvkef](https://github.com/cvkef)
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
+<<<<<<< HEAD
+=======
+
+Special Thanks
+--------------------
+- [Middleman](https://github.com/middleman/middleman)
+- [middleman-syntax](https://github.com/middleman/middleman-syntax)
+- [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages)
+- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
+>>>>>>> Update JavaScript dependencies (#1248)
diff --git a/source/javascripts/app/_search.js b/source/javascripts/app/_search.js
index 9ff4233c18a..0b0ccd97fdd 100644
--- a/source/javascripts/app/_search.js
+++ b/source/javascripts/app/_search.js
@@ -8,32 +8,36 @@
var highlightOpts = { element: 'span', className: 'search-highlight' };
var searchDelay = 0;
var timeoutHandle = 0;
-
- var index = new lunr.Index();
-
- index.ref('id');
- index.field('title', { boost: 10 });
- index.field('body');
- index.pipeline.add(lunr.trimmer, lunr.stopWordFilter);
-
- $(populate);
- $(bind);
+ var index;
function populate() {
- $('h1, h2').each(function() {
- var title = $(this);
- var body = title.nextUntil('h1, h2');
- index.add({
- id: title.prop('id'),
- title: title.text(),
- body: body.text()
+ index = lunr(function(){
+
+ this.ref('id');
+ this.field('title', { boost: 10 });
+ this.field('body');
+ this.pipeline.add(lunr.trimmer, lunr.stopWordFilter);
+ var lunrConfig = this;
+
+ $('h1, h2').each(function() {
+ var title = $(this);
+ var body = title.nextUntil('h1, h2');
+ lunrConfig.add({
+ id: title.prop('id'),
+ title: title.text(),
+ body: body.text()
+ });
});
- });
+ });
determineSearchDelay();
}
+
+ $(populate);
+ $(bind);
+
function determineSearchDelay() {
- if(index.tokenStore.length>5000) {
+ if (index.tokenSet.toArray().length>5000) {
searchDelay = 300;
}
}
@@ -51,7 +55,7 @@
}();
wait(function(){
search(e);
- }, searchDelay );
+ }, searchDelay);
});
}
diff --git a/source/javascripts/lib/_imagesloaded.min.js b/source/javascripts/lib/_imagesloaded.min.js
index d66f658937d..e443a77d627 100644
--- a/source/javascripts/lib/_imagesloaded.min.js
+++ b/source/javascripts/lib/_imagesloaded.min.js
@@ -1,7 +1,7 @@
/*!
- * imagesLoaded PACKAGED v3.1.8
+ * imagesLoaded PACKAGED v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
-(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
\ No newline at end of file
+!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o elements
+ // (i.e., `typeof document.createElement( "object" ) === "function"`).
+ // We don't want to classify *any* DOM node as a function.
+ return typeof obj === "function" && typeof obj.nodeType !== "number";
+ };
+
+
+var isWindow = function isWindow( obj ) {
+ return obj != null && obj === obj.window;
+ };
+
+
+var document = window.document;
- function DOMEval( code, doc ) {
+
+ var preservedScriptAttributes = {
+ type: true,
+ src: true,
+ nonce: true,
+ noModule: true
+ };
+
+ function DOMEval( code, node, doc ) {
doc = doc || document;
- var script = doc.createElement( "script" );
+ var i, val,
+ script = doc.createElement( "script" );
script.text = code;
+ if ( node ) {
+ for ( i in preservedScriptAttributes ) {
+
+ // Support: Firefox 64+, Edge 18+
+ // Some browsers don't support the "nonce" property on scripts.
+ // On the other hand, just using `getAttribute` is not enough as
+ // the `nonce` attribute is reset to an empty string whenever it
+ // becomes browsing-context connected.
+ // See https://github.com/whatwg/html/issues/2369
+ // See https://html.spec.whatwg.org/#nonce-attributes
+ // The `node.getAttribute` check was added for the sake of
+ // `jQuery.globalEval` so that it can fake a nonce-containing node
+ // via an object.
+ val = node[ i ] || node.getAttribute && node.getAttribute( i );
+ if ( val ) {
+ script.setAttribute( i, val );
+ }
+ }
+ }
doc.head.appendChild( script ).parentNode.removeChild( script );
}
+
+
+function toType( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+
+ // Support: Android <=2.3 only (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call( obj ) ] || "object" :
+ typeof obj;
+}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module
@@ -88,7 +147,7 @@ var support = {};
var
- version = "3.2.1",
+ version = "3.5.1",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
@@ -96,19 +155,6 @@ var
// The jQuery object is actually just the init constructor 'enhanced'
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
- },
-
- // Support: Android <=4.0 only
- // Make sure we trim BOM and NBSP
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([a-z])/g,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
};
jQuery.fn = jQuery.prototype = {
@@ -175,6 +221,18 @@ jQuery.fn = jQuery.prototype = {
return this.eq( -1 );
},
+ even: function() {
+ return this.pushStack( jQuery.grep( this, function( _elem, i ) {
+ return ( i + 1 ) % 2;
+ } ) );
+ },
+
+ odd: function() {
+ return this.pushStack( jQuery.grep( this, function( _elem, i ) {
+ return i % 2;
+ } ) );
+ },
+
eq: function( i ) {
var len = this.length,
j = +i + ( i < 0 ? len : 0 );
@@ -209,7 +267,7 @@ jQuery.extend = jQuery.fn.extend = function() {
}
// Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+ if ( typeof target !== "object" && !isFunction( target ) ) {
target = {};
}
@@ -226,25 +284,28 @@ jQuery.extend = jQuery.fn.extend = function() {
// Extend the base object
for ( name in options ) {
- src = target[ name ];
copy = options[ name ];
+ // Prevent Object.prototype pollution
// Prevent never-ending loop
- if ( target === copy ) {
+ if ( name === "__proto__" || target === copy ) {
continue;
}
// Recurse if we're merging plain objects or arrays
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
( copyIsArray = Array.isArray( copy ) ) ) ) {
+ src = target[ name ];
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && Array.isArray( src ) ? src : [];
-
+ // Ensure proper type for the source value
+ if ( copyIsArray && !Array.isArray( src ) ) {
+ clone = [];
+ } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
+ clone = {};
} else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
+ clone = src;
}
+ copyIsArray = false;
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
@@ -275,28 +336,6 @@ jQuery.extend( {
noop: function() {},
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // As of jQuery 3.0, isNumeric is limited to
- // strings and numbers (primitives or objects)
- // that can be coerced to finite numbers (gh-2662)
- var type = jQuery.type( obj );
- return ( type === "number" || type === "string" ) &&
-
- // parseFloat NaNs numeric-cast false positives ("")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- !isNaN( obj - parseFloat( obj ) );
- },
-
isPlainObject: function( obj ) {
var proto, Ctor;
@@ -319,9 +358,6 @@ jQuery.extend( {
},
isEmptyObject: function( obj ) {
-
- /* eslint-disable no-unused-vars */
- // See https://github.com/eslint/eslint/issues/6125
var name;
for ( name in obj ) {
@@ -330,27 +366,10 @@ jQuery.extend( {
return true;
},
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android <=2.3 only (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- DOMEval( code );
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE <=9 - 11, Edge 12 - 13
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ // Evaluates a script in a provided context; falls back to the global one
+ // if not specified.
+ globalEval: function( code, options, doc ) {
+ DOMEval( code, { nonce: options && options.nonce }, doc );
},
each: function( obj, callback ) {
@@ -374,13 +393,6 @@ jQuery.extend( {
return obj;
},
- // Support: Android <=4.0 only
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
// results is for internal usage only
makeArray: function( arr, results ) {
var ret = results || [];
@@ -467,43 +479,12 @@ jQuery.extend( {
}
// Flatten any nested arrays
- return concat.apply( [], ret );
+ return flat( ret );
},
// A global GUID counter for objects
guid: 1,
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support: support
@@ -515,7 +496,7 @@ if ( typeof Symbol === "function" ) {
// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
+function( _i, name ) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );
@@ -526,9 +507,9 @@ function isArrayLike( obj ) {
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
+ type = toType( obj );
- if ( type === "function" || jQuery.isWindow( obj ) ) {
+ if ( isFunction( obj ) || isWindow( obj ) ) {
return false;
}
@@ -537,17 +518,16 @@ function isArrayLike( obj ) {
}
var Sizzle =
/*!
- * Sizzle CSS Selector Engine v2.3.3
+ * Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
*
- * Copyright jQuery Foundation and other contributors
+ * Copyright JS Foundation and other contributors
* Released under the MIT license
- * http://jquery.org/license
+ * https://js.foundation/
*
- * Date: 2016-08-08
+ * Date: 2020-03-14
*/
-(function( window ) {
-
+( function( window ) {
var i,
support,
Expr,
@@ -578,6 +558,7 @@ var i,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
+ nonnativeSelectorCache = createCache(),
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
@@ -586,61 +567,71 @@ var i,
},
// Instance methods
- hasOwn = ({}).hasOwnProperty,
+ hasOwn = ( {} ).hasOwnProperty,
arr = [],
pop = arr.pop,
- push_native = arr.push,
+ pushNative = arr.push,
push = arr.push,
slice = arr.slice,
+
// Use a stripped-down indexOf as it's faster than native
// https://jsperf.com/thor-indexof-vs-for/5
indexOf = function( list, elem ) {
var i = 0,
len = list.length;
for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
+ if ( list[ i ] === elem ) {
return i;
}
}
return -1;
},
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
+ "ismap|loop|multiple|open|readonly|required|scoped",
// Regular expressions
// http://www.w3.org/TR/css3-selectors/#whitespace
whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
+ // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
+ identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
+ "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+
// Operator (capture 2)
"*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
+
+ // "Attribute values must be CSS identifiers [capture 5]
+ // or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
+ whitespace + "*\\]",
pseudos = ":(" + identifier + ")(?:\\((" +
+
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
// 1. quoted (capture 3; capture 4 or capture 5)
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+
// 2. simple (capture 6)
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+
// 3. anything else (capture 2)
".*" +
")\\)|)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
+ whitespace + "+$", "g" ),
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
+ "*" ),
+ rdescend = new RegExp( whitespace + "|>" ),
rpseudo = new RegExp( pseudos ),
ridentifier = new RegExp( "^" + identifier + "$" ),
@@ -651,16 +642,19 @@ var i,
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
+ whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
+ whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+
// For use in libraries implementing .is()
// We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ "needsContext": new RegExp( "^" + whitespace +
+ "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
+ rhtml = /HTML$/i,
rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,
@@ -673,18 +667,21 @@ var i,
// CSS escapes
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
+ runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
+ funescape = function( escape, nonHex ) {
+ var high = "0x" + escape.slice( 1 ) - 0x10000;
+
+ return nonHex ?
+
+ // Strip the backslash prefix from a non-hex escape sequence
+ nonHex :
+
+ // Replace a hexadecimal escape sequence with the encoded Unicode code point
+ // Support: IE <=11+
+ // For values outside the Basic Multilingual Plane (BMP), manually construct a
+ // surrogate pair
high < 0 ?
- // BMP codepoint
String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
},
@@ -700,7 +697,8 @@ var i,
}
// Control characters and (dependent upon position) numbers get escaped as code points
- return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+ return ch.slice( 0, -1 ) + "\\" +
+ ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
}
// Other potentially-special ASCII characters get backslash-escaped
@@ -715,9 +713,9 @@ var i,
setDocument();
},
- disabledAncestor = addCombinator(
+ inDisabledFieldset = addCombinator(
function( elem ) {
- return elem.disabled === true && ("form" in elem || "label" in elem);
+ return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
},
{ dir: "parentNode", next: "legend" }
);
@@ -725,18 +723,20 @@ var i,
// Optimize for push.apply( _, NodeList )
try {
push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
+ ( arr = slice.call( preferredDoc.childNodes ) ),
preferredDoc.childNodes
);
+
// Support: Android<4.0
// Detect silently failing push.apply
+ // eslint-disable-next-line no-unused-expressions
arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
push = { apply: arr.length ?
// Leverage slice if possible
function( target, els ) {
- push_native.apply( target, slice.call(els) );
+ pushNative.apply( target, slice.call( els ) );
} :
// Support: IE<9
@@ -744,8 +744,9 @@ try {
function( target, els ) {
var j = target.length,
i = 0;
+
// Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
+ while ( ( target[ j++ ] = els[ i++ ] ) ) {}
target.length = j - 1;
}
};
@@ -769,24 +770,21 @@ function Sizzle( selector, context, results, seed ) {
// Try to shortcut find operations (as opposed to filters) in HTML documents
if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
+ setDocument( context );
context = context || document;
if ( documentIsHTML ) {
// If the selector is sufficiently simple, try using a "get*By*" DOM method
// (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
// ID selector
- if ( (m = match[1]) ) {
+ if ( ( m = match[ 1 ] ) ) {
// Document context
if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
+ if ( ( elem = context.getElementById( m ) ) ) {
// Support: IE, Opera, Webkit
// TODO: identify versions
@@ -805,7 +803,7 @@ function Sizzle( selector, context, results, seed ) {
// Support: IE, Opera, Webkit
// TODO: identify versions
// getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
+ if ( newContext && ( elem = newContext.getElementById( m ) ) &&
contains( context, elem ) &&
elem.id === m ) {
@@ -815,12 +813,12 @@ function Sizzle( selector, context, results, seed ) {
}
// Type selector
- } else if ( match[2] ) {
+ } else if ( match[ 2 ] ) {
push.apply( results, context.getElementsByTagName( selector ) );
return results;
// Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
+ } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
context.getElementsByClassName ) {
push.apply( results, context.getElementsByClassName( m ) );
@@ -830,50 +828,62 @@ function Sizzle( selector, context, results, seed ) {
// Take advantage of querySelectorAll
if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
+ !nonnativeSelectorCache[ selector + " " ] &&
+ ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
+ // Support: IE 8 only
// Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
+ ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rcssescape, fcssescape );
- } else {
- context.setAttribute( "id", (nid = expando) );
+ newSelector = selector;
+ newContext = context;
+
+ // qSA considers elements outside a scoping root when evaluating child or
+ // descendant combinators, which is not what we want.
+ // In such cases, we work around the behavior by prefixing every selector in the
+ // list with an ID selector referencing the scope context.
+ // The technique has to be used as well when a leading combinator is used
+ // as such selectors are not recognized by querySelectorAll.
+ // Thanks to Andrew Dupont for this technique.
+ if ( nodeType === 1 &&
+ ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
+
+ // Expand context for sibling selectors
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+ context;
+
+ // We can use :scope instead of the ID hack if the browser
+ // supports it & if we're not changing the context.
+ if ( newContext !== context || !support.scope ) {
+
+ // Capture the context ID, setting it first if necessary
+ if ( ( nid = context.getAttribute( "id" ) ) ) {
+ nid = nid.replace( rcssescape, fcssescape );
+ } else {
+ context.setAttribute( "id", ( nid = expando ) );
+ }
}
// Prefix every selector in the list
groups = tokenize( selector );
i = groups.length;
while ( i-- ) {
- groups[i] = "#" + nid + " " + toSelector( groups[i] );
+ groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
+ toSelector( groups[ i ] );
}
newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
}
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch ( qsaError ) {
+ nonnativeSelectorCache( selector, true );
+ } finally {
+ if ( nid === expando ) {
+ context.removeAttribute( "id" );
}
}
}
@@ -894,12 +904,14 @@ function createCache() {
var keys = [];
function cache( key, value ) {
+
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
if ( keys.push( key + " " ) > Expr.cacheLength ) {
+
// Only keep the most recent entries
delete cache[ keys.shift() ];
}
- return (cache[ key + " " ] = value);
+ return ( cache[ key + " " ] = value );
}
return cache;
}
@@ -918,17 +930,19 @@ function markFunction( fn ) {
* @param {Function} fn Passed the created element and returns a boolean result
*/
function assert( fn ) {
- var el = document.createElement("fieldset");
+ var el = document.createElement( "fieldset" );
try {
return !!fn( el );
- } catch (e) {
+ } catch ( e ) {
return false;
} finally {
+
// Remove from its parent by default
if ( el.parentNode ) {
el.parentNode.removeChild( el );
}
+
// release memory in IE
el = null;
}
@@ -940,11 +954,11 @@ function assert( fn ) {
* @param {Function} handler The method that will be applied
*/
function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
+ var arr = attrs.split( "|" ),
i = arr.length;
while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
+ Expr.attrHandle[ arr[ i ] ] = handler;
}
}
@@ -966,7 +980,7 @@ function siblingCheck( a, b ) {
// Check if b follows a
if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
+ while ( ( cur = cur.nextSibling ) ) {
if ( cur === b ) {
return -1;
}
@@ -994,7 +1008,7 @@ function createInputPseudo( type ) {
function createButtonPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
+ return ( name === "input" || name === "button" ) && elem.type === type;
};
}
@@ -1037,7 +1051,7 @@ function createDisabledPseudo( disabled ) {
// Where there is no isDisabled, check manually
/* jshint -W018 */
elem.isDisabled !== !disabled &&
- disabledAncestor( elem ) === disabled;
+ inDisabledFieldset( elem ) === disabled;
}
return elem.disabled === disabled;
@@ -1059,21 +1073,21 @@ function createDisabledPseudo( disabled ) {
* @param {Function} fn
*/
function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
+ return markFunction( function( argument ) {
argument = +argument;
- return markFunction(function( seed, matches ) {
+ return markFunction( function( seed, matches ) {
var j,
matchIndexes = fn( [], seed.length, argument ),
i = matchIndexes.length;
// Match elements found at the specified indexes
while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
+ if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
+ seed[ j ] = !( matches[ j ] = seed[ j ] );
}
}
- });
- });
+ } );
+ } );
}
/**
@@ -1094,10 +1108,13 @@ support = Sizzle.support = {};
* @returns {Boolean} True iff elem is a non-HTML XML node
*/
isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
+ var namespace = elem.namespaceURI,
+ docElem = ( elem.ownerDocument || elem ).documentElement;
+
+ // Support: IE <=8
+ // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
+ // https://bugs.jquery.com/ticket/4833
+ return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
};
/**
@@ -1110,7 +1127,11 @@ setDocument = Sizzle.setDocument = function( node ) {
doc = node ? node.ownerDocument || node : preferredDoc;
// Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
return document;
}
@@ -1119,10 +1140,14 @@ setDocument = Sizzle.setDocument = function( node ) {
docElem = document.documentElement;
documentIsHTML = !isXML( document );
- // Support: IE 9-11, Edge
+ // Support: IE 9 - 11+, Edge 12 - 18+
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( preferredDoc !== document &&
- (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( preferredDoc != document &&
+ ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
// Support: IE 11, Edge
if ( subWindow.addEventListener ) {
@@ -1134,25 +1159,36 @@ setDocument = Sizzle.setDocument = function( node ) {
}
}
+ // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
+ // Safari 4 - 5 only, Opera <=11.6 - 12.x only
+ // IE/Edge & older browsers don't support the :scope pseudo-class.
+ // Support: Safari 6.0 only
+ // Safari 6.0 supports :scope but it's an alias of :root there.
+ support.scope = assert( function( el ) {
+ docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
+ return typeof el.querySelectorAll !== "undefined" &&
+ !el.querySelectorAll( ":scope fieldset div" ).length;
+ } );
+
/* Attributes
---------------------------------------------------------------------- */
// Support: IE<8
// Verify that getAttribute really returns attributes and not properties
// (excepting IE8 booleans)
- support.attributes = assert(function( el ) {
+ support.attributes = assert( function( el ) {
el.className = "i";
- return !el.getAttribute("className");
- });
+ return !el.getAttribute( "className" );
+ } );
/* getElement(s)By*
---------------------------------------------------------------------- */
// Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( el ) {
- el.appendChild( document.createComment("") );
- return !el.getElementsByTagName("*").length;
- });
+ support.getElementsByTagName = assert( function( el ) {
+ el.appendChild( document.createComment( "" ) );
+ return !el.getElementsByTagName( "*" ).length;
+ } );
// Support: IE<9
support.getElementsByClassName = rnative.test( document.getElementsByClassName );
@@ -1161,38 +1197,38 @@ setDocument = Sizzle.setDocument = function( node ) {
// Check if getElementById returns elements by name
// The broken getElementById methods don't pick up programmatically-set names,
// so use a roundabout getElementsByName test
- support.getById = assert(function( el ) {
+ support.getById = assert( function( el ) {
docElem.appendChild( el ).id = expando;
return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
+ } );
// ID filter and find
if ( support.getById ) {
- Expr.filter["ID"] = function( id ) {
+ Expr.filter[ "ID" ] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
- return elem.getAttribute("id") === attrId;
+ return elem.getAttribute( "id" ) === attrId;
};
};
- Expr.find["ID"] = function( id, context ) {
+ Expr.find[ "ID" ] = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var elem = context.getElementById( id );
return elem ? [ elem ] : [];
}
};
} else {
- Expr.filter["ID"] = function( id ) {
+ Expr.filter[ "ID" ] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
+ elem.getAttributeNode( "id" );
return node && node.value === attrId;
};
};
// Support: IE 6 - 7 only
// getElementById is not reliable as a find shortcut
- Expr.find["ID"] = function( id, context ) {
+ Expr.find[ "ID" ] = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var node, i, elems,
elem = context.getElementById( id );
@@ -1200,7 +1236,7 @@ setDocument = Sizzle.setDocument = function( node ) {
if ( elem ) {
// Verify the id attribute
- node = elem.getAttributeNode("id");
+ node = elem.getAttributeNode( "id" );
if ( node && node.value === id ) {
return [ elem ];
}
@@ -1208,8 +1244,8 @@ setDocument = Sizzle.setDocument = function( node ) {
// Fall back on getElementsByName
elems = context.getElementsByName( id );
i = 0;
- while ( (elem = elems[i++]) ) {
- node = elem.getAttributeNode("id");
+ while ( ( elem = elems[ i++ ] ) ) {
+ node = elem.getAttributeNode( "id" );
if ( node && node.value === id ) {
return [ elem ];
}
@@ -1222,7 +1258,7 @@ setDocument = Sizzle.setDocument = function( node ) {
}
// Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
+ Expr.find[ "TAG" ] = support.getElementsByTagName ?
function( tag, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( tag );
@@ -1237,12 +1273,13 @@ setDocument = Sizzle.setDocument = function( node ) {
var elem,
tmp = [],
i = 0,
+
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
results = context.getElementsByTagName( tag );
// Filter out possible comments
if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
+ while ( ( elem = results[ i++ ] ) ) {
if ( elem.nodeType === 1 ) {
tmp.push( elem );
}
@@ -1254,7 +1291,7 @@ setDocument = Sizzle.setDocument = function( node ) {
};
// Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
return context.getElementsByClassName( className );
}
@@ -1275,10 +1312,14 @@ setDocument = Sizzle.setDocument = function( node ) {
// See https://bugs.jquery.com/ticket/13378
rbuggyQSA = [];
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
+ if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
+
// Build QSA regex
// Regex strategy adopted from Diego Perini
- assert(function( el ) {
+ assert( function( el ) {
+
+ var input;
+
// Select is set to empty string on purpose
// This is to test IE's treatment of not explicitly
// setting a boolean content attribute,
@@ -1292,78 +1333,98 @@ setDocument = Sizzle.setDocument = function( node ) {
// Nothing should be selected when empty strings follow ^= or $= or *=
// The test attribute must be unknown in Opera but "safe" for WinRT
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( el.querySelectorAll("[msallowcapture^='']").length ) {
+ if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
}
// Support: IE8
// Boolean attributes and "value" are not treated correctly
- if ( !el.querySelectorAll("[selected]").length ) {
+ if ( !el.querySelectorAll( "[selected]" ).length ) {
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
}
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
+ rbuggyQSA.push( "~=" );
+ }
+
+ // Support: IE 11+, Edge 15 - 18+
+ // IE 11/Edge don't find elements on a `[name='']` query in some cases.
+ // Adding a temporary attribute to the document before the selection works
+ // around the issue.
+ // Interestingly, IE 10 & older don't seem to have the issue.
+ input = document.createElement( "input" );
+ input.setAttribute( "name", "" );
+ el.appendChild( input );
+ if ( !el.querySelectorAll( "[name='']" ).length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
+ whitespace + "*(?:''|\"\")" );
}
// Webkit/Opera - :checked should return selected option elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
// IE8 throws error here and will not see later tests
- if ( !el.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
+ if ( !el.querySelectorAll( ":checked" ).length ) {
+ rbuggyQSA.push( ":checked" );
}
// Support: Safari 8+, iOS 8+
// https://bugs.webkit.org/show_bug.cgi?id=136851
// In-page `selector#id sibling-combinator selector` fails
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
+ rbuggyQSA.push( ".#.+[+~]" );
}
- });
- assert(function( el ) {
+ // Support: Firefox <=3.6 - 5 only
+ // Old Firefox doesn't throw on a badly-escaped identifier.
+ el.querySelectorAll( "\\\f" );
+ rbuggyQSA.push( "[\\r\\n\\f]" );
+ } );
+
+ assert( function( el ) {
el.innerHTML = " " +
" ";
// Support: Windows 8 Native Apps
// The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
+ var input = document.createElement( "input" );
input.setAttribute( "type", "hidden" );
el.appendChild( input ).setAttribute( "name", "D" );
// Support: IE8
// Enforce case-sensitivity of name attribute
- if ( el.querySelectorAll("[name=d]").length ) {
+ if ( el.querySelectorAll( "[name=d]" ).length ) {
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
}
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
// IE8 throws error here and will not see later tests
- if ( el.querySelectorAll(":enabled").length !== 2 ) {
+ if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}
// Support: IE9-11+
// IE's :disabled selector does not pick up the children of disabled fieldsets
docElem.appendChild( el ).disabled = true;
- if ( el.querySelectorAll(":disabled").length !== 2 ) {
+ if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}
+ // Support: Opera 10 - 11 only
// Opera 10-11 does not throw on post-comma invalid pseudos
- el.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
+ el.querySelectorAll( "*,:x" );
+ rbuggyQSA.push( ",.*:" );
+ } );
}
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
+ docElem.msMatchesSelector ) ) ) ) {
+
+ assert( function( el ) {
- assert(function( el ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call( el, "*" );
@@ -1372,11 +1433,11 @@ setDocument = Sizzle.setDocument = function( node ) {
// Gecko does not error, returns false instead
matches.call( el, "[s!='']:x" );
rbuggyMatches.push( "!=", pseudos );
- });
+ } );
}
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
/* Contains
---------------------------------------------------------------------- */
@@ -1393,11 +1454,11 @@ setDocument = Sizzle.setDocument = function( node ) {
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
+ ) );
} :
function( a, b ) {
if ( b ) {
- while ( (b = b.parentNode) ) {
+ while ( ( b = b.parentNode ) ) {
if ( b === a ) {
return true;
}
@@ -1426,7 +1487,11 @@ setDocument = Sizzle.setDocument = function( node ) {
}
// Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
a.compareDocumentPosition( b ) :
// Otherwise we know they are disconnected
@@ -1434,13 +1499,24 @@ setDocument = Sizzle.setDocument = function( node ) {
// Disconnected nodes
if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+ ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
// Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( a == document || a.ownerDocument == preferredDoc &&
+ contains( preferredDoc, a ) ) {
return -1;
}
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( b == document || b.ownerDocument == preferredDoc &&
+ contains( preferredDoc, b ) ) {
return 1;
}
@@ -1453,6 +1529,7 @@ setDocument = Sizzle.setDocument = function( node ) {
return compare & 4 ? -1 : 1;
} :
function( a, b ) {
+
// Exit early if the nodes are identical
if ( a === b ) {
hasDuplicate = true;
@@ -1468,8 +1545,14 @@ setDocument = Sizzle.setDocument = function( node ) {
// Parentless nodes are either documents or disconnected
if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ /* eslint-disable eqeqeq */
+ return a == document ? -1 :
+ b == document ? 1 :
+ /* eslint-enable eqeqeq */
aup ? -1 :
bup ? 1 :
sortInput ?
@@ -1483,26 +1566,32 @@ setDocument = Sizzle.setDocument = function( node ) {
// Otherwise we need full lists of their ancestors for comparison
cur = a;
- while ( (cur = cur.parentNode) ) {
+ while ( ( cur = cur.parentNode ) ) {
ap.unshift( cur );
}
cur = b;
- while ( (cur = cur.parentNode) ) {
+ while ( ( cur = cur.parentNode ) ) {
bp.unshift( cur );
}
// Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
+ while ( ap[ i ] === bp[ i ] ) {
i++;
}
return i ?
+
// Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
+ siblingCheck( ap[ i ], bp[ i ] ) :
// Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ /* eslint-disable eqeqeq */
+ ap[ i ] == preferredDoc ? -1 :
+ bp[ i ] == preferredDoc ? 1 :
+ /* eslint-enable eqeqeq */
0;
};
@@ -1514,16 +1603,10 @@ Sizzle.matches = function( expr, elements ) {
};
Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
+ setDocument( elem );
if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
+ !nonnativeSelectorCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
@@ -1532,32 +1615,46 @@ Sizzle.matchesSelector = function( elem, expr ) {
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
+
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
return ret;
}
- } catch (e) {}
+ } catch ( e ) {
+ nonnativeSelectorCache( expr, true );
+ }
}
return Sizzle( expr, document, null, [ elem ] ).length > 0;
};
Sizzle.contains = function( context, elem ) {
+
// Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( ( context.ownerDocument || context ) != document ) {
setDocument( context );
}
return contains( context, elem );
};
Sizzle.attr = function( elem, name ) {
+
// Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( ( elem.ownerDocument || elem ) != document ) {
setDocument( elem );
}
var fn = Expr.attrHandle[ name.toLowerCase() ],
+
// Don't get fooled by Object.prototype properties (jQuery #13807)
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
@@ -1567,13 +1664,13 @@ Sizzle.attr = function( elem, name ) {
val :
support.attributes || !documentIsHTML ?
elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
+ ( val = elem.getAttributeNode( name ) ) && val.specified ?
val.value :
null;
};
Sizzle.escape = function( sel ) {
- return (sel + "").replace( rcssescape, fcssescape );
+ return ( sel + "" ).replace( rcssescape, fcssescape );
};
Sizzle.error = function( msg ) {
@@ -1596,7 +1693,7 @@ Sizzle.uniqueSort = function( results ) {
results.sort( sortOrder );
if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
+ while ( ( elem = results[ i++ ] ) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
}
@@ -1624,17 +1721,21 @@ getText = Sizzle.getText = function( elem ) {
nodeType = elem.nodeType;
if ( !nodeType ) {
+
// If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
+ while ( ( node = elem[ i++ ] ) ) {
+
// Do not traverse comment nodes
ret += getText( node );
}
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+
// Use textContent for elements
// innerText usage removed for consistency of new lines (jQuery #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
} else {
+
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
@@ -1643,6 +1744,7 @@ getText = Sizzle.getText = function( elem ) {
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
+
// Do not include comment or processing instruction nodes
return ret;
@@ -1670,19 +1772,21 @@ Expr = Sizzle.selectors = {
preFilter: {
"ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
+ match[ 1 ] = match[ 1 ].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+ match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
+ match[ 5 ] || "" ).replace( runescape, funescape );
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
+ if ( match[ 2 ] === "~=" ) {
+ match[ 3 ] = " " + match[ 3 ] + " ";
}
return match.slice( 0, 4 );
},
"CHILD": function( match ) {
+
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
@@ -1693,22 +1797,25 @@ Expr = Sizzle.selectors = {
7 sign of y-component
8 y of y-component
*/
- match[1] = match[1].toLowerCase();
+ match[ 1 ] = match[ 1 ].toLowerCase();
+
+ if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
- if ( match[1].slice( 0, 3 ) === "nth" ) {
// nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
+ if ( !match[ 3 ] ) {
+ Sizzle.error( match[ 0 ] );
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+ match[ 4 ] = +( match[ 4 ] ?
+ match[ 5 ] + ( match[ 6 ] || 1 ) :
+ 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
+ match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
+ // other types prohibit arguments
+ } else if ( match[ 3 ] ) {
+ Sizzle.error( match[ 0 ] );
}
return match;
@@ -1716,26 +1823,28 @@ Expr = Sizzle.selectors = {
"PSEUDO": function( match ) {
var excess,
- unquoted = !match[6] && match[2];
+ unquoted = !match[ 6 ] && match[ 2 ];
- if ( matchExpr["CHILD"].test( match[0] ) ) {
+ if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
return null;
}
// Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
+ if ( match[ 3 ] ) {
+ match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
// Strip excess characters from unquoted arguments
} else if ( unquoted && rpseudo.test( unquoted ) &&
+
// Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
+ ( excess = tokenize( unquoted, true ) ) &&
+
// advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+ ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
// excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
+ match[ 0 ] = match[ 0 ].slice( 0, excess );
+ match[ 2 ] = unquoted.slice( 0, excess );
}
// Return only captures needed by the pseudo filter method (type and argument)
@@ -1748,7 +1857,9 @@ Expr = Sizzle.selectors = {
"TAG": function( nodeNameSelector ) {
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
return nodeNameSelector === "*" ?
- function() { return true; } :
+ function() {
+ return true;
+ } :
function( elem ) {
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
};
@@ -1758,10 +1869,16 @@ Expr = Sizzle.selectors = {
var pattern = classCache[ className + " " ];
return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
+ ( pattern = new RegExp( "(^|" + whitespace +
+ ")" + className + "(" + whitespace + "|$)" ) ) && classCache(
+ className, function( elem ) {
+ return pattern.test(
+ typeof elem.className === "string" && elem.className ||
+ typeof elem.getAttribute !== "undefined" &&
+ elem.getAttribute( "class" ) ||
+ ""
+ );
+ } );
},
"ATTR": function( name, operator, check ) {
@@ -1777,6 +1894,8 @@ Expr = Sizzle.selectors = {
result += "";
+ /* eslint-disable max-len */
+
return operator === "=" ? result === check :
operator === "!=" ? result !== check :
operator === "^=" ? check && result.indexOf( check ) === 0 :
@@ -1785,10 +1904,12 @@ Expr = Sizzle.selectors = {
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
false;
+ /* eslint-enable max-len */
+
};
},
- "CHILD": function( type, what, argument, first, last ) {
+ "CHILD": function( type, what, _argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
@@ -1800,7 +1921,7 @@ Expr = Sizzle.selectors = {
return !!elem.parentNode;
} :
- function( elem, context, xml ) {
+ function( elem, _context, xml ) {
var cache, uniqueCache, outerCache, node, nodeIndex, start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
@@ -1814,7 +1935,7 @@ Expr = Sizzle.selectors = {
if ( simple ) {
while ( dir ) {
node = elem;
- while ( (node = node[ dir ]) ) {
+ while ( ( node = node[ dir ] ) ) {
if ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) {
@@ -1822,6 +1943,7 @@ Expr = Sizzle.selectors = {
return false;
}
}
+
// Reverse direction for :only-* (if we haven't yet done so)
start = dir = type === "only" && !start && "nextSibling";
}
@@ -1837,22 +1959,22 @@ Expr = Sizzle.selectors = {
// ...in a gzip-friendly way
node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
+ outerCache = node[ expando ] || ( node[ expando ] = {} );
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
+ ( outerCache[ node.uniqueID ] = {} );
cache = uniqueCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
diff = nodeIndex && cache[ 2 ];
node = nodeIndex && parent.childNodes[ nodeIndex ];
- while ( (node = ++nodeIndex && node && node[ dir ] ||
+ while ( ( node = ++nodeIndex && node && node[ dir ] ||
// Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
+ ( diff = nodeIndex = 0 ) || start.pop() ) ) {
// When found, cache indexes on `parent` and break
if ( node.nodeType === 1 && ++diff && node === elem ) {
@@ -1862,16 +1984,18 @@ Expr = Sizzle.selectors = {
}
} else {
+
// Use previously-cached element index if available
if ( useCache ) {
+
// ...in a gzip-friendly way
node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
+ outerCache = node[ expando ] || ( node[ expando ] = {} );
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
+ ( outerCache[ node.uniqueID ] = {} );
cache = uniqueCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
@@ -1881,9 +2005,10 @@ Expr = Sizzle.selectors = {
// xml :nth-child(...)
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
if ( diff === false ) {
+
// Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
+ while ( ( node = ++nodeIndex && node && node[ dir ] ||
+ ( diff = nodeIndex = 0 ) || start.pop() ) ) {
if ( ( ofType ?
node.nodeName.toLowerCase() === name :
@@ -1892,12 +2017,13 @@ Expr = Sizzle.selectors = {
// Cache the index of each encountered element
if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
+ outerCache = node[ expando ] ||
+ ( node[ expando ] = {} );
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
+ ( outerCache[ node.uniqueID ] = {} );
uniqueCache[ type ] = [ dirruns, diff ];
}
@@ -1918,6 +2044,7 @@ Expr = Sizzle.selectors = {
},
"PSEUDO": function( pseudo, argument ) {
+
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
@@ -1937,15 +2064,15 @@ Expr = Sizzle.selectors = {
if ( fn.length > 1 ) {
args = [ pseudo, pseudo, "", argument ];
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
+ markFunction( function( seed, matches ) {
var idx,
matched = fn( seed, argument ),
i = matched.length;
while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
+ idx = indexOf( seed, matched[ i ] );
+ seed[ idx ] = !( matches[ idx ] = matched[ i ] );
}
- }) :
+ } ) :
function( elem ) {
return fn( elem, 0, args );
};
@@ -1956,8 +2083,10 @@ Expr = Sizzle.selectors = {
},
pseudos: {
+
// Potentially complex pseudos
- "not": markFunction(function( selector ) {
+ "not": markFunction( function( selector ) {
+
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
@@ -1966,39 +2095,40 @@ Expr = Sizzle.selectors = {
matcher = compile( selector.replace( rtrim, "$1" ) );
return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
+ markFunction( function( seed, matches, _context, xml ) {
var elem,
unmatched = matcher( seed, null, xml, [] ),
i = seed.length;
// Match elements unmatched by `matcher`
while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
+ if ( ( elem = unmatched[ i ] ) ) {
+ seed[ i ] = !( matches[ i ] = elem );
}
}
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
+ } ) :
+ function( elem, _context, xml ) {
+ input[ 0 ] = elem;
matcher( input, null, xml, results );
+
// Don't keep the element (issue #299)
- input[0] = null;
+ input[ 0 ] = null;
return !results.pop();
};
- }),
+ } ),
- "has": markFunction(function( selector ) {
+ "has": markFunction( function( selector ) {
return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
- }),
+ } ),
- "contains": markFunction(function( text ) {
+ "contains": markFunction( function( text ) {
text = text.replace( runescape, funescape );
return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
};
- }),
+ } ),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
@@ -2008,25 +2138,26 @@ Expr = Sizzle.selectors = {
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
"lang": markFunction( function( lang ) {
+
// lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
+ if ( !ridentifier.test( lang || "" ) ) {
Sizzle.error( "unsupported lang: " + lang );
}
lang = lang.replace( runescape, funescape ).toLowerCase();
return function( elem ) {
var elemLang;
do {
- if ( (elemLang = documentIsHTML ?
+ if ( ( elemLang = documentIsHTML ?
elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+ elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
}
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
return false;
};
- }),
+ } ),
// Miscellaneous
"target": function( elem ) {
@@ -2039,7 +2170,9 @@ Expr = Sizzle.selectors = {
},
"focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ return elem === document.activeElement &&
+ ( !document.hasFocus || document.hasFocus() ) &&
+ !!( elem.type || elem.href || ~elem.tabIndex );
},
// Boolean properties
@@ -2047,16 +2180,20 @@ Expr = Sizzle.selectors = {
"disabled": createDisabledPseudo( true ),
"checked": function( elem ) {
+
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ return ( nodeName === "input" && !!elem.checked ) ||
+ ( nodeName === "option" && !!elem.selected );
},
"selected": function( elem ) {
+
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
+ // eslint-disable-next-line no-unused-expressions
elem.parentNode.selectedIndex;
}
@@ -2065,6 +2202,7 @@ Expr = Sizzle.selectors = {
// Contents
"empty": function( elem ) {
+
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
@@ -2078,7 +2216,7 @@ Expr = Sizzle.selectors = {
},
"parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
+ return !Expr.pseudos[ "empty" ]( elem );
},
// Element/input types
@@ -2102,57 +2240,62 @@ Expr = Sizzle.selectors = {
// Support: IE<8
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ ( ( attr = elem.getAttribute( "type" ) ) == null ||
+ attr.toLowerCase() === "text" );
},
// Position-in-collection
- "first": createPositionalPseudo(function() {
+ "first": createPositionalPseudo( function() {
return [ 0 ];
- }),
+ } ),
- "last": createPositionalPseudo(function( matchIndexes, length ) {
+ "last": createPositionalPseudo( function( _matchIndexes, length ) {
return [ length - 1 ];
- }),
+ } ),
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
- }),
+ } ),
- "even": createPositionalPseudo(function( matchIndexes, length ) {
+ "even": createPositionalPseudo( function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
- }),
+ } ),
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ "odd": createPositionalPseudo( function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
- }),
+ } ),
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
+ "lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
+ var i = argument < 0 ?
+ argument + length :
+ argument > length ?
+ length :
+ argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
}
return matchIndexes;
- }),
+ } ),
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ "gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
}
return matchIndexes;
- })
+ } )
}
};
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
+Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
@@ -2183,37 +2326,39 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
while ( soFar ) {
// Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
if ( match ) {
+
// Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
+ soFar = soFar.slice( match[ 0 ].length ) || soFar;
}
- groups.push( (tokens = []) );
+ groups.push( ( tokens = [] ) );
}
matched = false;
// Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
+ if ( ( match = rcombinators.exec( soFar ) ) ) {
matched = match.shift();
- tokens.push({
+ tokens.push( {
value: matched,
+
// Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
+ type: match[ 0 ].replace( rtrim, " " )
+ } );
soFar = soFar.slice( matched.length );
}
// Filters
for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
+ if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
+ ( match = preFilters[ type ]( match ) ) ) ) {
matched = match.shift();
- tokens.push({
+ tokens.push( {
value: matched,
type: type,
matches: match
- });
+ } );
soFar = soFar.slice( matched.length );
}
}
@@ -2230,6 +2375,7 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
soFar.length :
soFar ?
Sizzle.error( selector ) :
+
// Cache the tokens
tokenCache( selector, groups ).slice( 0 );
};
@@ -2239,7 +2385,7 @@ function toSelector( tokens ) {
len = tokens.length,
selector = "";
for ( ; i < len; i++ ) {
- selector += tokens[i].value;
+ selector += tokens[ i ].value;
}
return selector;
}
@@ -2252,9 +2398,10 @@ function addCombinator( matcher, combinator, base ) {
doneName = done++;
return combinator.first ?
+
// Check against closest ancestor/preceding element
function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
+ while ( ( elem = elem[ dir ] ) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
return matcher( elem, context, xml );
}
@@ -2269,7 +2416,7 @@ function addCombinator( matcher, combinator, base ) {
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
+ while ( ( elem = elem[ dir ] ) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
if ( matcher( elem, context, xml ) ) {
return true;
@@ -2277,27 +2424,29 @@ function addCombinator( matcher, combinator, base ) {
}
}
} else {
- while ( (elem = elem[ dir ]) ) {
+ while ( ( elem = elem[ dir ] ) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
+ outerCache = elem[ expando ] || ( elem[ expando ] = {} );
// Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
+ uniqueCache = outerCache[ elem.uniqueID ] ||
+ ( outerCache[ elem.uniqueID ] = {} );
if ( skip && skip === elem.nodeName.toLowerCase() ) {
elem = elem[ dir ] || elem;
- } else if ( (oldCache = uniqueCache[ key ]) &&
+ } else if ( ( oldCache = uniqueCache[ key ] ) &&
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
// Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
+ return ( newCache[ 2 ] = oldCache[ 2 ] );
} else {
+
// Reuse newcache so results back-propagate to previous elements
uniqueCache[ key ] = newCache;
// A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
return true;
}
}
@@ -2313,20 +2462,20 @@ function elementMatcher( matchers ) {
function( elem, context, xml ) {
var i = matchers.length;
while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
+ if ( !matchers[ i ]( elem, context, xml ) ) {
return false;
}
}
return true;
} :
- matchers[0];
+ matchers[ 0 ];
}
function multipleContexts( selector, contexts, results ) {
var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
+ Sizzle( selector, contexts[ i ], results );
}
return results;
}
@@ -2339,7 +2488,7 @@ function condense( unmatched, map, filter, context, xml ) {
mapped = map != null;
for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
+ if ( ( elem = unmatched[ i ] ) ) {
if ( !filter || filter( elem, context, xml ) ) {
newUnmatched.push( elem );
if ( mapped ) {
@@ -2359,14 +2508,18 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
if ( postFinder && !postFinder[ expando ] ) {
postFinder = setMatcher( postFinder, postSelector );
}
- return markFunction(function( seed, results, context, xml ) {
+ return markFunction( function( seed, results, context, xml ) {
var temp, i, elem,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+ elems = seed || multipleContexts(
+ selector || "*",
+ context.nodeType ? [ context ] : context,
+ []
+ ),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
@@ -2374,6 +2527,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
elems,
matcherOut = matcher ?
+
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
@@ -2397,8 +2551,8 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
// Un-match failing elements by moving them back to matcherIn
i = temp.length;
while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ if ( ( elem = temp[ i ] ) ) {
+ matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
}
}
}
@@ -2406,25 +2560,27 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
if ( seed ) {
if ( postFinder || preFilter ) {
if ( postFinder ) {
+
// Get the final matcherOut by condensing this intermediate into postFinder contexts
temp = [];
i = matcherOut.length;
while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
+ if ( ( elem = matcherOut[ i ] ) ) {
+
// Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
+ temp.push( ( matcherIn[ i ] = elem ) );
}
}
- postFinder( null, (matcherOut = []), temp, xml );
+ postFinder( null, ( matcherOut = [] ), temp, xml );
}
// Move matched elements from seed to results to keep them synchronized
i = matcherOut.length;
while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+ if ( ( elem = matcherOut[ i ] ) &&
+ ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
- seed[temp] = !(results[temp] = elem);
+ seed[ temp ] = !( results[ temp ] = elem );
}
}
}
@@ -2442,14 +2598,14 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
push.apply( results, matcherOut );
}
}
- });
+ } );
}
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
+ leadingRelative = Expr.relative[ tokens[ 0 ].type ],
+ implicitRelative = leadingRelative || Expr.relative[ " " ],
i = leadingRelative ? 1 : 0,
// The foundational matcher ensures that elements are reachable from top-level context(s)
@@ -2461,38 +2617,43 @@ function matcherFromTokens( tokens ) {
}, implicitRelative, true ),
matchers = [ function( elem, context, xml ) {
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
+ ( checkContext = context ).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
+
// Avoid hanging onto element (issue #299)
checkContext = null;
return ret;
} ];
for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
+ matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
} else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+ matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
// Return special upon seeing a positional matcher
if ( matcher[ expando ] ) {
+
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
+ if ( Expr.relative[ tokens[ j ].type ] ) {
break;
}
}
return setMatcher(
i > 1 && elementMatcher( matchers ),
i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens
+ .slice( 0, i - 1 )
+ .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
).replace( rtrim, "$1" ),
matcher,
i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
j < len && toSelector( tokens )
);
}
@@ -2513,28 +2674,40 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
+
// We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
+
// Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
len = elems.length;
if ( outermost ) {
- outermostContext = context === document || context || outermost;
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ outermostContext = context == document || context || outermost;
}
// Add elements passing elementMatchers directly to results
// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
- if ( !context && elem.ownerDocument !== document ) {
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( !context && elem.ownerDocument != document ) {
setDocument( elem );
xml = !documentIsHTML;
}
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
+ while ( ( matcher = elementMatchers[ j++ ] ) ) {
+ if ( matcher( elem, context || document, xml ) ) {
results.push( elem );
break;
}
@@ -2546,8 +2719,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
// Track unmatched elements for set filters
if ( bySet ) {
+
// They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
+ if ( ( elem = !matcher && elem ) ) {
matchedCount--;
}
@@ -2571,16 +2745,17 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
// numerically zero.
if ( bySet && i !== matchedCount ) {
j = 0;
- while ( (matcher = setMatchers[j++]) ) {
+ while ( ( matcher = setMatchers[ j++ ] ) ) {
matcher( unmatched, setMatched, context, xml );
}
if ( seed ) {
+
// Reintegrate element matches to eliminate the need for sorting
if ( matchedCount > 0 ) {
while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
+ if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
+ setMatched[ i ] = pop.call( results );
}
}
}
@@ -2621,13 +2796,14 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
cached = compilerCache[ selector + " " ];
if ( !cached ) {
+
// Generate a function of recursive functions that can be used to check each element
if ( !match ) {
match = tokenize( selector );
}
i = match.length;
while ( i-- ) {
- cached = matcherFromTokens( match[i] );
+ cached = matcherFromTokens( match[ i ] );
if ( cached[ expando ] ) {
setMatchers.push( cached );
} else {
@@ -2636,7 +2812,10 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
}
// Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ cached = compilerCache(
+ selector,
+ matcherFromGroupMatchers( elementMatchers, setMatchers )
+ );
// Save selector and tokenization
cached.selector = selector;
@@ -2656,7 +2835,7 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
+ match = !seed && tokenize( ( selector = compiled.selector || selector ) );
results = results || [];
@@ -2665,11 +2844,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
if ( match.length === 1 ) {
// Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
+ tokens = match[ 0 ] = match[ 0 ].slice( 0 );
+ if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
+ context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
+ .replace( runescape, funescape ), context ) || [] )[ 0 ];
if ( !context ) {
return results;
@@ -2682,20 +2862,22 @@ select = Sizzle.select = function( selector, context, results, seed ) {
}
// Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
while ( i-- ) {
- token = tokens[i];
+ token = tokens[ i ];
// Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
+ if ( Expr.relative[ ( type = token.type ) ] ) {
break;
}
- if ( (find = Expr.find[ type ]) ) {
+ if ( ( find = Expr.find[ type ] ) ) {
+
// Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
+ if ( ( seed = find(
+ token.matches[ 0 ].replace( runescape, funescape ),
+ rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
+ context
+ ) ) ) {
// If seed is empty or no tokens remain, we can return early
tokens.splice( i, 1 );
@@ -2726,7 +2908,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
// One-time assignments
// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
@@ -2737,58 +2919,59 @@ setDocument();
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( el ) {
+support.sortDetached = assert( function( el ) {
+
// Should return 1, but returns 4 (following)
- return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
-});
+ return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
+} );
// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( el ) {
+if ( !assert( function( el ) {
el.innerHTML = " ";
- return el.firstChild.getAttribute("href") === "#" ;
-}) ) {
+ return el.firstChild.getAttribute( "href" ) === "#";
+} ) ) {
addHandle( "type|href|height|width", function( elem, name, isXML ) {
if ( !isXML ) {
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
}
- });
+ } );
}
// Support: IE<9
// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( el ) {
+if ( !support.attributes || !assert( function( el ) {
el.innerHTML = " ";
el.firstChild.setAttribute( "value", "" );
return el.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
+} ) ) {
+ addHandle( "value", function( elem, _name, isXML ) {
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
return elem.defaultValue;
}
- });
+ } );
}
// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( el ) {
- return el.getAttribute("disabled") == null;
-}) ) {
+if ( !assert( function( el ) {
+ return el.getAttribute( "disabled" ) == null;
+} ) ) {
addHandle( booleans, function( elem, name, isXML ) {
var val;
if ( !isXML ) {
return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
+ ( val = elem.getAttributeNode( name ) ) && val.specified ?
val.value :
- null;
+ null;
}
- });
+ } );
}
return Sizzle;
-})( window );
+} )( window );
@@ -2848,11 +3031,9 @@ var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|
-var risSimple = /^.[^:#\[\.,]*$/;
-
// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
+ if ( isFunction( qualifier ) ) {
return jQuery.grep( elements, function( elem, i ) {
return !!qualifier.call( elem, i, elem ) !== not;
} );
@@ -2872,16 +3053,8 @@ function winnow( elements, qualifier, not ) {
} );
}
- // Simple selector that can be filtered directly, removing non-Elements
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- // Complex selector, compare the two sets, removing non-Elements
- qualifier = jQuery.filter( qualifier, elements );
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
- } );
+ // Filtered directly for both simple and complex selectors
+ return jQuery.filter( qualifier, elements, not );
}
jQuery.filter = function( expr, elems, not ) {
@@ -3002,7 +3175,7 @@ var rootjQuery,
for ( match in context ) {
// Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
+ if ( isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
// ...and otherwise set as attributes
@@ -3045,7 +3218,7 @@ var rootjQuery,
// HANDLE: $(function)
// Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
+ } else if ( isFunction( selector ) ) {
return root.ready !== undefined ?
root.ready( selector ) :
@@ -3167,7 +3340,7 @@ jQuery.each( {
parents: function( elem ) {
return dir( elem, "parentNode" );
},
- parentsUntil: function( elem, i, until ) {
+ parentsUntil: function( elem, _i, until ) {
return dir( elem, "parentNode", until );
},
next: function( elem ) {
@@ -3182,10 +3355,10 @@ jQuery.each( {
prevAll: function( elem ) {
return dir( elem, "previousSibling" );
},
- nextUntil: function( elem, i, until ) {
+ nextUntil: function( elem, _i, until ) {
return dir( elem, "nextSibling", until );
},
- prevUntil: function( elem, i, until ) {
+ prevUntil: function( elem, _i, until ) {
return dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
@@ -3195,18 +3368,24 @@ jQuery.each( {
return siblings( elem.firstChild );
},
contents: function( elem ) {
- if ( nodeName( elem, "iframe" ) ) {
- return elem.contentDocument;
- }
+ if ( elem.contentDocument != null &&
- // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
- // Treat the template element as a regular one in browsers that
- // don't support it.
- if ( nodeName( elem, "template" ) ) {
- elem = elem.content || elem;
- }
+ // Support: IE 11+
+ // elements with no `data` attribute has an object
+ // `contentDocument` with a `null` prototype.
+ getProto( elem.contentDocument ) ) {
- return jQuery.merge( [], elem.childNodes );
+ return elem.contentDocument;
+ }
+
+ // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
+ // Treat the template element as a regular one in browsers that
+ // don't support it.
+ if ( nodeName( elem, "template" ) ) {
+ elem = elem.content || elem;
+ }
+
+ return jQuery.merge( [], elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
@@ -3360,11 +3539,11 @@ jQuery.Callbacks = function( options ) {
( function add( args ) {
jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
+ if ( isFunction( arg ) ) {
if ( !options.unique || !self.has( arg ) ) {
list.push( arg );
}
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
+ } else if ( arg && arg.length && toType( arg ) !== "string" ) {
// Inspect recursively
add( arg );
@@ -3479,11 +3658,11 @@ function adoptValue( value, resolve, reject, noValue ) {
try {
// Check for promise aspect first to privilege synchronous behavior
- if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
+ if ( value && isFunction( ( method = value.promise ) ) ) {
method.call( value ).done( resolve ).fail( reject );
// Other thenables
- } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
+ } else if ( value && isFunction( ( method = value.then ) ) ) {
method.call( value, resolve, reject );
// Other non-thenables
@@ -3538,17 +3717,17 @@ jQuery.extend( {
var fns = arguments;
return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
+ jQuery.each( tuples, function( _i, tuple ) {
// Map tuples (progress, done, fail) to arguments (done, fail, progress)
- var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
+ var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
// deferred.progress(function() { bind to newDefer or newDefer.notify })
// deferred.done(function() { bind to newDefer or newDefer.resolve })
// deferred.fail(function() { bind to newDefer or newDefer.reject })
deferred[ tuple[ 1 ] ]( function() {
var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
+ if ( returned && isFunction( returned.promise ) ) {
returned.promise()
.progress( newDefer.notify )
.done( newDefer.resolve )
@@ -3602,7 +3781,7 @@ jQuery.extend( {
returned.then;
// Handle a returned thenable
- if ( jQuery.isFunction( then ) ) {
+ if ( isFunction( then ) ) {
// Special processors (notify) just wait for resolution
if ( special ) {
@@ -3698,7 +3877,7 @@ jQuery.extend( {
resolve(
0,
newDefer,
- jQuery.isFunction( onProgress ) ?
+ isFunction( onProgress ) ?
onProgress :
Identity,
newDefer.notifyWith
@@ -3710,7 +3889,7 @@ jQuery.extend( {
resolve(
0,
newDefer,
- jQuery.isFunction( onFulfilled ) ?
+ isFunction( onFulfilled ) ?
onFulfilled :
Identity
)
@@ -3721,7 +3900,7 @@ jQuery.extend( {
resolve(
0,
newDefer,
- jQuery.isFunction( onRejected ) ?
+ isFunction( onRejected ) ?
onRejected :
Thrower
)
@@ -3761,8 +3940,15 @@ jQuery.extend( {
// fulfilled_callbacks.disable
tuples[ 3 - i ][ 2 ].disable,
+ // rejected_handlers.disable
+ // fulfilled_handlers.disable
+ tuples[ 3 - i ][ 3 ].disable,
+
// progress_callbacks.lock
- tuples[ 0 ][ 2 ].lock
+ tuples[ 0 ][ 2 ].lock,
+
+ // progress_handlers.lock
+ tuples[ 0 ][ 3 ].lock
);
}
@@ -3832,7 +4018,7 @@ jQuery.extend( {
// Use .then() to unwrap secondary thenables (cf. gh-3000)
if ( master.state() === "pending" ||
- jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
+ isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
return master.then();
}
@@ -3960,7 +4146,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
bulk = key == null;
// Sets many values
- if ( jQuery.type( key ) === "object" ) {
+ if ( toType( key ) === "object" ) {
chainable = true;
for ( i in key ) {
access( elems, fn, i, key[ i ], true, emptyGet, raw );
@@ -3970,7 +4156,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
} else if ( value !== undefined ) {
chainable = true;
- if ( !jQuery.isFunction( value ) ) {
+ if ( !isFunction( value ) ) {
raw = true;
}
@@ -3984,7 +4170,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
// ...except when executing function values
} else {
bulk = fn;
- fn = function( elem, key, value ) {
+ fn = function( elem, _key, value ) {
return bulk.call( jQuery( elem ), value );
};
}
@@ -4012,6 +4198,23 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
return len ? fn( elems[ 0 ], key ) : emptyGet;
};
+
+
+// Matches dashed string for camelizing
+var rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([a-z])/g;
+
+// Used by camelCase as callback to replace()
+function fcamelCase( _all, letter ) {
+ return letter.toUpperCase();
+}
+
+// Convert dashed to camelCase; used by the css and data modules
+// Support: IE <=9 - 11, Edge 12 - 15
+// Microsoft forgot to hump their vendor prefix (#9572)
+function camelCase( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+}
var acceptData = function( owner ) {
// Accepts only:
@@ -4074,14 +4277,14 @@ Data.prototype = {
// Handle: [ owner, key, value ] args
// Always use camelCase key (gh-2257)
if ( typeof data === "string" ) {
- cache[ jQuery.camelCase( data ) ] = value;
+ cache[ camelCase( data ) ] = value;
// Handle: [ owner, { properties } ] args
} else {
// Copy the properties one-by-one to the cache object
for ( prop in data ) {
- cache[ jQuery.camelCase( prop ) ] = data[ prop ];
+ cache[ camelCase( prop ) ] = data[ prop ];
}
}
return cache;
@@ -4091,7 +4294,7 @@ Data.prototype = {
this.cache( owner ) :
// Always use camelCase key (gh-2257)
- owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];
+ owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
},
access: function( owner, key, value ) {
@@ -4139,9 +4342,9 @@ Data.prototype = {
// If key is an array of keys...
// We always set camelCase keys, so remove that.
- key = key.map( jQuery.camelCase );
+ key = key.map( camelCase );
} else {
- key = jQuery.camelCase( key );
+ key = camelCase( key );
// If a key with the spaces exists, use it.
// Otherwise, create an array by matching non-whitespace
@@ -4287,7 +4490,7 @@ jQuery.fn.extend( {
if ( attrs[ i ] ) {
name = attrs[ i ].name;
if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
+ name = camelCase( name.slice( 5 ) );
dataAttr( elem, name, data[ name ] );
}
}
@@ -4491,6 +4694,26 @@ var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+var documentElement = document.documentElement;
+
+
+
+ var isAttached = function( elem ) {
+ return jQuery.contains( elem.ownerDocument, elem );
+ },
+ composed = { composed: true };
+
+ // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
+ // Check attachment across shadow DOM boundaries when possible (gh-3504)
+ // Support: iOS 10.0-10.2 only
+ // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
+ // leading to errors. We need to check for `getRootNode`.
+ if ( documentElement.getRootNode ) {
+ isAttached = function( elem ) {
+ return jQuery.contains( elem.ownerDocument, elem ) ||
+ elem.getRootNode( composed ) === elem.ownerDocument;
+ };
+ }
var isHiddenWithinTree = function( elem, el ) {
// isHiddenWithinTree might be called from jQuery#filter function;
@@ -4505,37 +4728,15 @@ var isHiddenWithinTree = function( elem, el ) {
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
- jQuery.contains( elem.ownerDocument, elem ) &&
+ isAttached( elem ) &&
jQuery.css( elem, "display" ) === "none";
};
-var swap = function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
-};
-
-
function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
+ var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
@@ -4548,35 +4749,39 @@ function adjustCSS( elem, prop, valueParts, tween ) {
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
// Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+ initialInUnit = elem.nodeType &&
+ ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
rcssNum.exec( jQuery.css( elem, prop ) );
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+ // Support: Firefox <=54
+ // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
+ initial = initial / 2;
+
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
// Iteratively approximate from a nonzero starting point
initialInUnit = +initial || 1;
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
+ while ( maxIterations-- ) {
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
+ // Evaluate and update our best guess (doubling guesses that zero out).
+ // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
jQuery.style( elem, prop, initialInUnit + unit );
+ if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
+ maxIterations = 0;
+ }
+ initialInUnit = initialInUnit / scale;
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
+ }
+
+ initialInUnit = initialInUnit * 2;
+ jQuery.style( elem, prop, initialInUnit + unit );
+
+ // Make sure we update the tween properties later on
+ valueParts = valueParts || [];
}
if ( valueParts ) {
@@ -4692,17 +4897,46 @@ jQuery.fn.extend( {
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );
-var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
+var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
+var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
+( function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Android 4.0 - 4.3 only
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Android <=4.1 only
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE <=11 only
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
// Support: IE <=9 only
- option: [ 1, "", " " ],
+ // IE <=9 replaces tags with their contents when inserted outside of
+ // the select element.
+ div.innerHTML = " ";
+ support.option = !!div.lastChild;
+} )();
+
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
@@ -4715,12 +4949,14 @@ var wrapMap = {
_default: [ 0, "", "" ]
};
-// Support: IE <=9 only
-wrapMap.optgroup = wrapMap.option;
-
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
+// Support: IE <=9 only
+if ( !support.option ) {
+ wrapMap.optgroup = wrapMap.option = [ 1, "", " " ];
+}
+
function getAll( context, tag ) {
@@ -4764,7 +5000,7 @@ function setGlobalEval( elems, refElements ) {
var rhtml = /<|?\w+;/;
function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
+ var elem, tmp, tag, wrap, attached, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
@@ -4776,7 +5012,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
if ( elem || elem === 0 ) {
// Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
+ if ( toType( elem ) === "object" ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
@@ -4828,13 +5064,13 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
continue;
}
- contains = jQuery.contains( elem.ownerDocument, elem );
+ attached = isAttached( elem );
// Append to fragment
tmp = getAll( fragment.appendChild( elem ), "script" );
// Preserve script evaluation history
- if ( contains ) {
+ if ( attached ) {
setGlobalEval( tmp );
}
@@ -4853,34 +5089,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
}
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0 - 4.3 only
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Android <=4.1 only
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE <=11 only
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-var documentElement = document.documentElement;
-
-
-
var
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
@@ -4894,8 +5102,19 @@ function returnFalse() {
return false;
}
+// Support: IE <=9 - 11+
+// focus() and blur() are asynchronous, except when they are no-op.
+// So expect focus to be synchronous when the element is already active,
+// and blur to be synchronous when the element is not already active.
+// (focus and blur are always synchronous in other supported browsers,
+// this just defines when we can count on it).
+function expectSync( elem, type ) {
+ return ( elem === safeActiveElement() ) === ( type === "focus" );
+}
+
// Support: IE <=9 only
-// See #13393 for more info
+// Accessing document.activeElement can throw unexpectedly
+// https://bugs.jquery.com/ticket/13393
function safeActiveElement() {
try {
return document.activeElement;
@@ -4978,8 +5197,8 @@ jQuery.event = {
special, handlers, type, namespaces, origType,
elemData = dataPriv.get( elem );
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
+ // Only attach events to objects that accept data
+ if ( !acceptData( elem ) ) {
return;
}
@@ -5003,7 +5222,7 @@ jQuery.event = {
// Init the element's event structure and main handler, if this is the first
if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
+ events = elemData.events = Object.create( null );
}
if ( !( eventHandle = elemData.handle ) ) {
eventHandle = elemData.handle = function( e ) {
@@ -5161,12 +5380,15 @@ jQuery.event = {
dispatch: function( nativeEvent ) {
- // Make a writable jQuery.Event from the native event object
- var event = jQuery.event.fix( nativeEvent );
-
var i, j, ret, matched, handleObj, handlerQueue,
args = new Array( arguments.length ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( nativeEvent ),
+
+ handlers = (
+ dataPriv.get( this, "events" ) || Object.create( null )
+ )[ event.type ] || [],
special = jQuery.event.special[ event.type ] || {};
// Use the fix-ed jQuery.Event rather than the (read-only) native event
@@ -5195,9 +5417,10 @@ jQuery.event = {
while ( ( handleObj = matched.handlers[ j++ ] ) &&
!event.isImmediatePropagationStopped() ) {
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
+ // If the event is namespaced, then each handler is only invoked if it is
+ // specially universal or its namespaces are a superset of the event's.
+ if ( !event.rnamespace || handleObj.namespace === false ||
+ event.rnamespace.test( handleObj.namespace ) ) {
event.handleObj = handleObj;
event.data = handleObj.data;
@@ -5286,7 +5509,7 @@ jQuery.event = {
enumerable: true,
configurable: true,
- get: jQuery.isFunction( hook ) ?
+ get: isFunction( hook ) ?
function() {
if ( this.originalEvent ) {
return hook( this.originalEvent );
@@ -5321,39 +5544,51 @@ jQuery.event = {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
- focus: {
+ click: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- this.focus();
- return false;
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
+ // Utilize native event to ensure correct state for checkable inputs
+ setup: function( data ) {
+
+ // For mutual compressibility with _default, replace `this` access with a local var.
+ // `|| data` is dead code meant only to preserve the variable through minification.
+ var el = this || data;
+
+ // Claim the first handler
+ if ( rcheckableType.test( el.type ) &&
+ el.click && nodeName( el, "input" ) ) {
+
+ // dataPriv.set( el, "click", ... )
+ leverageNative( el, "click", returnTrue );
}
+
+ // Return false to allow normal processing in the caller
+ return false;
},
- delegateType: "focusout"
- },
- click: {
+ trigger: function( data ) {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
- this.click();
- return false;
+ // For mutual compressibility with _default, replace `this` access with a local var.
+ // `|| data` is dead code meant only to preserve the variable through minification.
+ var el = this || data;
+
+ // Force setup before triggering a click
+ if ( rcheckableType.test( el.type ) &&
+ el.click && nodeName( el, "input" ) ) {
+
+ leverageNative( el, "click" );
}
+
+ // Return non-false to allow normal event-path propagation
+ return true;
},
- // For cross-browser consistency, don't fire native .click() on links
+ // For cross-browser consistency, suppress native .click() on links
+ // Also prevent it if we're currently inside a leveraged native-event stack
_default: function( event ) {
- return nodeName( event.target, "a" );
+ var target = event.target;
+ return rcheckableType.test( target.type ) &&
+ target.click && nodeName( target, "input" ) &&
+ dataPriv.get( target, "click" ) ||
+ nodeName( target, "a" );
}
},
@@ -5367,8 +5602,95 @@ jQuery.event = {
}
}
}
- }
-};
+ }
+};
+
+// Ensure the presence of an event listener that handles manually-triggered
+// synthetic events by interrupting progress until reinvoked in response to
+// *native* events that it fires directly, ensuring that state changes have
+// already occurred before other listeners are invoked.
+function leverageNative( el, type, expectSync ) {
+
+ // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
+ if ( !expectSync ) {
+ if ( dataPriv.get( el, type ) === undefined ) {
+ jQuery.event.add( el, type, returnTrue );
+ }
+ return;
+ }
+
+ // Register the controller as a special universal handler for all event namespaces
+ dataPriv.set( el, type, false );
+ jQuery.event.add( el, type, {
+ namespace: false,
+ handler: function( event ) {
+ var notAsync, result,
+ saved = dataPriv.get( this, type );
+
+ if ( ( event.isTrigger & 1 ) && this[ type ] ) {
+
+ // Interrupt processing of the outer synthetic .trigger()ed event
+ // Saved data should be false in such cases, but might be a leftover capture object
+ // from an async native handler (gh-4350)
+ if ( !saved.length ) {
+
+ // Store arguments for use when handling the inner native event
+ // There will always be at least one argument (an event object), so this array
+ // will not be confused with a leftover capture object.
+ saved = slice.call( arguments );
+ dataPriv.set( this, type, saved );
+
+ // Trigger the native event and capture its result
+ // Support: IE <=9 - 11+
+ // focus() and blur() are asynchronous
+ notAsync = expectSync( this, type );
+ this[ type ]();
+ result = dataPriv.get( this, type );
+ if ( saved !== result || notAsync ) {
+ dataPriv.set( this, type, false );
+ } else {
+ result = {};
+ }
+ if ( saved !== result ) {
+
+ // Cancel the outer synthetic event
+ event.stopImmediatePropagation();
+ event.preventDefault();
+ return result.value;
+ }
+
+ // If this is an inner synthetic event for an event with a bubbling surrogate
+ // (focus or blur), assume that the surrogate already propagated from triggering the
+ // native event and prevent that from happening again here.
+ // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
+ // bubbling surrogate propagates *after* the non-bubbling base), but that seems
+ // less bad than duplication.
+ } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
+ event.stopPropagation();
+ }
+
+ // If this is a native event triggered above, everything is now in order
+ // Fire an inner synthetic event with the original arguments
+ } else if ( saved.length ) {
+
+ // ...and capture the result
+ dataPriv.set( this, type, {
+ value: jQuery.event.trigger(
+
+ // Support: IE <=9 - 11+
+ // Extend with the prototype to reset the above stopImmediatePropagation()
+ jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
+ saved.slice( 1 ),
+ this
+ )
+ } );
+
+ // Abort handling of the native event
+ event.stopImmediatePropagation();
+ }
+ }
+ } );
+}
jQuery.removeEvent = function( elem, type, handle ) {
@@ -5421,7 +5743,7 @@ jQuery.Event = function( src, props ) {
}
// Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
+ this.timeStamp = src && src.timeStamp || Date.now();
// Mark it as fixed
this[ jQuery.expando ] = true;
@@ -5482,6 +5804,7 @@ jQuery.each( {
shiftKey: true,
view: true,
"char": true,
+ code: true,
charCode: true,
key: true,
keyCode: true,
@@ -5528,6 +5851,33 @@ jQuery.each( {
}
}, jQuery.event.addProp );
+jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
+ jQuery.event.special[ type ] = {
+
+ // Utilize native event if possible so blur/focus sequence is correct
+ setup: function() {
+
+ // Claim the first handler
+ // dataPriv.set( this, "focus", ... )
+ // dataPriv.set( this, "blur", ... )
+ leverageNative( this, type, expectSync );
+
+ // Return false to allow normal processing in the caller
+ return false;
+ },
+ trigger: function() {
+
+ // Force setup before trigger
+ leverageNative( this, type );
+
+ // Return non-false to allow normal event-path propagation
+ return true;
+ },
+
+ delegateType: delegateType
+ };
+} );
+
// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
@@ -5613,21 +5963,13 @@ jQuery.fn.extend( {
var
- /* eslint-disable max-len */
-
- // See https://github.com/eslint/eslint/issues/3229
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
-
- /* eslint-enable */
-
- // Support: IE <=10 - 11, Edge 12 - 13
+ // Support: IE <=10 - 11, Edge 12 - 13 only
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
rnoInnerhtml = /
+ <% end %>
diff --git a/source/stylesheets/print.css.scss b/source/stylesheets/print.css.scss
index adf8b66bd5f..aea88c3065d 100644
--- a/source/stylesheets/print.css.scss
+++ b/source/stylesheets/print.css.scss
@@ -144,4 +144,10 @@ body {
aside.success:before {
@extend %icon-ok-sign;
}
-}
\ No newline at end of file
+}
+
+.copy-clipboard {
+ @media print {
+ display: none
+ }
+}
diff --git a/source/stylesheets/screen.css.scss b/source/stylesheets/screen.css.scss
index ed23b312215..deec095d5d2 100644
--- a/source/stylesheets/screen.css.scss
+++ b/source/stylesheets/screen.css.scss
@@ -617,3 +617,16 @@ html, body {
.highlight, .highlight .w {
background-color: $code-bg;
}
+
+.copy-clipboard {
+ float: right;
+ fill: #9DAAB6;
+ cursor: pointer;
+ opacity: 0.4;
+ height: 18px;
+ width: 18px;
+}
+
+.copy-clipboard:hover {
+ opacity: 0.8;
+}
From 513e78f0ad83bf1f3622234161c4fcf8f450ae91 Mon Sep 17 00:00:00 2001
From: Caleb Crane
Date: Sun, 21 Jun 2020 08:15:01 +0900
Subject: [PATCH 059/164] Fix handling ToC selectors that contain punctuation
(#1109)
Tools like go-swag can produce schemas with IDs that contain '.' and
other characters that are used in CSS notation. Those IDs can't be used
properly in a jQuery selector unless the special characters are escaped.
Co-authored-by: Matthew Peveler
---
source/javascripts/app/_toc.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/javascripts/app/_toc.js b/source/javascripts/app/_toc.js
index eb20fef93f2..6bb3bc9f0ff 100644
--- a/source/javascripts/app/_toc.js
+++ b/source/javascripts/app/_toc.js
@@ -38,7 +38,7 @@
$toc.find(tocLinkSelector).each(function() {
var targetId = $(this).attr('href');
if (targetId[0] === "#") {
- headerHeights[targetId] = $(targetId).offset().top;
+ headerHeights[targetId] = $("#" + $.escapeSelector(targetId.substring(1))).offset().top;
}
});
};
From 06478b9273ad159439c5c1a73dbcce10a4cca88a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 22 Jun 2020 01:27:07 +0300
Subject: [PATCH 060/164] fix language bar truncating long list of langs
(#1266)
Signed-off-by: Matthew Peveler
---
source/javascripts/all_nosearch.js | 10 ++++++++++
source/stylesheets/screen.css.scss | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/source/javascripts/all_nosearch.js b/source/javascripts/all_nosearch.js
index 8fa31583c3e..026e5a20039 100644
--- a/source/javascripts/all_nosearch.js
+++ b/source/javascripts/all_nosearch.js
@@ -3,6 +3,11 @@
//= require ./app/_toc
//= require ./app/_lang
+function adjustLanguageSelectorWidth() {
+ const elem = $('.dark-box > .lang-selector');
+ elem.width(elem.parent().width());
+}
+
$(function() {
loadToc($('#toc'), '.toc-link', '.toc-list-h2', 10);
setupLanguages($('body').data('languages'));
@@ -10,6 +15,11 @@ $(function() {
window.recacheHeights();
window.refreshToc();
});
+
+ $(window).resize(function() {
+ adjustLanguageSelectorWidth();
+ });
+ adjustLanguageSelectorWidth();
});
window.onpopstate = function() {
diff --git a/source/stylesheets/screen.css.scss b/source/stylesheets/screen.css.scss
index deec095d5d2..70e3527dfcf 100644
--- a/source/stylesheets/screen.css.scss
+++ b/source/stylesheets/screen.css.scss
@@ -278,12 +278,13 @@ html, body {
}
.lang-selector {
+ display: flex;
background-color: $lang-select-bg;
width: 100%;
font-weight: bold;
+ overflow-x: auto;
a {
- display: block;
- float:left;
+ display: inline;
color: $lang-select-text;
text-decoration: none;
padding: 0 10px;
From f390aba9a2d296da812d789ff054094bdf108b71 Mon Sep 17 00:00:00 2001
From: Andrew Lloyd Cartwright
Date: Sun, 21 Jun 2020 17:28:18 -0500
Subject: [PATCH 061/164] Strip HTML tags from ToC element with regex before
showing in title bar (#1120)
---
source/javascripts/app/_toc.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/javascripts/app/_toc.js b/source/javascripts/app/_toc.js
index 6bb3bc9f0ff..f70bdc0ff44 100644
--- a/source/javascripts/app/_toc.js
+++ b/source/javascripts/app/_toc.js
@@ -80,9 +80,9 @@
if (window.history.replaceState) {
window.history.replaceState(null, "", best);
}
- var thisTitle = $best.data("title")
+ var thisTitle = $best.data("title");
if (thisTitle !== undefined && thisTitle.length > 0) {
- document.title = thisTitle + " – " + originalTitle;
+ document.title = thisTitle.replace(htmlPattern, "") + " – " + originalTitle;
} else {
document.title = originalTitle;
}
From e28d4d674bd758663b497f953cbbf9bc596208d9 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 22 Jun 2020 23:29:20 +0300
Subject: [PATCH 062/164] cut 2.7.0 release (#1268)
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b6e1833ee0..a3fae4567ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
# Changelog
+## Version 2.7.0
+
+* June 21, 2020*
+
+* __[security]__ Bumped rack in Gemfile.lock from 2.2.2 to 2.2.3
+* Bumped bundled jQuery from 3.2.1 to 3.5.1
+* Bumped bundled lunr from 0.5.7 to 2.3.8
+* Bumped imagesloaded from 3.1.8 to 4.1.4
+* Bumped rouge from 3.17.0 to 3.20.0
+* Bumped redcarpet from 3.4.0 to 3.5.0
+* Fix color of highlighted code being unreadable when printing page
+* Add clipboard icon for "Copy to Clipboard" functionality to code boxes (see note below)
+* Fix handling of ToC selectors that contain punctutation (thanks @gruis)
+* Fix language bar truncating languages that overflow screen width
+* Strip HTML tags from ToC title before displaying it in title bar in JS (backup to stripping done in Ruby code) (thanks @atic)
+
+To enable the new clipboard icon, you need to add `code_clipboard: true` to the frontmatter of source/index.html.md.
+See [this line](https://github.com/slatedocs/slate/blame/master/source/index.html.md#L19) for an example of usage.
+
## Version 2.6.1
*May 30, 2020*
From a16b5b18b89c12cc52e963ff7b18e9d84af2bea1 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 22 Jun 2020 16:44:34 -0400
Subject: [PATCH 063/164] Remove extra space before date for 2.7.0
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3fae4567ec..92815ab8d8d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## Version 2.7.0
-* June 21, 2020*
+*June 21, 2020*
* __[security]__ Bumped rack in Gemfile.lock from 2.2.2 to 2.2.3
* Bumped bundled jQuery from 3.2.1 to 3.5.1
From ed7dd5347a06c488aa0b5cad827df5515520ce31 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 22 Jun 2020 16:48:45 -0400
Subject: [PATCH 064/164] Fix link from master to main branch
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92815ab8d8d..ad63e5f8cfa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,7 +17,7 @@
* Strip HTML tags from ToC title before displaying it in title bar in JS (backup to stripping done in Ruby code) (thanks @atic)
To enable the new clipboard icon, you need to add `code_clipboard: true` to the frontmatter of source/index.html.md.
-See [this line](https://github.com/slatedocs/slate/blame/master/source/index.html.md#L19) for an example of usage.
+See [this line](https://github.com/slatedocs/slate/blame/main/source/index.html.md#L19) for an example of usage.
## Version 2.6.1
From 27624c1dcae40f7a66afc2172492b3e981b66849 Mon Sep 17 00:00:00 2001
From: McKay Ward
Date: Wed, 24 Jun 2020 12:34:23 -0600
Subject: [PATCH 065/164] Remove merge conflict lines from README (#1274)
---
README.md | 3 ---
1 file changed, 3 deletions(-)
diff --git a/README.md b/README.md
index 28d0fa7c970..27c0149aac2 100644
--- a/README.md
+++ b/README.md
@@ -79,8 +79,6 @@ Thanks to the following people who have submitted major pull requests:
- [@cvkef](https://github.com/cvkef)
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
-<<<<<<< HEAD
-=======
Special Thanks
--------------------
@@ -88,4 +86,3 @@ Special Thanks
- [middleman-syntax](https://github.com/middleman/middleman-syntax)
- [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages)
- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
->>>>>>> Update JavaScript dependencies (#1248)
From b7e80e6d4652fbe5a3c7d26efe8d91cf63a558a3 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Fri, 31 Jul 2020 08:52:39 -0400
Subject: [PATCH 066/164] Bump rouge from 3.20.0 to 3.21.0 (#1285)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.20.0 to 3.21.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.20.0...v3.21.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile | 2 +-
Gemfile.lock | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 315a86d0945..4dc664df2f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,7 +6,7 @@ gem 'middleman', '~>4.3'
gem 'middleman-syntax', '~> 3.2'
gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
-gem 'rouge', '~> 3.20'
+gem 'rouge', '~> 3.21'
gem 'redcarpet', '~> 3.5.0'
gem 'nokogiri', '~> 1.10.8'
gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index b3db4b0e841..c7957e60e2d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -93,7 +93,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.0)
- rouge (3.20.0)
+ rouge (3.21.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
@@ -124,7 +124,7 @@ DEPENDENCIES
middleman-syntax (~> 3.2)
nokogiri (~> 1.10.8)
redcarpet (~> 3.5.0)
- rouge (~> 3.20)
+ rouge (~> 3.21)
sass
RUBY VERSION
From d2e11a393f82f21cbe9ad7595d0dbcf3ba306915 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Fri, 31 Jul 2020 08:53:11 -0400
Subject: [PATCH 067/164] Bump nokogiri from 1.10.9 to 1.10.10 (#1282)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.9 to 1.10.10.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.9...v1.10.10)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index c7957e60e2d..252d92ac616 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -78,7 +78,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
- nokogiri (1.10.9)
+ nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
From 616df6223adc885cd568f154f8246ca830899c8a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 10 Aug 2020 10:26:12 -0400
Subject: [PATCH 068/164] trim ending newline on copied code (#1296)
Signed-off-by: Matthew Peveler
---
source/javascripts/app/_copy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/javascripts/app/_copy.js b/source/javascripts/app/_copy.js
index f1e3a432566..4dfbbb6c06d 100644
--- a/source/javascripts/app/_copy.js
+++ b/source/javascripts/app/_copy.js
@@ -1,6 +1,6 @@
function copyToClipboard(container) {
const el = document.createElement('textarea');
- el.value = container.textContent;
+ el.value = container.textContent.replace(/\n$/, '');
document.body.appendChild(el);
el.select();
document.execCommand('copy');
From 985a75aa3c05960f11fb0554a117b8d3a132b72b Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 10 Aug 2020 10:42:37 -0400
Subject: [PATCH 069/164] Rework docker image to be easier to use for
development and deployment (#1297)
Signed-off-by: Matthew Peveler
---
Dockerfile | 8 +-
slate.sh | 248 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 254 insertions(+), 2 deletions(-)
create mode 100755 slate.sh
diff --git a/Dockerfile b/Dockerfile
index 33b80ca4216..c74158d5bf9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,9 @@ FROM ruby:2.6-slim
WORKDIR /srv/slate
+VOLUME /srv/slate/build
VOLUME /srv/slate/source
+
EXPOSE 4567
COPY . /srv/slate
@@ -15,6 +17,8 @@ RUN apt-get update \
&& bundle install \
&& apt-get remove -y build-essential \
&& apt-get autoremove -y \
- && rm -rf /var/lib/apt/lists/*
+ && rm -rf /var/lib/apt/lists/* \
+ && chmod +x /srv/slate/slate.sh
-CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
+ENTRYPOINT ["/srv/slate/slate.sh"]
+CMD ["build"]
diff --git a/slate.sh b/slate.sh
new file mode 100755
index 00000000000..a3cc498e99a
--- /dev/null
+++ b/slate.sh
@@ -0,0 +1,248 @@
+#!/usr/bin/env bash
+set -o errexit #abort if any command fails
+
+me=$(basename "$0")
+
+help_message="\
+Usage: $me [] []
+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
From 49b341864ab1d33d213f6674549e750add376bc6 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 13 Aug 2020 13:35:50 -0400
Subject: [PATCH 070/164] Bump middleman from 4.3.7 to 4.3.8 (#1302)
Bumps [middleman](https://github.com/middleman/middleman) from 4.3.7 to 4.3.8.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Changelog](https://github.com/middleman/middleman/blob/master/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman/compare/v4.3.7...v4.3.8)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 252d92ac616..d108095f806 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,19 +10,19 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.17.2)
+ backports (3.18.1)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.1.6)
+ concurrent-ruby (1.1.7)
contracts (0.13.0)
- dotenv (2.7.5)
+ dotenv (2.7.6)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
- fastimage (2.1.7)
- ffi (1.12.2)
+ fastimage (2.2.0)
+ ffi (1.13.1)
haml (5.1.2)
temple (>= 0.8.0)
tilt
@@ -31,23 +31,24 @@ GEM
hashie (3.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- kramdown (1.17.0)
+ kramdown (2.3.0)
+ rexml
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.7)
+ middleman (4.3.8)
coffee-script (~> 2.2)
haml (>= 4.0.5)
- kramdown (~> 1.2)
- middleman-cli (= 4.3.7)
- middleman-core (= 4.3.7)
+ kramdown (>= 2.3.0)
+ middleman-cli (= 4.3.8)
+ middleman-core (= 4.3.8)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.7)
+ middleman-cli (4.3.8)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.7)
+ middleman-core (4.3.8)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
backports (~> 3.6)
@@ -86,20 +87,21 @@ GEM
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
- parallel (1.19.1)
+ parallel (1.19.2)
public_suffix (4.0.5)
rack (2.2.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.0)
+ rexml (3.2.4)
rouge (3.21.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sassc (2.3.0)
+ sassc (2.4.0)
ffi (~> 1.9)
servolux (0.13.0)
sprockets (3.7.2)
From cdd5c6287133895931bb035179723f68107a05e6 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 13 Aug 2020 13:35:50 -0400
Subject: [PATCH 071/164] Bump middleman from 4.3.7 to 4.3.8 (#1302)
Bumps [middleman](https://github.com/middleman/middleman) from 4.3.7 to 4.3.8.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Changelog](https://github.com/middleman/middleman/blob/master/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman/compare/v4.3.7...v4.3.8)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index b3db4b0e841..dc76f571e8a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,19 +10,19 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.17.2)
+ backports (3.18.1)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.1.6)
+ concurrent-ruby (1.1.7)
contracts (0.13.0)
- dotenv (2.7.5)
+ dotenv (2.7.6)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
- fastimage (2.1.7)
- ffi (1.12.2)
+ fastimage (2.2.0)
+ ffi (1.13.1)
haml (5.1.2)
temple (>= 0.8.0)
tilt
@@ -31,23 +31,24 @@ GEM
hashie (3.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- kramdown (1.17.0)
+ kramdown (2.3.0)
+ rexml
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.7)
+ middleman (4.3.8)
coffee-script (~> 2.2)
haml (>= 4.0.5)
- kramdown (~> 1.2)
- middleman-cli (= 4.3.7)
- middleman-core (= 4.3.7)
+ kramdown (>= 2.3.0)
+ middleman-cli (= 4.3.8)
+ middleman-core (= 4.3.8)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.7)
+ middleman-cli (4.3.8)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.7)
+ middleman-core (4.3.8)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
backports (~> 3.6)
@@ -86,20 +87,21 @@ GEM
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
- parallel (1.19.1)
+ parallel (1.19.2)
public_suffix (4.0.5)
rack (2.2.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.0)
+ rexml (3.2.4)
rouge (3.20.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sassc (2.3.0)
+ sassc (2.4.0)
ffi (~> 1.9)
servolux (0.13.0)
sprockets (3.7.2)
From 6f24a0df7a5d5f2a0517a69728818a65d67c60aa Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 13 Aug 2020 13:42:52 -0400
Subject: [PATCH 072/164] cut 2.7.1 release
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad63e5f8cfa..30b9e1f1713 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## Version 2.7.1
+
+*August 13, 2020*
+
+* __[security]__ Bumped middleman from 4.3.7 to 4.3.8
+
+_Note_: Slate uses redcarpet, not kramdown, for rendering markdown to HTML, and so was unaffected by the security vulnerability in middleman.
+If you have changed slate to use kramdown, and with GFM, you may need to install the `kramdown-parser-gfm` gem.
+
## Version 2.7.0
*June 21, 2020*
From 7441d835628080ac7923baa176ae158342862d4a Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 10 Sep 2020 12:28:30 -0400
Subject: [PATCH 073/164] Add deploy to gh-pages for dev branch (#1305)
Signed-off-by: Matthew Peveler
---
.github/workflows/deploy.yml | 1 +
.github/workflows/dev_deploy.yml | 36 ++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 .github/workflows/dev_deploy.yml
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 8df9d720a38..c6c318c6465 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -32,3 +32,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
+ keep_files: true
diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml
new file mode 100644
index 00000000000..48bffe1e694
--- /dev/null
+++ b/.github/workflows/dev_deploy.yml
@@ -0,0 +1,36 @@
+name: Dev Deploy
+
+on:
+ push:
+ branches: [ 'dev' ]
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ env:
+ ruby-version: 2.5
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ env.ruby-version }}
+
+ - uses: actions/cache@v1
+ with:
+ path: vendor/bundle
+ key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+
+ - run: bundle config set deployment 'true'
+ - run: bundle install
+
+ - run: bundle exec middleman build
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3.7.0-8
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ destination_dir: dev
+ publish_dir: ./build
+ keep_files: true
From db503c93fe6e03bbbde321dbe450776e5cc82802 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 10 Sep 2020 12:47:29 -0400
Subject: [PATCH 074/164] update actions/cache to v2 for gh workflows (#1314)
Signed-off-by: Matthew Peveler
---
.github/workflows/build.yml | 10 ++++++++--
.github/workflows/deploy.yml | 12 +++++++++---
.github/workflows/dev_deploy.yml | 12 +++++++++---
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3d55c61d605..c9ec0eccb13 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,16 +21,22 @@ jobs:
with:
ruby-version: ${{ matrix.ruby-version }}
- - uses: actions/cache@v1
+ - uses: actions/cache@v2
with:
path: vendor/bundle
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+ restore-keys: |
+ gems-${{ runner.os }}-${{ matrix.ruby-version }}-
+ gems-${{ runner.os }}-
# necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache
# can remove once ruby 2.3 is no longer supported
- run: gem update --system
- run: bundle config set deployment 'true'
- - run: bundle install
+ - name: bundle install
+ run: |
+ bundle config path vendor/bundle
+ bundle install --jobs 4 --retry 3
- run: bundle exec middleman build
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c6c318c6465..341cd5f7fbc 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -17,13 +17,19 @@ jobs:
with:
ruby-version: ${{ env.ruby-version }}
- - uses: actions/cache@v1
+ - uses: actions/cache@v2
with:
path: vendor/bundle
- key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+ key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+ restore-keys: |
+ gems-${{ runner.os }}-${{ matrix.ruby-version }}-
+ gems-${{ runner.os }}-
- run: bundle config set deployment 'true'
- - run: bundle install
+ - name: bundle install
+ run: |
+ bundle config path vendor/bundle
+ bundle install --jobs 4 --retry 3
- run: bundle exec middleman build
diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml
index 48bffe1e694..5a655b8ced8 100644
--- a/.github/workflows/dev_deploy.yml
+++ b/.github/workflows/dev_deploy.yml
@@ -17,13 +17,19 @@ jobs:
with:
ruby-version: ${{ env.ruby-version }}
- - uses: actions/cache@v1
+ - uses: actions/cache@v2
with:
path: vendor/bundle
- key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+ key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
+ restore-keys: |
+ gems-${{ runner.os }}-${{ matrix.ruby-version }}-
+ gems-${{ runner.os }}-
- run: bundle config set deployment 'true'
- - run: bundle install
+ - name: bundle install
+ run: |
+ bundle config path vendor/bundle
+ bundle install --jobs 4 --retry 3
- run: bundle exec middleman build
From 1f9f3a2f6a6cf2a32877b1da0393241b47140017 Mon Sep 17 00:00:00 2001
From: Mike Ralphson
Date: Thu, 10 Sep 2020 17:55:45 +0100
Subject: [PATCH 075/164] Remove outdated special thanks section in README.md
(#1307)
---
README.md | 7 -------
1 file changed, 7 deletions(-)
diff --git a/README.md b/README.md
index 27c0149aac2..7d15f8646eb 100644
--- a/README.md
+++ b/README.md
@@ -79,10 +79,3 @@ Thanks to the following people who have submitted major pull requests:
- [@cvkef](https://github.com/cvkef)
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
-
-Special Thanks
---------------------
-- [Middleman](https://github.com/middleman/middleman)
-- [middleman-syntax](https://github.com/middleman/middleman-syntax)
-- [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages)
-- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
From 54d594c314e23c83cf330d630902d4c5fe37669b Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 10 Sep 2020 14:25:43 -0400
Subject: [PATCH 076/164] Bump rouge from 3.21.0 to 3.23.0 (#1311)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.21.0 to 3.23.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.21.0...v3.23.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index d108095f806..9546c674524 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -95,7 +95,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.0)
rexml (3.2.4)
- rouge (3.21.0)
+ rouge (3.23.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
From e3137324fa876dd01382e7ad86cb807e73087063 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Fri, 11 Sep 2020 11:45:34 -0400
Subject: [PATCH 077/164] Bump middleman from 4.3.8 to 4.3.10 (#1316)
Bumps [middleman](https://github.com/middleman/middleman) from 4.3.8 to 4.3.10.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Changelog](https://github.com/middleman/middleman/blob/master/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman/compare/v4.3.8...v4.3.10)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 9546c674524..4a2429e3577 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.2.4.3)
+ activesupport (5.2.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -10,7 +10,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.18.1)
+ backports (3.18.2)
coffee-script (2.4.1)
coffee-script-source
execjs
@@ -37,18 +37,18 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.8)
+ middleman (4.3.10)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (>= 2.3.0)
- middleman-cli (= 4.3.8)
- middleman-core (= 4.3.8)
+ middleman-cli (= 4.3.10)
+ middleman-core (= 4.3.10)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.8)
+ middleman-cli (4.3.10)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.8)
+ middleman-core (4.3.10)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
backports (~> 3.6)
@@ -78,7 +78,7 @@ GEM
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.4.0)
- minitest (5.14.1)
+ minitest (5.14.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
padrino-helpers (0.13.3.4)
@@ -88,7 +88,7 @@ GEM
padrino-support (0.13.3.4)
activesupport (>= 3.1)
parallel (1.19.2)
- public_suffix (4.0.5)
+ public_suffix (4.0.6)
rack (2.2.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
From b3f5fcb6f0d799ea13fdc06b19dbb9b66071524d Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Wed, 16 Sep 2020 21:26:10 -0400
Subject: [PATCH 078/164] Bump middleman from 4.3.10 to 4.3.11 (#1319)
Bumps [middleman](https://github.com/middleman/middleman) from 4.3.10 to 4.3.11.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Changelog](https://github.com/middleman/middleman/blob/master/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman/commits)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 4a2429e3577..7f71a1b423f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -37,18 +37,18 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.10)
+ middleman (4.3.11)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (>= 2.3.0)
- middleman-cli (= 4.3.10)
- middleman-core (= 4.3.10)
+ middleman-cli (= 4.3.11)
+ middleman-core (= 4.3.11)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.10)
+ middleman-cli (4.3.11)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.10)
+ middleman-core (4.3.11)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
backports (~> 3.6)
From 3af62c84a5e6a9adcc1e2b03ef76db48e5a88533 Mon Sep 17 00:00:00 2001
From: Mike Ralphson
Date: Wed, 23 Sep 2020 04:07:24 +0100
Subject: [PATCH 079/164] upgrade lunr to 2.3.9 (#1325)
Signed-off-by: Mike Ralphson
---
source/javascripts/lib/_lunr.js | 34 ++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/source/javascripts/lib/_lunr.js b/source/javascripts/lib/_lunr.js
index c3537658a62..6aa370fbcb7 100644
--- a/source/javascripts/lib/_lunr.js
+++ b/source/javascripts/lib/_lunr.js
@@ -1,6 +1,6 @@
/**
- * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8
- * Copyright (C) 2019 Oliver Nightingale
+ * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
+ * Copyright (C) 2020 Oliver Nightingale
* @license MIT
*/
@@ -54,10 +54,10 @@ var lunr = function (config) {
return builder.build()
}
-lunr.version = "2.3.8"
+lunr.version = "2.3.9"
/*!
* lunr.utils
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
@@ -177,7 +177,7 @@ lunr.FieldRef.prototype.toString = function () {
}
/*!
* lunr.Set
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
@@ -211,8 +211,8 @@ lunr.Set.complete = {
return other
},
- union: function (other) {
- return other
+ union: function () {
+ return this
},
contains: function () {
@@ -389,7 +389,7 @@ lunr.Token.prototype.clone = function (fn) {
}
/*!
* 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.Pipeline
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
@@ -732,7 +732,7 @@ lunr.Pipeline.prototype.toJSON = function () {
}
/*!
* lunr.Vector
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
@@ -929,7 +929,7 @@ lunr.Vector.prototype.toJSON = function () {
/* eslint-disable */
/*!
* lunr.stemmer
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
*/
@@ -1151,7 +1151,7 @@ lunr.stemmer = (function(){
lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')
/*!
* 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.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.TokenSet
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
@@ -1827,7 +1827,7 @@ lunr.TokenSet.Builder.prototype.minimize = function (downTo) {
}
/*!
* 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],
terms = null,
- clauseMatches = lunr.Set.complete
+ clauseMatches = lunr.Set.empty
if (clause.usePipeline) {
terms = this.pipeline.runString(clause.term, {
@@ -2319,7 +2319,7 @@ lunr.Index.load = function (serializedIndex) {
}
/*!
* lunr.Builder
- * Copyright (C) 2019 Oliver Nightingale
+ * Copyright (C) 2020 Oliver Nightingale
*/
/**
From de961f53addd699af8ac222cb37f2407a4bd2186 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 15 Oct 2020 19:35:53 -0400
Subject: [PATCH 080/164] Bump rouge from 3.23.0 to 3.24.0 (#1334)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.23.0 to 3.24.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.23.0...v3.24.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 7f71a1b423f..18dd6ad2ff4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -95,7 +95,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.0)
rexml (3.2.4)
- rouge (3.23.0)
+ rouge (3.24.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
From 779658de7bf58e29a6531a4a31fe33c4f142c5e1 Mon Sep 17 00:00:00 2001
From: Michael Bang
Date: Mon, 26 Oct 2020 19:31:15 +0100
Subject: [PATCH 081/164] Dockerfile: allow Docker to cache build steps (#1336)
- By having a `COPY . xx` step before installing dependencies, we rob
Docker of the opportunity to cache downloading and building dependencies
if we make any changes to any files in the repository. By copying only
Gemfiles before the build step, we only require Docker to rebuild
dependencies when the Gemfiles have changed.
Co-authored-by: Matthew Peveler
---
Dockerfile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index c74158d5bf9..efb59a3c711 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,8 @@ VOLUME /srv/slate/source
EXPOSE 4567
-COPY . /srv/slate
+COPY Gemfile .
+COPY Gemfile.lock .
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -17,8 +18,11 @@ RUN apt-get update \
&& bundle install \
&& apt-get remove -y build-essential \
&& apt-get autoremove -y \
- && rm -rf /var/lib/apt/lists/* \
- && chmod +x /srv/slate/slate.sh
+ && rm -rf /var/lib/apt/lists/*
+
+COPY . /srv/slate
+
+RUN chmod +x /srv/slate/slate.sh
ENTRYPOINT ["/srv/slate/slate.sh"]
CMD ["build"]
From 0e242e323be13253dbdd3bfc02ea004af5b56e6c Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 27 Oct 2020 20:42:44 +0200
Subject: [PATCH 082/164] add docker deploy step to github workflows (#1321)
Signed-off-by: Matthew Peveler
---
.github/workflows/dev_deploy.yml | 8 ++++++++
.github/workflows/publish.yml | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 .github/workflows/publish.yml
diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml
index 5a655b8ced8..7f1a40abf5d 100644
--- a/.github/workflows/dev_deploy.yml
+++ b/.github/workflows/dev_deploy.yml
@@ -33,6 +33,14 @@ jobs:
- run: bundle exec middleman build
+ - name: Push to Docker Hub
+ uses: docker/build-push-action@v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_ACCESS_KEY }}
+ repository: slatedocs/slate
+ tag_with_ref: true
+
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.0-8
with:
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 00000000000..d57930a5842
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,22 @@
+name: Publish Docker image
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ push_to_registry:
+ name: Push Docker image to Docker Hub
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v2
+
+ - name: Push to Docker Hub
+ uses: docker/build-push-action@v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_ACCESS_KEY }}
+ repository: slatedocs/slate
+ tag_with_ref: true
+ tags: latest
From e40f9be0c03c1a5405f235054156150f9be60069 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 27 Oct 2020 20:47:45 +0200
Subject: [PATCH 083/164] Fix shell code examples to have line continuations
(#1324)
---
source/index.html.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/source/index.html.md b/source/index.html.md
index 1bf6780af1d..f4be8c6a762 100644
--- a/source/index.html.md
+++ b/source/index.html.md
@@ -45,7 +45,7 @@ api = kittn.authorize('meowmeowmeow')
```shell
# With shell, you can just pass the correct header with each request
-curl "api_endpoint_here"
+curl "api_endpoint_here" \
-H "Authorization: meowmeowmeow"
```
@@ -86,7 +86,7 @@ api.kittens.get()
```
```shell
-curl "http://example.com/api/kittens"
+curl "http://example.com/api/kittens" \
-H "Authorization: meowmeowmeow"
```
@@ -152,7 +152,7 @@ api.kittens.get(2)
```
```shell
-curl "http://example.com/api/kittens/2"
+curl "http://example.com/api/kittens/2" \
-H "Authorization: meowmeowmeow"
```
@@ -206,8 +206,8 @@ api.kittens.delete(2)
```
```shell
-curl "http://example.com/api/kittens/2"
- -X DELETE
+curl "http://example.com/api/kittens/2" \
+ -X DELETE \
-H "Authorization: meowmeowmeow"
```
From 24b1d1fd51c0a8bc3016bd6b85e4a48d267bfe20 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 27 Oct 2020 19:21:49 +0000
Subject: [PATCH 084/164] cut 2.8.0 release
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30b9e1f1713..1ffe3eb851a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## 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
*August 13, 2020*
From ede86c358f6fd917b29c88ddc0972b123d86af5d Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 10 Nov 2020 20:29:26 +0200
Subject: [PATCH 085/164] Update command to fetch latest commit for issue
template (#1342)
Signed-off-by: Matthew Peveler
---
.github/ISSUE_TEMPLATE/bug.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
index 25fcdb1d2e0..43305a233da 100644
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -18,5 +18,5 @@ If applicable, add screenshots to help explain your problem.
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
-**Last upstream Slate commit (run `git log --author="Robert Lord" | head -n 1`):**
+**Last upstream Slate commit (run `git log --author="\(Robert Lord\)\|\(Matthew Peveler\)\|\(Mike Ralphson\)" | head -n 1`):**
Put the commit hash here
From d46c55f9427532f53f2276b7a87cb0434d4e7437 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Wed, 28 Oct 2020 02:41:28 +0000
Subject: [PATCH 086/164] add docker version badge to README
Signed-off-by: Matthew Peveler
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 7d15f8646eb..134dd8d5505 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
+
Slate helps you create beautiful, intelligent, responsive API documentation.
From e546ad54c52d56089fee9c1376f18598d6408264 Mon Sep 17 00:00:00 2001
From: Victor E F
Date: Wed, 16 Dec 2020 18:22:51 -0800
Subject: [PATCH 087/164] Fix vagrant issue: use exact version of bundler
(#1355)
I was getting this error, ''Cant find gem bundler (>= 0.a) with
executable bundle', after I ran `vagrant up`. The version of RubyGem
installed in the vagrant box cannot find the exact version of Bundler
listed in Gemfile.lock. This solution ensures that the exact bundler
version installed in Gemfile.lock is installed before running `bundle
install`.
The issue is solved in RubyGems >= 2.7.10 and Ruby >=2.6.3. This
solution ensures a fix without requiring a more complicated upgrade.
More information found here: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
---
Vagrantfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Vagrantfile b/Vagrantfile
index 4166fb6ba24..200839d0222 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -28,6 +28,7 @@ Vagrant.configure(2) do |config|
echo "=============================================="
echo "Installing app dependencies"
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 install
SHELL
From b9638521ba0a52a3297208a4838e92fa51e96991 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Wed, 11 Nov 2020 02:06:01 -0500
Subject: [PATCH 088/164] Bump rouge from 3.24.0 to 3.25.0 (#1343)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.24.0...v3.25.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 18dd6ad2ff4..e49209fd93a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -95,7 +95,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.0)
rexml (3.2.4)
- rouge (3.24.0)
+ rouge (3.25.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
From a3dee6a20decdfcdb6f40f8b50f2660b6be86f88 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Wed, 9 Dec 2020 11:07:02 -0500
Subject: [PATCH 089/164] Bump rouge from 3.25.0 to 3.26.0 (#1350)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.25.0 to 3.26.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.25.0...v3.26.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index e49209fd93a..b4bd9841dac 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -95,7 +95,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.5.0)
rexml (3.2.4)
- rouge (3.25.0)
+ rouge (3.26.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
From b5ac2a195b53a296a4b7bb77eda1a06cc8ebe417 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Wed, 16 Dec 2020 09:29:23 -0500
Subject: [PATCH 090/164] Bump redcarpet from 3.5.0 to 3.5.1 (#1352)
Bumps [redcarpet](https://github.com/vmg/redcarpet) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/vmg/redcarpet/releases)
- [Changelog](https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmg/redcarpet/compare/v3.5.0...v3.5.1)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index b4bd9841dac..b902df12dcd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -93,7 +93,7 @@ GEM
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
- redcarpet (3.5.0)
+ redcarpet (3.5.1)
rexml (3.2.4)
rouge (3.26.0)
sass (3.7.4)
From 10d4a53a54c76aa74261c11943ad982c6eeb3711 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Wed, 16 Dec 2020 21:23:04 -0500
Subject: [PATCH 091/164] Update link to ruby languages in README (#1351)
Signed-off-By: Matthew Peveler
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 134dd8d5505..c51483a2af5 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Features
* **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/jneen/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required.
+* **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.
From a1e14a57505cd1a72b76d9f605cea9b56e8b0976 Mon Sep 17 00:00:00 2001
From: Courtenay
Date: Thu, 14 Jan 2021 05:22:25 -0800
Subject: [PATCH 092/164] Remove scale from README examples (#1363)
They've switched to readme.io
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index c51483a2af5..2744e63b7a8 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,6 @@ Companies Using Slate
* [Clearbit](https://clearbit.com/docs)
* [Coinbase](https://developers.coinbase.com/api)
* [Parrot Drones](http://developer.parrot.com/docs/bebop/)
-* [Scale](https://docs.scaleapi.com/)
You can view more in [the list on the wiki](https://github.com/slatedocs/slate/wiki/Slate-in-the-Wild).
From 72f91e286fa5b2a542387322ebc7d1e14aaef481 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 14 Jan 2021 08:37:51 -0500
Subject: [PATCH 093/164] Drop support for Ruby 2.3 and 2.4 (#1366)
Signed-off-By: Matthew Peveler
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c9ec0eccb13..434c8d0933d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
- ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7]
+ ruby-version: [2.5, 2.6, 2.7]
steps:
- uses: actions/checkout@v2
From 6163c81ed05ec4736482395d854d6b6062bf5c67 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 14 Jan 2021 13:15:48 -0500
Subject: [PATCH 094/164] Update supported ruby version in Gemfile
Signed-off-by: Matthew Peveler
---
Gemfile | 2 +-
Gemfile.lock | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Gemfile b/Gemfile
index 4dc664df2f5..1f8df435e5d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,4 @@
-ruby '>=2.3.1'
+ruby '>=2.5.0'
source 'https://rubygems.org'
# Middleman
diff --git a/Gemfile.lock b/Gemfile.lock
index b902df12dcd..0db6d0e22f2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -130,7 +130,7 @@ DEPENDENCIES
sass
RUBY VERSION
- ruby 2.3.3p222
+ ruby 2.7.2p137
BUNDLED WITH
2.1.4
From 6e9d009138623d5f37501354d08f49c2e49030f7 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Fri, 15 Jan 2021 13:38:56 -0500
Subject: [PATCH 095/164] [Security] Bump nokogiri from 1.10.10 to 1.11.0
(#1360)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.0. **This update includes a security fix.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.0)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile | 2 +-
Gemfile.lock | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Gemfile b/Gemfile
index 1f8df435e5d..c71cf80580f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,5 +8,5 @@ gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
gem 'rouge', '~> 3.21'
gem 'redcarpet', '~> 3.5.0'
-gem 'nokogiri', '~> 1.10.8'
+gem 'nokogiri', '~> 1.11.0'
gem 'sass'
diff --git a/Gemfile.lock b/Gemfile.lock
index 0db6d0e22f2..f57b015d88a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -77,10 +77,11 @@ GEM
middleman-syntax (3.2.0)
middleman-core (>= 3.2)
rouge (~> 3.2)
- mini_portile2 (2.4.0)
+ mini_portile2 (2.5.0)
minitest (5.14.2)
- nokogiri (1.10.10)
- mini_portile2 (~> 2.4.0)
+ nokogiri (1.11.0)
+ mini_portile2 (~> 2.5.0)
+ racc (~> 1.4)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
@@ -89,6 +90,7 @@ GEM
activesupport (>= 3.1)
parallel (1.19.2)
public_suffix (4.0.6)
+ racc (1.5.2)
rack (2.2.3)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
@@ -124,7 +126,7 @@ DEPENDENCIES
middleman-autoprefixer (~> 2.7)
middleman-sprockets (~> 4.1)
middleman-syntax (~> 3.2)
- nokogiri (~> 1.10.8)
+ nokogiri (~> 1.11.0)
redcarpet (~> 3.5.0)
rouge (~> 3.21)
sass
From 200e4c0383a961ed6478352a22aedd16e21984cc Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Mon, 18 Jan 2021 13:21:53 -0500
Subject: [PATCH 096/164] Bump nokogiri from 1.11.0 to 1.11.1 (#1370)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.0...v1.11.1)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index f57b015d88a..5b7dd0add06 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -79,7 +79,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.5.0)
minitest (5.14.2)
- nokogiri (1.11.0)
+ nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
From b56d145c7b476defa54f26bbb409cf4ce4e254fe Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 18 Jan 2021 13:25:59 -0500
Subject: [PATCH 097/164] Update changelog for 2.9.0
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ffe3eb851a..1e29f7b5484 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
## Version 2.8.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
+* Bump rouge from 3.24.0 to 3.26.0
+
*October 27, 2020*
* Remove last trailing newline when using the copy code button
From 11bcd78f38a126027744db19421663b04a62f59c Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 18 Jan 2021 13:39:54 -0500
Subject: [PATCH 098/164] Specify slate is not Ruby 3.0 compatible
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 1 +
Gemfile | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1e29f7b5484..dcf544971ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
* __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
*October 27, 2020*
diff --git a/Gemfile b/Gemfile
index c71cf80580f..a10cfaf39a6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,4 @@
-ruby '>=2.5.0'
+ruby '~> 2.5'
source 'https://rubygems.org'
# Middleman
From e3a3a3a8b4d66e4168525bf61a918e3e3964563c Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 26 Jan 2021 17:25:03 -0500
Subject: [PATCH 099/164] Fix changelog entry for 2.9.0
---
CHANGELOG.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dcf544971ca..a5505099e90 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
# Changelog
-## Version 2.8.0
+## Version 2.9.0
*January 19, 2021*
@@ -10,6 +10,8 @@
* 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
From 681f4818a50510ffa6965e3d4803f48e75d78f57 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 25 Feb 2021 09:25:55 -0500
Subject: [PATCH 100/164] Add guards around localStorage in case user disables
it (#1399)
Signed-off-by: Matthew Peveler
---
source/javascripts/app/_lang.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/source/javascripts/app/_lang.js b/source/javascripts/app/_lang.js
index 0fbaaef7046..cc5ac8b6bd8 100644
--- a/source/javascripts/app/_lang.js
+++ b/source/javascripts/app/_lang.js
@@ -129,11 +129,16 @@ under the License.
history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash);
// save language as next default
- localStorage.setItem("language", language);
+ if (localStorage) {
+ localStorage.setItem("language", language);
+ }
}
function setupLanguages(l) {
- var defaultLanguage = localStorage.getItem("language");
+ var defaultLanguage = null;
+ if (localStorage) {
+ defaultLanguage = localStorage.getItem("language");
+ }
languages = l;
@@ -142,7 +147,9 @@ under the License.
// the language is in the URL, so use that language!
activateLanguage(presetLanguage);
- localStorage.setItem("language", presetLanguage);
+ if (localStorage) {
+ localStorage.setItem("language", presetLanguage);
+ }
} else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
// the language was the last selected one saved in localstorage, so use that language!
activateLanguage(defaultLanguage);
From 8488edf2d7eec2a28d035b36f3df130811a29bed Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Sat, 27 Feb 2021 18:44:13 -0500
Subject: [PATCH 101/164] cut 2.9.1 release (#1400)
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5505099e90..a16fae977dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## Version 2.9.1
+
+*February 27, 2021*
+
+* Fix Slate language tabs not working if localStorage is disabled
+
## Version 2.9.0
*January 19, 2021*
From 9aed5466f31fb14d1de6b08e3e7dc522b8a1438c Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Sun, 14 Mar 2021 18:32:12 -0400
Subject: [PATCH 102/164] Bump nokogiri from 1.11.1 to 1.11.2 (#1407)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.11.2)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 5b7dd0add06..48491a59659 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -79,7 +79,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.5.0)
minitest (5.14.2)
- nokogiri (1.11.1)
+ nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
From 3519c551cf3974be028cc81c0d9c569ee0596b92 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Mon, 29 Mar 2021 18:23:03 -0400
Subject: [PATCH 103/164] [Security] Bump kramdown from 2.3.0 to 2.3.1 (#1416)
Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1. **This update includes a security fix.**
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 48491a59659..2173034d5a0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -31,7 +31,7 @@ GEM
hashie (3.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- kramdown (2.3.0)
+ kramdown (2.3.1)
rexml
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
From fa3a7cf165aa7caf3313f483ffc42c25093fccad Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Tue, 30 Mar 2021 07:44:29 -0400
Subject: [PATCH 104/164] cut 2.9.2 release
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a16fae977dd..564f0f34d1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## 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*
From e08e38cdc17dad7b7ac62512b1c6b3f7dadc8434 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 8 Apr 2021 07:54:29 -0400
Subject: [PATCH 105/164] Bump nokogiri from 1.11.2 to 1.11.3 (#1425)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.3)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 2173034d5a0..254c1ada4f4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -79,7 +79,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.5.0)
minitest (5.14.2)
- nokogiri (1.11.2)
+ nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
From bf2f1ebbec3e72727c9c56a6768ad87b253b8b85 Mon Sep 17 00:00:00 2001
From: Shaun VanWeelden
Date: Thu, 8 Apr 2021 14:06:38 -0500
Subject: [PATCH 106/164] Make slate compatible with ruby 3.0.0 (#1424)
---
.github/workflows/build.yml | 2 +-
Gemfile | 5 +-
Gemfile.lock | 97 +++++++++++++++++++++----------------
3 files changed, 59 insertions(+), 45 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 434c8d0933d..f705b7e7af4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
- ruby-version: [2.5, 2.6, 2.7]
+ ruby-version: [2.5, 2.6, 2.7, 3.0]
steps:
- uses: actions/checkout@v2
diff --git a/Gemfile b/Gemfile
index a10cfaf39a6..3897dffde8f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,8 +1,8 @@
-ruby '~> 2.5'
+ruby '>= 2.5'
source 'https://rubygems.org'
# Middleman
-gem 'middleman', '~>4.3'
+gem 'middleman', :github => 'middleman/middleman', :branch => '4.x'
gem 'middleman-syntax', '~> 3.2'
gem 'middleman-autoprefixer', '~> 2.7'
gem 'middleman-sprockets', '~> 4.1'
@@ -10,3 +10,4 @@ gem 'rouge', '~> 3.21'
gem 'redcarpet', '~> 3.5.0'
gem 'nokogiri', '~> 1.11.0'
gem 'sass'
+gem 'webrick'
diff --git a/Gemfile.lock b/Gemfile.lock
index 254c1ada4f4..f247941e0bf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,46 @@
+GIT
+ remote: https://github.com/middleman/middleman.git
+ revision: 0c950d82f6f4f540e8572195f80c9a9fb15ab80c
+ branch: 4.x
+ specs:
+ middleman (4.3.11)
+ coffee-script (~> 2.2)
+ haml (>= 4.0.5)
+ kramdown (>= 2.3.0)
+ middleman-cli (= 4.3.11)
+ middleman-core (= 4.3.11)
+ middleman-cli (4.3.11)
+ thor (>= 0.17.0, < 2.0)
+ middleman-core (4.3.11)
+ activesupport (>= 4.2, < 6.0)
+ addressable (~> 2.3)
+ backports (~> 3.6)
+ bundler (~> 2.0)
+ contracts (~> 0.13.0)
+ dotenv
+ erubis
+ execjs (~> 2.0)
+ fast_blank
+ fastimage (~> 2.0)
+ hamster (~> 3.0)
+ hashie (~> 3.4)
+ i18n (~> 0.9.0)
+ listen (~> 3.0.0)
+ memoist (~> 0.14)
+ padrino-helpers (~> 0.13.0)
+ parallel
+ rack (>= 1.4.5, < 3)
+ sassc (~> 2.0)
+ servolux
+ tilt (~> 2.0.9)
+ toml
+ uglifier (~> 3.0)
+ webrick
+
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.2.4.4)
+ activesupport (5.2.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -10,7 +49,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
execjs
- backports (3.18.2)
+ backports (3.21.0)
coffee-script (2.4.1)
coffee-script-source
execjs
@@ -21,9 +60,9 @@ GEM
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
- fastimage (2.2.0)
+ fastimage (2.2.3)
ffi (1.13.1)
- haml (5.1.2)
+ haml (5.2.1)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
@@ -37,40 +76,9 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.11)
- coffee-script (~> 2.2)
- haml (>= 4.0.5)
- kramdown (>= 2.3.0)
- middleman-cli (= 4.3.11)
- middleman-core (= 4.3.11)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (~> 9.1)
middleman-core (>= 3.3.3)
- middleman-cli (4.3.11)
- thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.11)
- activesupport (>= 4.2, < 6.0)
- addressable (~> 2.3)
- backports (~> 3.6)
- bundler
- contracts (~> 0.13.0)
- dotenv
- erubis
- execjs (~> 2.0)
- fast_blank
- fastimage (~> 2.0)
- hamster (~> 3.0)
- hashie (~> 3.4)
- i18n (~> 0.9.0)
- listen (~> 3.0.0)
- memoist (~> 0.14)
- padrino-helpers (~> 0.13.0)
- parallel
- rack (>= 1.4.5, < 3)
- sassc (~> 2.0)
- servolux
- tilt (~> 2.0.9)
- uglifier (~> 3.0)
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
@@ -78,7 +86,7 @@ GEM
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.5.0)
- minitest (5.14.2)
+ minitest (5.14.4)
nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
@@ -88,7 +96,8 @@ GEM
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
- parallel (1.19.2)
+ parallel (1.20.1)
+ parslet (1.8.2)
public_suffix (4.0.6)
racc (1.5.2)
rack (2.2.3)
@@ -96,7 +105,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
- rexml (3.2.4)
+ rexml (3.2.5)
rouge (3.26.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
@@ -110,19 +119,22 @@ GEM
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
temple (0.8.2)
- thor (1.0.1)
+ thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
- tzinfo (1.2.7)
+ toml (0.2.0)
+ parslet (~> 1.8.0)
+ tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
+ webrick (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
- middleman (~> 4.3)
+ middleman!
middleman-autoprefixer (~> 2.7)
middleman-sprockets (~> 4.1)
middleman-syntax (~> 3.2)
@@ -130,9 +142,10 @@ DEPENDENCIES
redcarpet (~> 3.5.0)
rouge (~> 3.21)
sass
+ webrick
RUBY VERSION
ruby 2.7.2p137
BUNDLED WITH
- 2.1.4
+ 2.2.15
From 161eb66382724881909181cf5e677eba0d1c0fea Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 8 Apr 2021 15:24:53 -0400
Subject: [PATCH 107/164] Add git to Dockerfile (#1426)
Signed-off-by: Matthew Peveler
---
Dockerfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index efb59a3c711..504da654d10 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,10 +13,11 @@ COPY Gemfile.lock .
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
+ git \
nodejs \
&& gem install bundler \
&& bundle install \
- && apt-get remove -y build-essential \
+ && apt-get remove -y build-essential git \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
From 91ae1d2110b8f6cafba4e9894f29f65161b9dcbf Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Tue, 13 Apr 2021 08:33:45 -0400
Subject: [PATCH 108/164] Bump middleman from `0c950d8` to `d180ca3` (#1427)
Bumps [middleman](https://github.com/middleman/middleman) from `0c950d8` to `d180ca3`.
- [Release notes](https://github.com/middleman/middleman/releases)
- [Commits](https://github.com/middleman/middleman/compare/0c950d82f6f4f540e8572195f80c9a9fb15ab80c...d180ca337202873f2601310c74ba2b6b4cf063ec)
Signed-off-by: dependabot-preview[bot]
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
Gemfile.lock | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index f247941e0bf..e2f55c62802 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/middleman/middleman.git
- revision: 0c950d82f6f4f540e8572195f80c9a9fb15ab80c
+ revision: d180ca337202873f2601310c74ba2b6b4cf063ec
branch: 4.x
specs:
middleman (4.3.11)
@@ -12,7 +12,7 @@ GIT
middleman-cli (4.3.11)
thor (>= 0.17.0, < 2.0)
middleman-core (4.3.11)
- activesupport (>= 4.2, < 6.0)
+ activesupport (>= 4.2, < 6.1)
addressable (~> 2.3)
backports (~> 3.6)
bundler (~> 2.0)
@@ -40,11 +40,12 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.2.5)
+ activesupport (6.0.3.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
+ zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.5.1.1)
@@ -54,14 +55,14 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.1.7)
+ concurrent-ruby (1.1.8)
contracts (0.13.0)
dotenv (2.7.6)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
fastimage (2.2.3)
- ffi (1.13.1)
+ ffi (1.15.0)
haml (5.2.1)
temple (>= 0.8.0)
tilt
@@ -129,6 +130,7 @@ GEM
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
webrick (1.7.0)
+ zeitwerk (2.4.2)
PLATFORMS
ruby
From 7a555b5c29283baaf40b141f1b295f00429d3e56 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Thu, 15 Apr 2021 21:33:25 -0400
Subject: [PATCH 109/164] cut 2.10.0 release (#1428)
Signed-off-by: Matthew Peveler
---
CHANGELOG.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 564f0f34d1a..55dfc05a6cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 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*
From 50c927185f26affbdb47e6fa08a92f13900f4ab5 Mon Sep 17 00:00:00 2001
From: "dependabot-preview[bot]"
<27856297+dependabot-preview[bot]@users.noreply.github.com>
Date: Thu, 29 Apr 2021 00:36:22 -0400
Subject: [PATCH 110/164] Upgrade to GitHub-native Dependabot (#1435)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
---
.github/dependabot.yml | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 .github/dependabot.yml
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..d17e8826d4f
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,9 @@
+version: 2
+updates:
+- package-ecosystem: bundler
+ directory: "/"
+ schedule:
+ interval: daily
+ open-pull-requests-limit: 10
+ target-branch: dev
+ versioning-strategy: increase-if-necessary
From 838257283b256f76931ef2a6614c76388b63461f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 24 May 2021 13:18:47 -0400
Subject: [PATCH 111/164] Bump nokogiri from 1.11.3 to 1.11.5 (#1446)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
Gemfile.lock | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index e2f55c62802..17ba5b84dc5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -86,9 +86,9 @@ GEM
middleman-syntax (3.2.0)
middleman-core (>= 3.2)
rouge (~> 3.2)
- mini_portile2 (2.5.0)
+ mini_portile2 (2.5.1)
minitest (5.14.4)
- nokogiri (1.11.3)
+ nokogiri (1.11.5)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
From 3164dd97e0a4ae0c38175eebf87d4ad3aeee8f9e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 24 May 2021 13:19:11 -0400
Subject: [PATCH 112/164] Bump middleman-autoprefixer from 2.10.1 to 3.0.0
(#1445)
Bumps [middleman-autoprefixer](https://github.com/middleman/middleman-autoprefixer) from 2.10.1 to 3.0.0.
- [Release notes](https://github.com/middleman/middleman-autoprefixer/releases)
- [Changelog](https://github.com/middleman/middleman-autoprefixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/middleman/middleman-autoprefixer/compare/v2.10.1...v3.0.0)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
Gemfile | 2 +-
Gemfile.lock | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Gemfile b/Gemfile
index 3897dffde8f..17231cf17fa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
# Middleman
gem 'middleman', :github => 'middleman/middleman', :branch => '4.x'
gem 'middleman-syntax', '~> 3.2'
-gem 'middleman-autoprefixer', '~> 2.7'
+gem 'middleman-autoprefixer', '~> 3.0'
gem 'middleman-sprockets', '~> 4.1'
gem 'rouge', '~> 3.21'
gem 'redcarpet', '~> 3.5.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 17ba5b84dc5..2bb2e152e12 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -40,7 +40,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- activesupport (6.0.3.6)
+ activesupport (6.0.3.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -48,8 +48,8 @@ GEM
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
- autoprefixer-rails (9.5.1.1)
- execjs
+ autoprefixer-rails (10.2.5.0)
+ execjs (< 2.8.0)
backports (3.21.0)
coffee-script (2.4.1)
coffee-script-source
@@ -77,9 +77,9 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman-autoprefixer (2.10.1)
- autoprefixer-rails (~> 9.1)
- middleman-core (>= 3.3.3)
+ middleman-autoprefixer (3.0.0)
+ autoprefixer-rails (~> 10.0)
+ middleman-core (>= 4.0.0)
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
@@ -102,7 +102,7 @@ GEM
public_suffix (4.0.6)
racc (1.5.2)
rack (2.2.3)
- rb-fsevent (0.10.4)
+ rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
@@ -137,7 +137,7 @@ PLATFORMS
DEPENDENCIES
middleman!
- middleman-autoprefixer (~> 2.7)
+ middleman-autoprefixer (~> 3.0)
middleman-sprockets (~> 4.1)
middleman-syntax (~> 3.2)
nokogiri (~> 1.11.0)
From 56f452f4341dd67b06d638f8ac2192731d854491 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 31 May 2021 10:30:52 -0400
Subject: [PATCH 113/164] Bump nokogiri from 1.11.5 to 1.11.6 (#1450)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.5 to 1.11.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.5...v1.11.6)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
Gemfile.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 2bb2e152e12..0e2d5c73995 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -88,7 +88,7 @@ GEM
rouge (~> 3.2)
mini_portile2 (2.5.1)
minitest (5.14.4)
- nokogiri (1.11.5)
+ nokogiri (1.11.6)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
padrino-helpers (0.13.3.4)
From ef098323185e4f46b4208ad0eacc0efa3d0098e2 Mon Sep 17 00:00:00 2001
From: Matthew Peveler
Date: Mon, 31 May 2021 11:31:41 -0400
Subject: [PATCH 114/164] Support specifying custom meta tags in YAML (#1453)
---
source/layouts/layout.erb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb
index c125d66a98f..20309180464 100644
--- a/source/layouts/layout.erb
+++ b/source/layouts/layout.erb
@@ -29,6 +29,15 @@ under the License.
+ <% if current_page.data.key?('meta') %>
+ <% current_page.data.meta.each do |meta| %>
+
+ <%= "#{key}=\"#{value}\"" %>
+ <% end %>
+ >
+ <% end %>
+ <% end %>
<%= current_page.data.title || "API Documentation" %>