activesearch 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTU2NGJjNGExNDVjNjY5OTk4Njk0OTQwM2FhZjExZmM0Y2E2MmFkNg==
4
+ NGUxNThlNTAxNjhmY2YxNDU1NTdhNjA3OTBkMjExMWE2YzI1NjVhZQ==
5
5
  data.tar.gz: !binary |-
6
- Njg2Yzk2OTIxMzNkZjY4OTFlZjhmYWQ1OWU2NDVhN2M4NGNiN2Y4Mg==
6
+ MjRlM2NkNGU2MDRhODhiNmM2MmQ5NTkwNzY5YTRiZjIwZTNmY2QyZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzliZTAwNDgwMjQ5MGMxNTM0ZDM4Njc4MDE5NjI2MDFmNTBlMDQwZDY0ZGZk
10
- NzE4ZTZlYWQyNGNiNDc1NGE0ZTNiYTE0MzcwNjMxODU2ODI4YTY5OGRmY2Jk
11
- ZTVmNjFhYTE0YjY0MmU5ODYwNTdlYWU0YmQ2MjM5MzMzYmMyZjQ=
9
+ NWU2MzI4ZTQ4NTU0MjE0OTA1NGE4ZDY3NDE4OTViYmZkNjhhNmEyZTlhYWUy
10
+ NDJkYjczMmUxNmU4MzlkYjdjNzFmYTZmZjY0YmRjMWZjYjc4NTc5YzBiZjU0
11
+ ZDgyZWZiNGExYWU2YmMzMTFmZTE0YzgyODQ3NjQwZDFhMGZkOTA=
12
12
  data.tar.gz: !binary |-
13
- YTgzMTI3ZDAwMDJlYjJkZjRlY2VlMTE2ODdhOWEwZWY5NWIyMDE3M2RiNTUy
14
- NmU2ZjUwNzQ2ODJkYjUyN2E2Mzg2NWZkOGJjZjU1ZmQ1MjFhODljZTlhYWRi
15
- MzM5MDkyNWNjMmExZmUyMjczMjc1ZGJjNGQzZDk1NjlkMGE3OGY=
13
+ YjQ2NDZlZmJjZDViYmNlZDI1ZDgyOTJiOWRlMGNlODI5ZDQ1YjQ3YzFjOWI5
14
+ YmRkNDg5ZTJlM2YzNmMyMjVlN2VlOTFiYjYwMWM1MTNjNjQ4MDBhOTVjYzFj
15
+ Y2JlYjI3N2M3YWY5YjRiN2VhNzg0NGZhODFhMDZmMzc0YWY4Yjg=
@@ -1,34 +1,36 @@
1
1
  require "httparty"
2
2
  require "active_support/core_ext/object/to_json"
3
3
 
4
- module ActiveSearch::Algolia
5
- class Client
6
- include HTTParty
7
-
8
- def self.configure(api_key, app_id, index = "activesearch")
9
- base_uri "https://apieu1.algolia.com/1/indexes/#{index}"
10
- headers({
11
- "X-Algolia-API-Key" => api_key,
12
- "X-Algolia-Application-Id" => app_id,
13
- "Content-Type" => "application/json; charset=utf-8"
14
- })
15
- end
4
+ module ActiveSearch
5
+ module Algolia
6
+ class Client
7
+ include HTTParty
8
+
9
+ def self.configure(api_key, app_id, index = "activesearch")
10
+ base_uri "https://apieu1.algolia.com/1/indexes/#{index}"
11
+ headers({
12
+ "X-Algolia-API-Key" => api_key,
13
+ "X-Algolia-Application-Id" => app_id,
14
+ "Content-Type" => "application/json; charset=utf-8"
15
+ })
16
+ end
16
17
 
17
- def delete_index
18
- self.class.delete("")
19
- end
18
+ def delete_index
19
+ self.class.delete("")
20
+ end
20
21
 
21
- def delete(id)
22
- return false if id.nil?
23
- self.class.delete("/#{id}")
24
- end
22
+ def delete(id)
23
+ return false if id.nil?
24
+ self.class.delete("/#{id}")
25
+ end
25
26
 
26
- def save(id, object)
27
- self.class.put("/#{id}", body: object.to_json)
28
- end
27
+ def save(id, object)
28
+ self.class.put("/#{id}", body: object.to_json)
29
+ end
29
30
 
30
- def query(text, extras = {})
31
- self.class.get("", query: extras.merge!(query: text))
31
+ def query(text, extras = {})
32
+ self.class.get("", query: extras.merge!(query: text))
33
+ end
32
34
  end
33
35
  end
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveSearch
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alvarez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-22 00:00:00.000000000 Z
11
+ date: 2013-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport