This should fix the deprecation warnings the plugin is throwing with Jekyll 3.0.
```
Deprecation: Document#slug is now a key in the #data hash.
Called by /home/tim/.rvm/gems/ruby-2.2.3/gems/algoliasearch-jekyll-0.5.3/lib/record_extractor.rb:35:in `metadata'.
Deprecation: Document#tags is now a key in the #data hash.
Called by /home/tim/.rvm/gems/ruby-2.2.3/gems/algoliasearch-jekyll-0.5.3/lib/record_extractor.rb:53:in `tags'.
```
I've fighted hard, but we can now launch the tests for both Jekyll 2.5 and Jekyll 3.0 (everything is in `./scripts`), and write tests conditionnaly for one version or the other.
The tool to do that is [appraisal](https://github.com/thoughtbot/appraisal) that lets you define several Gemfiles, and you then have to prefix all your `bundle` commands with `appraisal` (so, yeah, you end up with silly `appraisal bundle exec rake stuff`).
I had to duplicate the fixtures, for each version, which explain the large number of file changed, but this is just a copy paste (except the `_config.yml` that is different for each jekyll version)
10 lines
143 B
Bash
Executable File
10 lines
143 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
./scripts/test || exit 1
|
|
|
|
# No over-complex methods
|
|
./scripts/check_flog || exit 1
|
|
|
|
# No duplication
|
|
./scripts/check_flay
|