algoliasearch-jekyll 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/algoliasearch-jekyll.gemspec +4 -5
- data/lib/algoliasearch-jekyll.rb +2 -1
- data/lib/push.rb +4 -3
- data/lib/version.rb +11 -0
- data/spec/push_spec.rb +6 -9
- metadata +3 -4
- data/VERSION +0 -1
- data/todo +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf63cc151be2bbb9c5dea8881f110703cc5ab95f
|
4
|
+
data.tar.gz: 9cdd47f72d3446b48df5492b1a68f405e7607ffb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01fc966406a3e1f7866e7dd045182cd0c343b44f0f64201026b13401fb0544a992f3202c9504481f44eca7ce4f20b517f9afc4e34c5e6662f2f8561ffa98765f
|
7
|
+
data.tar.gz: b92a131ce8b29c1b691669f01881d9853446cdc103dffa88fc6c777eb568a363b951d5b4cafc4b49187df0a8c24a9a3f6ec2d7f6a6b7faf8929ff2f1133bbf04
|
data/Rakefile
CHANGED
@@ -12,10 +12,12 @@ end
|
|
12
12
|
require 'rake'
|
13
13
|
|
14
14
|
require 'jeweler'
|
15
|
+
require_relative 'lib/version'
|
15
16
|
Jeweler::Tasks.new do |gem|
|
16
17
|
# gem is a Gem::Specification... see
|
17
18
|
# http://guides.rubygems.org/specification-reference/ for more options
|
18
19
|
gem.name = 'algoliasearch-jekyll'
|
20
|
+
gem.version = AlgoliaSearchJekyllVersion.to_s
|
19
21
|
gem.homepage = 'https://github.com/algolia/algoliasearch-jekyll'
|
20
22
|
gem.license = 'MIT'
|
21
23
|
gem.summary = 'AlgoliaSearch for Jekyll'
|
@@ -2,16 +2,16 @@
|
|
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.4.
|
5
|
+
# stub: algoliasearch-jekyll 0.4.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "algoliasearch-jekyll"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Tim Carry"]
|
14
|
-
s.date = "2015-07-
|
14
|
+
s.date = "2015-07-29"
|
15
15
|
s.description = "Index all your pages and posts to an Algolia index with `jekyll algolia push`"
|
16
16
|
s.email = "tim@pixelastic.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -28,12 +28,12 @@ Gem::Specification.new do |s|
|
|
28
28
|
"LICENSE.txt",
|
29
29
|
"README.md",
|
30
30
|
"Rakefile",
|
31
|
-
"VERSION",
|
32
31
|
"algoliasearch-jekyll.gemspec",
|
33
32
|
"lib/algoliasearch-jekyll.rb",
|
34
33
|
"lib/credential_checker.rb",
|
35
34
|
"lib/push.rb",
|
36
35
|
"lib/record_extractor.rb",
|
36
|
+
"lib/version.rb",
|
37
37
|
"scripts/check_flay",
|
38
38
|
"scripts/check_flog",
|
39
39
|
"scripts/git_hooks/pre-commit",
|
@@ -70,7 +70,6 @@ Gem::Specification.new do |s|
|
|
70
70
|
"spec/spec_helper.rb",
|
71
71
|
"spec/spec_helper_jekyll.rb",
|
72
72
|
"spec/spec_helper_simplecov.rb",
|
73
|
-
"todo",
|
74
73
|
"txt/api_key_missing",
|
75
74
|
"txt/application_id_missing",
|
76
75
|
"txt/index_name_missing"
|
data/lib/algoliasearch-jekyll.rb
CHANGED
data/lib/push.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'algoliasearch'
|
2
2
|
require 'nokogiri'
|
3
3
|
require 'json'
|
4
|
-
require_relative './
|
5
|
-
require_relative './
|
4
|
+
require_relative './version'
|
5
|
+
require_relative './record_extractor'
|
6
|
+
require_relative './credential_checker'
|
6
7
|
|
7
8
|
# `jekyll algolia push` command
|
8
9
|
class AlgoliaSearchJekyllPush < Jekyll::Command
|
@@ -126,7 +127,7 @@ class AlgoliaSearchJekyllPush < Jekyll::Command
|
|
126
127
|
|
127
128
|
# Change the User-Agent header to isolate calls from this plugin
|
128
129
|
def set_user_agent_header
|
129
|
-
version =
|
130
|
+
version = AlgoliaSearchJekyllVersion.to_s
|
130
131
|
Algolia.set_extra_header('User-Agent', "Algolia for Jekyll #{version}")
|
131
132
|
end
|
132
133
|
|
data/lib/version.rb
ADDED
data/spec/push_spec.rb
CHANGED
@@ -185,12 +185,13 @@ describe(AlgoliaSearchJekyllPush) do
|
|
185
185
|
end
|
186
186
|
|
187
187
|
describe 'set_user_agent_header' do
|
188
|
+
before(:each) do
|
189
|
+
allow(Algolia).to receive(:set_extra_header)
|
190
|
+
end
|
191
|
+
|
188
192
|
it 'should set a User-Agent with the plugin name and version' do
|
189
193
|
# Given
|
190
|
-
|
191
|
-
spec = Gem::Specification.load('algoliasearch-jekyll.gemspec')
|
192
|
-
spec.version = expected
|
193
|
-
allow(Algolia).to receive(:set_extra_header)
|
194
|
+
allow(AlgoliaSearchJekyllVersion).to receive(:to_s).and_return '99.42'
|
194
195
|
|
195
196
|
# When
|
196
197
|
push.set_user_agent_header
|
@@ -198,11 +199,7 @@ describe(AlgoliaSearchJekyllPush) do
|
|
198
199
|
# Then
|
199
200
|
expect(Algolia).to have_received(:set_extra_header).with(
|
200
201
|
'User-Agent',
|
201
|
-
/Jekyll/
|
202
|
-
)
|
203
|
-
expect(Algolia).to have_received(:set_extra_header).with(
|
204
|
-
'User-Agent',
|
205
|
-
/#{expected}/
|
202
|
+
/Jekyll(.*)99.42/
|
206
203
|
)
|
207
204
|
end
|
208
205
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Carry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: algoliasearch
|
@@ -210,12 +210,12 @@ files:
|
|
210
210
|
- LICENSE.txt
|
211
211
|
- README.md
|
212
212
|
- Rakefile
|
213
|
-
- VERSION
|
214
213
|
- algoliasearch-jekyll.gemspec
|
215
214
|
- lib/algoliasearch-jekyll.rb
|
216
215
|
- lib/credential_checker.rb
|
217
216
|
- lib/push.rb
|
218
217
|
- lib/record_extractor.rb
|
218
|
+
- lib/version.rb
|
219
219
|
- scripts/check_flay
|
220
220
|
- scripts/check_flog
|
221
221
|
- scripts/git_hooks/pre-commit
|
@@ -252,7 +252,6 @@ files:
|
|
252
252
|
- spec/spec_helper.rb
|
253
253
|
- spec/spec_helper_jekyll.rb
|
254
254
|
- spec/spec_helper_simplecov.rb
|
255
|
-
- todo
|
256
255
|
- txt/api_key_missing
|
257
256
|
- txt/application_id_missing
|
258
257
|
- txt/index_name_missing
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.4.2
|