Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

fix(v3): Stop throwing deprecation warning when using Jekyll v3 #19

Merged
merged 2 commits into from Jan 11, 2016

Conversation

pixelastic
Copy link
Contributor

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 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)

Fixes #14

@pixelastic pixelastic force-pushed the fix/jekyll-v3 branch 6 times, most recently from 900669c to be7c6fd Compare January 7, 2016 00:33
@pixelastic
Copy link
Contributor Author

image

Haha, will fix that later.

@pixelastic
Copy link
Contributor Author

image
💥 back to 💯%

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)
pixelastic added a commit that referenced this pull request Jan 11, 2016
fix(v3): Stop throwing deprecation warning when using Jekyll v3
@pixelastic pixelastic merged commit 37b85fc into develop Jan 11, 2016
@pixelastic pixelastic deleted the fix/jekyll-v3 branch January 11, 2016 08:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant