algoliasearch-jekyll 0.9.1 → 1.0.0.beta.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/CONTRIBUTING.md +8 -1
- data/Gemfile +4 -5
- data/README.md +318 -11
- data/Rakefile +7 -12
- data/algoliasearch-jekyll.gemspec +66 -62
- data/gemfiles/jekyll_v2.gemfile +3 -3
- data/gemfiles/jekyll_v3.gemfile +4 -4
- data/gemfiles/jekyll_v3_1_3.gemfile +24 -0
- data/gemfiles/jekyll_v3_1_6.gemfile +24 -0
- data/lib/algoliasearch-jekyll.rb +1 -3
- data/lib/credential_checker.rb +2 -1
- data/lib/error_handler.rb +6 -0
- data/lib/push.rb +81 -19
- data/lib/record_extractor.rb +120 -140
- data/lib/utils.rb +13 -0
- data/lib/version.rb +1 -1
- data/scripts/release +13 -12
- data/scripts/test_v3 +1 -1
- data/scripts/watch +4 -0
- data/spec/error_handler_spec.rb +17 -0
- data/spec/fixtures/jekyll_version_2/404.html +8 -0
- data/spec/fixtures/jekyll_version_2/404.md +9 -0
- data/spec/fixtures/jekyll_version_2/_my-collection/collection-item.md +3 -0
- data/spec/fixtures/jekyll_version_2/_posts/2015-07-02-test-post.md +1 -1
- data/spec/fixtures/jekyll_version_2/about.md +3 -0
- data/spec/fixtures/jekyll_version_2/front_matter.md +15 -0
- data/spec/fixtures/jekyll_version_2/index.html +3 -1
- data/spec/fixtures/jekyll_version_2/only-divs.md +15 -0
- data/spec/fixtures/jekyll_version_2/only-paragraphs.md +15 -0
- data/spec/fixtures/jekyll_version_3/404.html +8 -0
- data/spec/fixtures/jekyll_version_3/404.md +9 -0
- data/spec/fixtures/jekyll_version_3/_config.yml +1 -1
- data/spec/fixtures/jekyll_version_3/_my-collection/collection-item.md +3 -0
- data/spec/fixtures/jekyll_version_3/_posts/2015-07-02-test-post.md +1 -1
- data/spec/fixtures/jekyll_version_3/about.md +3 -0
- data/spec/fixtures/jekyll_version_3/front_matter.md +15 -0
- data/spec/fixtures/jekyll_version_3/index.html +4 -1
- data/spec/fixtures/jekyll_version_3/only-divs.md +15 -0
- data/spec/fixtures/jekyll_version_3/only-paragraphs.md +15 -0
- data/spec/push_spec.rb +211 -8
- data/spec/record_extractor_spec.rb +296 -358
- data/spec/spec_helper.rb +32 -11
- data/txt/record_too_big +19 -0
- metadata +40 -51
- data/scripts/watch +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 214ae0a5e7ebbc65907d8ad0992d966336752d13
|
4
|
+
data.tar.gz: b0bf6063d62e3ed7f340607f509dc2466aa31b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 367334786b413eccd82c884d9e2dc116d244b22805ac8b149bb44a2d1a6a2036fbc3e7b8dfdeb8803e973e0aa1cd25e29199d4e44c3b3da84257e7337a7a1485
|
7
|
+
data.tar.gz: 303abcbc5b798aca9443fb5ea6605b0e828d21b4ba608c187ef43a46ed82827edceacf5848928b2f30894306606a58a472895f865ec5109554489f43d7e7fa0c
|
data/.travis.yml
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -35,8 +35,11 @@ If you want to test the plugin on an existing Jekyll website while developping,
|
|
35
35
|
I suggest updating the website `Gemfile` to point to the correct local directory
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
|
38
|
+
group :jekyll_plugins do
|
39
|
+
gem "algoliasearch-jekyll", :path => "/path/to/local/gem/folder"
|
40
|
+
end
|
39
41
|
```
|
42
|
+
|
40
43
|
You should also run `rake gemspec` from the `algoliasearch-jekyll` repository if
|
41
44
|
you added/deleted any file or dependency.
|
42
45
|
|
@@ -59,5 +62,9 @@ This part is for main contributors:
|
|
59
62
|
rake install
|
60
63
|
```
|
61
64
|
|
65
|
+
# Project owner
|
66
|
+
|
67
|
+
[@pixelastic](https://github.com/pixelastic)
|
68
|
+
|
62
69
|
|
63
70
|
|
data/Gemfile
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'algoliasearch', '~> 1.
|
3
|
+
gem 'algoliasearch', '~> 1.4'
|
4
4
|
gem 'appraisal', '~> 2.1.0'
|
5
5
|
gem 'awesome_print', '~> 1.6'
|
6
|
-
gem 'json', '
|
7
|
-
gem 'nokogiri', '~> 1.
|
6
|
+
gem 'json', '~> 1.8'
|
7
|
+
gem 'nokogiri', '~> 1.6'
|
8
|
+
gem 'html-hierarchy-extractor', '~> 1.0'
|
8
9
|
gem 'verbal_expressions', '~> 0.1.5'
|
9
10
|
|
10
11
|
group :development do
|
11
|
-
gem 'rake', '< 11.0'
|
12
12
|
gem 'coveralls', '~> 0.8'
|
13
13
|
gem 'flay', '~> 2.6'
|
14
14
|
gem 'flog', '~> 4.3'
|
@@ -17,5 +17,4 @@ group :development do
|
|
17
17
|
gem 'rspec', '~> 3.0'
|
18
18
|
gem 'rubocop', '~> 0.31'
|
19
19
|
gem 'simplecov', '~> 0.10'
|
20
|
-
gem "rack", "< 2"
|
21
20
|
end
|
data/README.md
CHANGED
@@ -1,17 +1,324 @@
|
|
1
|
-
# Algolia Jekyll Plugin
|
1
|
+
# Algolia Jekyll Plugin
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version][1]](http://badge.fury.io/rb/algoliasearch-jekyll)
|
4
|
+
[![Build Status][2]](https://travis-ci.org/algolia/algoliasearch-jekyll)
|
5
|
+
[![Coverage Status][3]](https://coveralls.io/github/algolia/algoliasearch-jekyll?branch=master)
|
6
|
+
[![Code Climate][4]](https://codeclimate.com/github/algolia/algoliasearch-jekyll)
|
7
|
+

|
4
8
|
|
5
|
-
|
9
|
+
Jekyll plugin to automatically index your Jekyll posts and pages into an
|
10
|
+
Algolia index by running `bundle exec jekyll algolia push`.
|
6
11
|
|
7
|
-
|
12
|
+
## Usage
|
8
13
|
|
9
|
-
|
10
|
-
|
14
|
+
```shell
|
15
|
+
$ bundle exec jekyll algolia push
|
16
|
+
```
|
11
17
|
|
12
|
-
|
13
|
-
=======
|
18
|
+
This will push the content of your jekyll website to your Algolia index.
|
14
19
|
|
15
|
-
|
16
|
-
|
17
|
-
|
20
|
+
You can specify any option you would pass to `jekyll build`, like
|
21
|
+
`--config`, `--source`, `--destination`, etc.
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
|
25
|
+
First, add the `algoliasearch-jekyll` gem to your `Gemfile`, in the
|
26
|
+
`:jekyll_plugins` section. If you do not yet have a `Gemfile`, here is the
|
27
|
+
minimal content to get your started.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
source 'https://rubygems.org'
|
31
|
+
|
32
|
+
gem 'jekyll', '~> 2.5.3'
|
33
|
+
|
34
|
+
group :jekyll_plugins do
|
35
|
+
gem 'algoliasearch-jekyll', '~> 0.7.0'
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
Once this is done, download all dependencies with `bundle install`.
|
40
|
+
|
41
|
+
Then, add `algoliasearch-jekyll` to your `_config.yml` file, under the `gems`
|
42
|
+
section, like this:
|
43
|
+
|
44
|
+
```yaml
|
45
|
+
gems:
|
46
|
+
- algoliasearch-jekyll
|
47
|
+
```
|
48
|
+
|
49
|
+
If everything went well, you should be able to run `jekyll help` and see the
|
50
|
+
`algolia` subcommand listed.
|
51
|
+
|
52
|
+
## Configuration
|
53
|
+
|
54
|
+
Add information about your Algolia configuration into the `_config.yml` file,
|
55
|
+
under the `algolia` section, like this:
|
56
|
+
|
57
|
+
```yaml
|
58
|
+
algolia:
|
59
|
+
application_id: 'your_application_id'
|
60
|
+
index_name: 'your_index_name'
|
61
|
+
```
|
62
|
+
|
63
|
+
You write api key will be read from the `ALGOLIA_API_KEY` environment variable.
|
64
|
+
You can define it on the same line as your command, allowing you to type
|
65
|
+
`ALGOLIA_API_KEY='your_write_api_key' bundle exec jekyll algolia push`.
|
66
|
+
|
67
|
+
Note that your API key should have write access to both the `index_name` and
|
68
|
+
`_tmp` suffixed version of it (eg. `your_index_name` and `your_index_name_tmp`)
|
69
|
+
in the previous example). This is due to the way we do atomic pushes by pushing
|
70
|
+
to a temporary index and then renaming it.
|
71
|
+
|
72
|
+
### ⚠ Other, unsecure, method ⚠
|
73
|
+
|
74
|
+
You can also store your write api key in a file named `_algolia_api_key`, in
|
75
|
+
your source directory. If you do this we __very, very, very strongly__ encourage
|
76
|
+
you to make sure the file is not tracked in your versioning system.
|
77
|
+
|
78
|
+
### Options
|
79
|
+
|
80
|
+
The plugin uses sensible defaults, but you may want to override some of its
|
81
|
+
configuration. Here are the options you can add to your `_config.yml`
|
82
|
+
file, under the `algolia` section:
|
83
|
+
|
84
|
+
#### `excluded_files`
|
85
|
+
|
86
|
+
Defines which files should not be indexed for search.
|
87
|
+
|
88
|
+
```yml
|
89
|
+
algolia:
|
90
|
+
excluded_files:
|
91
|
+
- index.html
|
92
|
+
- 2015-01-01-post.md
|
93
|
+
```
|
94
|
+
|
95
|
+
#### `record_css_selector`
|
96
|
+
|
97
|
+
All HTML nodes matching this CSS Selector will be indexed. Default value is `p`,
|
98
|
+
meaning that all `<p>` paragraphs will be indexed.
|
99
|
+
|
100
|
+
If you would like to also index lists, you could set it like this:
|
101
|
+
|
102
|
+
```yml
|
103
|
+
algolia:
|
104
|
+
record_css_selector: 'p,ul'
|
105
|
+
```
|
106
|
+
|
107
|
+
#### `lazy_update`
|
108
|
+
|
109
|
+
`false`: The plugin will push all the records to a temporary index and once
|
110
|
+
everything is pushed will override the current index with it. This is the most
|
111
|
+
straightforward way and will ensure that all the changes happen in one move. You
|
112
|
+
either search in the old data, or in the new data. This is the default value.
|
113
|
+
|
114
|
+
`true`: With `lazy_update` enabled, the plugin will try to reduce the number of
|
115
|
+
calls done to the API, to consume less operations on your quota. It will get
|
116
|
+
a list of all the records in your index and all the records ready to be pushed.
|
117
|
+
It will compare both and push the new while deleting the old. In most cases it
|
118
|
+
should consume less operations, but the changes won't be atomic (ie. you might
|
119
|
+
have your index in an hybrid state, with old records not yet removed and/or new
|
120
|
+
records not yet added for a couple of minutes).
|
121
|
+
|
122
|
+
#### `settings`
|
123
|
+
|
124
|
+
Here you can pass any specific [index settings][5] to your Algolia index. All
|
125
|
+
the settings supported by the API can be passed here.
|
126
|
+
|
127
|
+
##### Examples
|
128
|
+
|
129
|
+
If you want to activate `distinct` and some snippets for example, you would do:
|
130
|
+
|
131
|
+
```yml
|
132
|
+
algolia:
|
133
|
+
settings:
|
134
|
+
attributeForDistinct: 'hierarchy'
|
135
|
+
distinct: true
|
136
|
+
attributesToSnippet: ['text:20']
|
137
|
+
```
|
138
|
+
|
139
|
+
If you want to search in other fields than the default ones, you'll have to edit
|
140
|
+
the `attributesToIndex` (default is `%w(title h1 h2 h3 h4 h5 h6 unordered(text)
|
141
|
+
unordered(tags))`
|
142
|
+
|
143
|
+
```yml
|
144
|
+
algolia:
|
145
|
+
settings:
|
146
|
+
attributesToIndex:
|
147
|
+
- title
|
148
|
+
- h1
|
149
|
+
- h2
|
150
|
+
- h3
|
151
|
+
- h4
|
152
|
+
- h5
|
153
|
+
- h6
|
154
|
+
- unordered(text)
|
155
|
+
- unordered(tags)
|
156
|
+
- your_custom_attribute_1
|
157
|
+
- your_custom_attribute_2
|
158
|
+
- ...
|
159
|
+
```
|
160
|
+
|
161
|
+
### Hooks
|
162
|
+
|
163
|
+
The `AlgoliaSearchRecordExtractor` contains two methods (`custom_hook_each` and
|
164
|
+
`custom_hook_all`) that are here so you can overwrite them to add your custom
|
165
|
+
logic. By default, they do nothing except returning the argument they take as
|
166
|
+
input, and are placeholder for you to override.
|
167
|
+
|
168
|
+
The best way to override them is to create a `./_plugins/search.rb` file, with
|
169
|
+
the following content:
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
class AlgoliaSearchRecordExtractor
|
173
|
+
# Hook to modify a record after extracting
|
174
|
+
def custom_hook_each(item, node)
|
175
|
+
# `node` is a Nokogiri HTML node, so you can access its type through `node.name`
|
176
|
+
# or its classname through `node.attr('class')` for example
|
177
|
+
|
178
|
+
# Just return `nil` instead of `item` if you want to discard this record
|
179
|
+
item
|
180
|
+
end
|
181
|
+
|
182
|
+
# Hook to modify all records after extracting
|
183
|
+
def custom_hook_all(items)
|
184
|
+
items
|
185
|
+
end
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
The `AlgoliaSearchJekyllPush` class also lets user define the
|
190
|
+
`custom_hook_excluded_file?` method. This method is called on every file that
|
191
|
+
the plugin thinks it should parse and index. If it returns `true`, the file is
|
192
|
+
not indexed. You can add here your custom logic to exclude some files.
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
class AlgoliaSearchJekyllPush < Jekyll::Command
|
196
|
+
class << self
|
197
|
+
# Hook to exclude some files from indexing
|
198
|
+
def custom_hook_excluded_file?(file)
|
199
|
+
return true if filepath =~ %r{^/excluded_dir/}
|
200
|
+
false
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
```
|
205
|
+
|
206
|
+
## Command line
|
207
|
+
|
208
|
+
Here is the list of command line options you can pass to the `jekyll algolia
|
209
|
+
push` command:
|
210
|
+
|
211
|
+
| Flag | Description |
|
212
|
+
| ---- | ----- |
|
213
|
+
| `--config ./_config.yml` | You can here specify the config file to use. Default is `_config.yml` |
|
214
|
+
| `--future` | With this flag, the command will also index posts with a future date |
|
215
|
+
| `--limit_posts 10` | Limits the number of posts to parse and index |
|
216
|
+
| `--drafts` | Index drafts in the `_drafts` folder as well |
|
217
|
+
| `--dry-run` or `-n` | Do a dry run, do not actually push anything to your index |
|
218
|
+
| `--verbose` | Display more information about what is going to be indexed |
|
219
|
+
|
220
|
+
## Dependencies
|
221
|
+
|
222
|
+
The `algoliasearch-jekyll` plugin works for versions of Jekyll starting from
|
223
|
+
2.5, with a version of Ruby of at least 2.0. You also need
|
224
|
+
[Bundler][6] to add the gem as a dependency to Jekyll.
|
225
|
+
|
226
|
+
## Searching
|
227
|
+
|
228
|
+
This plugin will index your data in your Algolia index. Building the front-end
|
229
|
+
search is of the scope of this plugin, but you can follow [our tutorials][7] or
|
230
|
+
use our forked version of the popular [Hyde theme][8].
|
231
|
+
|
232
|
+
## GitHub Pages
|
233
|
+
|
234
|
+
GitHub does not allow custom plugins to be run on GitHub Pages. This means that
|
235
|
+
you'll either have to run `bundle exec jekyll algolia push` manually, or
|
236
|
+
configure TravisCI to do it for you.
|
237
|
+
|
238
|
+
[Travis CI][9] is an hosted continuous integration
|
239
|
+
service, and it's free for open-source projects. Properly configured, it can
|
240
|
+
automatically reindex your data whenever you push to `gh-pages`.
|
241
|
+
|
242
|
+
For it to work, you'll have 3 steps to perform.
|
243
|
+
|
244
|
+
### 1. Create a `.travis.yml` file
|
245
|
+
|
246
|
+
Create a file named `.travis.yml` at the root of your project, with the
|
247
|
+
following content:
|
248
|
+
|
249
|
+
```yml
|
250
|
+
language: ruby
|
251
|
+
cache: bundler
|
252
|
+
branches:
|
253
|
+
only:
|
254
|
+
- gh-pages
|
255
|
+
script:
|
256
|
+
- bundle exec jekyll algolia push
|
257
|
+
rvm:
|
258
|
+
- 2.2
|
259
|
+
```
|
260
|
+
|
261
|
+
This file will be read by Travis and instruct it to fetch all dependencies
|
262
|
+
defined in the `Gemfile`, then run `jekyll algolia push`. This will be
|
263
|
+
triggered when data is pushed to the `gh-pages` branch.
|
264
|
+
|
265
|
+
### 2. Update your `_config.yml` file to exclude `vendor`
|
266
|
+
|
267
|
+
Travis will download all you `Gemfile` dependencies into a directory named
|
268
|
+
`vendor`. You have to tell Jekyll to ignore this directory, otherwise Jekyll
|
269
|
+
will try to parse it (and fail).
|
270
|
+
|
271
|
+
Doing so is easy, add the following line to your `_config.yml` file:
|
272
|
+
|
273
|
+
```yml
|
274
|
+
exclude: [vendor]
|
275
|
+
```
|
276
|
+
|
277
|
+
### 3. Configure Travis
|
278
|
+
|
279
|
+
In order for Travis to be able to push data to your index on your behalf, you
|
280
|
+
have to give it your write API Key. This is achieved by defining an
|
281
|
+
`ALGOLIA_API_KEY` [environment variable][10] in Travis settings.
|
282
|
+
|
283
|
+
You should also uncheck the "Build pull requests" option, otherwise any pull
|
284
|
+
request targeting `gh-pages` will trigger the reindexing.
|
285
|
+
|
286
|
+
![Travis Configuration][11]
|
287
|
+
|
288
|
+
### Done
|
289
|
+
|
290
|
+
Commit all the changes to the files, and then push to `gh-pages`. Travis will
|
291
|
+
catch the event and trigger your indexing for you. You can follow the Travis job
|
292
|
+
execution directly on [their website][12].
|
293
|
+
|
294
|
+
## FAQS
|
295
|
+
|
296
|
+
### How can I exclude some HTML nodes from the indexing
|
297
|
+
|
298
|
+
By default, the plugin will index every HTML node that matches the
|
299
|
+
`record_css_selector` CSS selector option. The default value is `p`, meaning
|
300
|
+
that it will index all the paragraphs.
|
301
|
+
|
302
|
+
You can use a [negation
|
303
|
+
selector](https://developer.mozilla.org/en/docs/Web/CSS/:not) to be even more
|
304
|
+
explicit. For example the value `p:not(.do-not-index)` will index all `<p>`
|
305
|
+
paragraphs, *except* those that have the class `do-not-index`.
|
306
|
+
|
307
|
+
If you need a finer granularity on your indexing that cannot be expressed
|
308
|
+
through CSS selectors, you'll have to use the [hook mechanism](#hooks). The
|
309
|
+
`custom_hook_each` method takes a [Nokogiri](http://www.nokogiri.org/) HTML node
|
310
|
+
as a second argument and should let you write more complex filters.
|
311
|
+
|
312
|
+
|
313
|
+
[1]: https://badge.fury.io/rb/algoliasearch-jekyll.svg
|
314
|
+
[2]: https://travis-ci.org/algolia/algoliasearch-jekyll.svg?branch=master
|
315
|
+
[3]: https://coveralls.io/repos/algolia/algoliasearch-jekyll/badge.svg?branch=master&service=github
|
316
|
+
[4]: https://codeclimate.com/github/algolia/algoliasearch-jekyll/badges/gpa.svg
|
317
|
+
[5]: https://www.algolia.com/doc/ruby#indexing-parameters
|
318
|
+
[6]: http://bundler.io/
|
319
|
+
[7]: https://www.algolia.com/doc/javascript
|
320
|
+
[8]: https://github.com/algolia/hyde
|
321
|
+
[9]: https://travis-ci.org/
|
322
|
+
[10]: http://docs.travis-ci.com/user/environment-variables/
|
323
|
+
[11]: /docs/travis-settings.png
|
324
|
+
[12]: https://travis-ci.org
|
data/Rakefile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'bundler'
|
3
5
|
begin
|
4
6
|
Bundler.setup(:default, :development)
|
5
7
|
rescue Bundler::BundlerError => e
|
6
|
-
|
7
|
-
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
8
10
|
exit e.status_code
|
9
11
|
end
|
10
12
|
require 'rake'
|
@@ -18,18 +20,11 @@ Jeweler::Tasks.new do |gem|
|
|
18
20
|
gem.version = AlgoliaSearchJekyllVersion.to_s
|
19
21
|
gem.homepage = 'https://github.com/algolia/algoliasearch-jekyll'
|
20
22
|
gem.license = 'MIT'
|
21
|
-
gem.summary = '
|
22
|
-
gem.description = '
|
23
|
+
gem.summary = 'AlgoliaSearch for Jekyll'
|
24
|
+
gem.description = 'Index all your pages and posts to an Algolia index with ' \
|
25
|
+
'`jekyll algolia push`'
|
23
26
|
gem.email = 'tim@pixelastic.com'
|
24
27
|
gem.authors = ['Tim Carry']
|
25
|
-
gem.post_install_message = <<-MESSAGE
|
26
|
-
! The 'algolisearch-jekyll' gem has been deprecated and has been replaced with 'jekyll-algolia'.
|
27
|
-
! See: https://rubygems.org/gems/jekyll-algolia
|
28
|
-
! And: https://github.com/algolia/jekyll-algolia
|
29
|
-
!
|
30
|
-
! You can get quickly started on the new plugin using this documentation:
|
31
|
-
! https://community.algolia.com/jekyll-algolia/getting-started.html
|
32
|
-
MESSAGE
|
33
28
|
|
34
29
|
# dependencies defined in Gemfile
|
35
30
|
end
|
@@ -2,18 +2,18 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: algoliasearch-jekyll 0.
|
5
|
+
# stub: algoliasearch-jekyll 0.7.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
|
-
s.name = "algoliasearch-jekyll"
|
9
|
-
s.version = "0.
|
8
|
+
s.name = "algoliasearch-jekyll"
|
9
|
+
s.version = "0.7.0"
|
10
10
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0"
|
12
|
-
s.require_paths = ["lib"
|
13
|
-
s.authors = ["Tim Carry"
|
14
|
-
s.date = "
|
15
|
-
s.description = "
|
16
|
-
s.email = "tim@pixelastic.com"
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Tim Carry"]
|
14
|
+
s.date = "2016-06-20"
|
15
|
+
s.description = "Index all your pages and posts to an Algolia index with `jekyll algolia push`"
|
16
|
+
s.email = "tim@pixelastic.com"
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE.txt",
|
19
19
|
"README.md"
|
@@ -40,6 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
"lib/error_handler.rb",
|
41
41
|
"lib/push.rb",
|
42
42
|
"lib/record_extractor.rb",
|
43
|
+
"lib/utils.rb",
|
43
44
|
"lib/version.rb",
|
44
45
|
"scripts/bump_version",
|
45
46
|
"scripts/check_flay",
|
@@ -58,6 +59,7 @@ Gem::Specification.new do |s|
|
|
58
59
|
"scripts/watch_v3",
|
59
60
|
"spec/credential_checker_spec.rb",
|
60
61
|
"spec/error_handler_spec.rb",
|
62
|
+
"spec/extractor_spec.old",
|
61
63
|
"spec/fixtures/jekyll_version_2/_config.yml",
|
62
64
|
"spec/fixtures/jekyll_version_2/_layouts/default.html",
|
63
65
|
"spec/fixtures/jekyll_version_2/_my-collection/collection-item.html",
|
@@ -69,8 +71,11 @@ Gem::Specification.new do |s|
|
|
69
71
|
"spec/fixtures/jekyll_version_2/assets/ring.png",
|
70
72
|
"spec/fixtures/jekyll_version_2/authors.html",
|
71
73
|
"spec/fixtures/jekyll_version_2/excluded.html",
|
74
|
+
"spec/fixtures/jekyll_version_2/front_matter.md",
|
72
75
|
"spec/fixtures/jekyll_version_2/hierarchy.md",
|
73
76
|
"spec/fixtures/jekyll_version_2/index.html",
|
77
|
+
"spec/fixtures/jekyll_version_2/only-divs.md",
|
78
|
+
"spec/fixtures/jekyll_version_2/only-paragraphs.md",
|
74
79
|
"spec/fixtures/jekyll_version_2/page2/index.html",
|
75
80
|
"spec/fixtures/jekyll_version_2/weight.md",
|
76
81
|
"spec/fixtures/jekyll_version_3/_config.yml",
|
@@ -84,8 +89,11 @@ Gem::Specification.new do |s|
|
|
84
89
|
"spec/fixtures/jekyll_version_3/assets/ring.png",
|
85
90
|
"spec/fixtures/jekyll_version_3/authors.html",
|
86
91
|
"spec/fixtures/jekyll_version_3/excluded.html",
|
92
|
+
"spec/fixtures/jekyll_version_3/front_matter.md",
|
87
93
|
"spec/fixtures/jekyll_version_3/hierarchy.md",
|
88
94
|
"spec/fixtures/jekyll_version_3/index.html",
|
95
|
+
"spec/fixtures/jekyll_version_3/only-divs.md",
|
96
|
+
"spec/fixtures/jekyll_version_3/only-paragraphs.md",
|
89
97
|
"spec/fixtures/jekyll_version_3/page2/index.html",
|
90
98
|
"spec/fixtures/jekyll_version_3/weight.md",
|
91
99
|
"spec/push_spec.rb",
|
@@ -98,67 +106,63 @@ Gem::Specification.new do |s|
|
|
98
106
|
"txt/index_name_missing",
|
99
107
|
"txt/sample"
|
100
108
|
]
|
101
|
-
s.homepage = "https://github.com/algolia/algoliasearch-jekyll"
|
102
|
-
s.licenses = ["MIT"
|
103
|
-
s.
|
104
|
-
s.
|
105
|
-
s.summary = "[\u26A0 DEPRECATED \u26A0]: Use jekyll-algolia instead".freeze
|
109
|
+
s.homepage = "https://github.com/algolia/algoliasearch-jekyll"
|
110
|
+
s.licenses = ["MIT"]
|
111
|
+
s.rubygems_version = "2.4.8"
|
112
|
+
s.summary = "AlgoliaSearch for Jekyll"
|
106
113
|
|
107
114
|
if s.respond_to? :specification_version then
|
108
115
|
s.specification_version = 4
|
109
116
|
|
110
117
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
111
|
-
s.add_runtime_dependency(%q<algoliasearch
|
112
|
-
s.add_runtime_dependency(%q<appraisal
|
113
|
-
s.add_runtime_dependency(%q<awesome_print
|
114
|
-
s.add_runtime_dependency(%q<json
|
115
|
-
s.add_runtime_dependency(%q<nokogiri
|
116
|
-
s.add_runtime_dependency(%q<
|
117
|
-
s.
|
118
|
-
s.add_development_dependency(%q<coveralls
|
119
|
-
s.add_development_dependency(%q<flay
|
120
|
-
s.add_development_dependency(%q<flog
|
121
|
-
s.add_development_dependency(%q<guard-rspec
|
122
|
-
s.add_development_dependency(%q<jeweler
|
123
|
-
s.add_development_dependency(%q<rspec
|
124
|
-
s.add_development_dependency(%q<rubocop
|
125
|
-
s.add_development_dependency(%q<simplecov
|
126
|
-
s.add_development_dependency(%q<rack>.freeze, ["< 2"])
|
118
|
+
s.add_runtime_dependency(%q<algoliasearch>, ["~> 1.4"])
|
119
|
+
s.add_runtime_dependency(%q<appraisal>, ["~> 2.1.0"])
|
120
|
+
s.add_runtime_dependency(%q<awesome_print>, ["~> 1.6"])
|
121
|
+
s.add_runtime_dependency(%q<json>, ["~> 1.8"])
|
122
|
+
s.add_runtime_dependency(%q<nokogiri>, ["~> 1.6"])
|
123
|
+
s.add_runtime_dependency(%q<html-hierarchy-extractor>, [">= 0"])
|
124
|
+
s.add_runtime_dependency(%q<verbal_expressions>, ["~> 0.1.5"])
|
125
|
+
s.add_development_dependency(%q<coveralls>, ["~> 0.8"])
|
126
|
+
s.add_development_dependency(%q<flay>, ["~> 2.6"])
|
127
|
+
s.add_development_dependency(%q<flog>, ["~> 4.3"])
|
128
|
+
s.add_development_dependency(%q<guard-rspec>, ["~> 4.6"])
|
129
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
|
130
|
+
s.add_development_dependency(%q<rspec>, ["~> 3.0"])
|
131
|
+
s.add_development_dependency(%q<rubocop>, ["~> 0.31"])
|
132
|
+
s.add_development_dependency(%q<simplecov>, ["~> 0.10"])
|
127
133
|
else
|
128
|
-
s.add_dependency(%q<algoliasearch
|
129
|
-
s.add_dependency(%q<appraisal
|
130
|
-
s.add_dependency(%q<awesome_print
|
131
|
-
s.add_dependency(%q<json
|
132
|
-
s.add_dependency(%q<nokogiri
|
133
|
-
s.add_dependency(%q<
|
134
|
-
s.add_dependency(%q<
|
135
|
-
s.add_dependency(%q<coveralls
|
136
|
-
s.add_dependency(%q<flay
|
137
|
-
s.add_dependency(%q<flog
|
138
|
-
s.add_dependency(%q<guard-rspec
|
139
|
-
s.add_dependency(%q<jeweler
|
140
|
-
s.add_dependency(%q<rspec
|
141
|
-
s.add_dependency(%q<rubocop
|
142
|
-
s.add_dependency(%q<simplecov
|
143
|
-
s.add_dependency(%q<rack>.freeze, ["< 2"])
|
134
|
+
s.add_dependency(%q<algoliasearch>, ["~> 1.4"])
|
135
|
+
s.add_dependency(%q<appraisal>, ["~> 2.1.0"])
|
136
|
+
s.add_dependency(%q<awesome_print>, ["~> 1.6"])
|
137
|
+
s.add_dependency(%q<json>, ["~> 1.8"])
|
138
|
+
s.add_dependency(%q<nokogiri>, ["~> 1.6"])
|
139
|
+
s.add_dependency(%q<html-hierarchy-extractor>, [">= 0"])
|
140
|
+
s.add_dependency(%q<verbal_expressions>, ["~> 0.1.5"])
|
141
|
+
s.add_dependency(%q<coveralls>, ["~> 0.8"])
|
142
|
+
s.add_dependency(%q<flay>, ["~> 2.6"])
|
143
|
+
s.add_dependency(%q<flog>, ["~> 4.3"])
|
144
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4.6"])
|
145
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
146
|
+
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
147
|
+
s.add_dependency(%q<rubocop>, ["~> 0.31"])
|
148
|
+
s.add_dependency(%q<simplecov>, ["~> 0.10"])
|
144
149
|
end
|
145
150
|
else
|
146
|
-
s.add_dependency(%q<algoliasearch
|
147
|
-
s.add_dependency(%q<appraisal
|
148
|
-
s.add_dependency(%q<awesome_print
|
149
|
-
s.add_dependency(%q<json
|
150
|
-
s.add_dependency(%q<nokogiri
|
151
|
-
s.add_dependency(%q<
|
152
|
-
s.add_dependency(%q<
|
153
|
-
s.add_dependency(%q<coveralls
|
154
|
-
s.add_dependency(%q<flay
|
155
|
-
s.add_dependency(%q<flog
|
156
|
-
s.add_dependency(%q<guard-rspec
|
157
|
-
s.add_dependency(%q<jeweler
|
158
|
-
s.add_dependency(%q<rspec
|
159
|
-
s.add_dependency(%q<rubocop
|
160
|
-
s.add_dependency(%q<simplecov
|
161
|
-
s.add_dependency(%q<rack>.freeze, ["< 2"])
|
151
|
+
s.add_dependency(%q<algoliasearch>, ["~> 1.4"])
|
152
|
+
s.add_dependency(%q<appraisal>, ["~> 2.1.0"])
|
153
|
+
s.add_dependency(%q<awesome_print>, ["~> 1.6"])
|
154
|
+
s.add_dependency(%q<json>, ["~> 1.8"])
|
155
|
+
s.add_dependency(%q<nokogiri>, ["~> 1.6"])
|
156
|
+
s.add_dependency(%q<html-hierarchy-extractor>, [">= 0"])
|
157
|
+
s.add_dependency(%q<verbal_expressions>, ["~> 0.1.5"])
|
158
|
+
s.add_dependency(%q<coveralls>, ["~> 0.8"])
|
159
|
+
s.add_dependency(%q<flay>, ["~> 2.6"])
|
160
|
+
s.add_dependency(%q<flog>, ["~> 4.3"])
|
161
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4.6"])
|
162
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
163
|
+
s.add_dependency(%q<rspec>, ["~> 3.0"])
|
164
|
+
s.add_dependency(%q<rubocop>, ["~> 0.31"])
|
165
|
+
s.add_dependency(%q<simplecov>, ["~> 0.10"])
|
162
166
|
end
|
163
167
|
end
|
164
168
|
|