Skip to content

Commit

Permalink
Test the gem with Jekyll versions 3 and 4
Browse files Browse the repository at this point in the history
  • Loading branch information
tkareine committed Mar 1, 2020
1 parent 74bbe7b commit de878ab
Show file tree
Hide file tree
Showing 9 changed files with 264 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*.gem
/.bundle/
/Gemfile.lock
/node_modules/
/test/fixture/site/.jekyll-cache/
/test/fixture/site/_site/
/vendor/
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ rvm:
- 2.5.7
- 2.6.5
- 2.7.0
gemfile:
- Gemfile-jekyll3
- Gemfile-jekyll4
jobs:
exclude:
- rvm: 2.3.8
gemfile: Gemfile-jekyll4
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- gem update bundler
32 changes: 32 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Development

Use [Bundler] to install project dependencies. Because we support Jekyll
versions 3 and 4, we have separate [Gemfiles][BundlerGemfile] for
installing dependencies:

* [Gemfile-jekyll3](Gemfile-jekyll3) for Jekyll 3
* [Gemfile-jekyll3](Gemfile-jekyll4) for Jekyll 4

Install dependencies for the selected Gemfile:

``` shell
BUNDLE_GEMFILE=Gemfile-jekyll4 bundle install
```

Use the [Rakefile](Rakefile) to run common tasks. To see the tasks
available:

``` shell
BUNDLE_GEMFILE=Gemfile-jekyll4 bundle exec rake -D
```

Run linter ([Rubocop]) and tests:

``` shell
BUNDLE_GEMFILE=Gemfile-jekyll4 bundle exec rake
```

[BundlerGemfile]: https://bundler.io/v2.0/man/gemfile.5.html
[Bundler]: https://bundler.io/
[Jekyll]: https://jekyllrb.com/
[Rubocop]: https://docs.rubocop.org/en/stable/
5 changes: 5 additions & 0 deletions Gemfile → Gemfile-jekyll3
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# frozen_string_literal: true

source 'https://rubygems.org/'

gemspec

group :development do
gem 'jekyll', '~> 3.0'
end
101 changes: 101 additions & 0 deletions Gemfile-jekyll3.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
PATH
remote: .
specs:
jekyll-minibundle (2.2.0)

GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0)
benchmark-ips (2.7.2)
coderay (1.1.2)
colorator (1.1.0)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.12.2)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jekyll (3.8.6)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
parallel (1.19.1)
parser (2.7.0.3)
ast (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
rainbow (3.0.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.16.0)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
safe_yaml (1.0.5)
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)
unicode-display_width (1.6.1)

PLATFORMS
ruby

DEPENDENCIES
benchmark-ips (~> 2.7)
jekyll (~> 3.0)
jekyll-minibundle!
minitest (~> 5.8)
nokogiri (~> 1.6)
pry (~> 0.10)
rake (~> 13.0)
rubocop (~> 0.80.1)

BUNDLED WITH
2.1.4
9 changes: 9 additions & 0 deletions Gemfile-jekyll4
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

source 'https://rubygems.org/'

gemspec

group :development do
gem 'jekyll', '~> 4.0'
end
104 changes: 104 additions & 0 deletions Gemfile-jekyll4.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
PATH
remote: .
specs:
jekyll-minibundle (2.2.0)

GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0)
benchmark-ips (2.7.2)
coderay (1.1.2)
colorator (1.1.0)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.12.2)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jekyll (4.0.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.1.0)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
parallel (1.19.1)
parser (2.7.0.3)
ast (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
rainbow (3.0.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.16.0)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
safe_yaml (1.0.5)
sassc (2.2.1)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.6.1)

PLATFORMS
ruby

DEPENDENCIES
benchmark-ips (~> 2.7)
jekyll (~> 4.0)
jekyll-minibundle!
minitest (~> 5.8)
nokogiri (~> 1.6)
pry (~> 0.10)
rake (~> 13.0)
rubocop (~> 0.80.1)

BUNDLED WITH
2.1.4
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ cache busting.
There are no runtime dependencies, except for the minification tool used
for bundling (fingerprinting has no dependencies).

The plugin requires Jekyll version 3.x. It is tested with Ruby MRI 2.3
and later. Ruby 1.8 and 1.9 are *not* supported.
The plugin requires Jekyll version 3 or 4. It is tested with Ruby MRI
2.3 and later.

The plugin works with Jekyll's watch mode (auto-regeneration, Jekyll
option `--watch`), but not with incremental feature enabled (Jekyll
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ task :test do

extra_opts = ENV['DEBUG'] ? '-w -rpp -rpry ' : ''

puts "Jekyll version: #{Gem::Specification.find_by_name('jekyll').version}"
sh "ruby -I lib:test #{extra_opts}#{run_selected_or_all}"
end

namespace :fixture do
CLEAN.include 'test/fixture/site/_site'

desc 'Generate fixture site'
desc 'Generate fixture site (tests use it, this task allows manual inspection)'
task :build do
run_jekyll_in_fixture_site('build')
end
Expand Down

0 comments on commit de878ab

Please sign in to comment.