intel 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31879a36e725be72dc34b53afa077f6d2f31bc7b
4
- data.tar.gz: 697d5bf3d20c5cc93c5d42df6ab868cb24834df8
3
+ metadata.gz: a561febeae06ecff18de54051393a9e0f2a4fcd3
4
+ data.tar.gz: 3e4ca19b2991ec4c670b15ec76c1ee9023d1a116
5
5
  SHA512:
6
- metadata.gz: e62375f43d6f457a653b9e45c56801620948d0b81a53e55b83a8e7ecd3aa1d69bf42c67f8498c7c994facb9ef0e292446ee5d2ddc53955db8b2437d3bf288b4f
7
- data.tar.gz: 9266b4153c82fc6bf57390a5b3143401e2a483b74dbc6129dfde691d3b079aaeff189ae25a218c3f3ccc518ef98bc27061bb452ae8c25cf29e5d38635325490e
6
+ metadata.gz: a87dba04f8d5026c2d580b2dd1394c046dbd14532628e7d9af7a03da1c2d3c7cf6d04ee4e9dc69b42d331826b2c640bfcb3fe46ffbe5b9446de626644ba221ae
7
+ data.tar.gz: 981819447038b90c4f32ab91f815843086b142a9f559536b637d88a9b965de269fd7d77a6c4d0f9421e0c6f9eacf771886cf516250535cedc907b83c94b4ff2d
data/README.md CHANGED
@@ -12,6 +12,8 @@
12
12
 
13
13
  Works with Rails 3.1+ and any search engine, including Elasticsearch, Sphinx, and Solr
14
14
 
15
+ :tangerine: Battle-tested at [Instacart](https://www.instacart.com)
16
+
15
17
  ## Get Started
16
18
 
17
19
  Add this line to your application’s Gemfile:
@@ -63,22 +65,22 @@ It’s that easy.
63
65
 
64
66
  ### Track Conversions
65
67
 
66
- First, choose a conversion metric. At [Instacart](https://www.instacart.com/), an item added to the cart from the search results page counts as a conversion.
68
+ First, choose a conversion metric. At Instacart, an item added to the cart from the search results page counts as a conversion.
67
69
 
68
70
  Next, when a user searches, keep track of the search id. With Searchkick, you can get the id with `@results.search.id`.
69
71
 
70
- When a user converts, find the record and call `converted`.
72
+ When a user converts, find the record and call `convert`.
71
73
 
72
74
  ```ruby
73
75
  search = Intel::Search.find params[:id]
74
- search.converted
76
+ search.convert
75
77
  ```
76
78
 
77
79
  Better yet, record the model that converted.
78
80
 
79
81
  ```ruby
80
82
  item = Item.find params[:item_id]
81
- search.converted(item)
83
+ search.convert(item)
82
84
  ```
83
85
 
84
86
  ### Authentication
@@ -4,7 +4,7 @@ module Intel
4
4
 
5
5
  before_save :set_normalized_query
6
6
 
7
- def converted(convertable = nil)
7
+ def convert(convertable = nil)
8
8
  if !converted?
9
9
  self.converted_at = Time.now
10
10
  self.convertable = convertable
@@ -1,3 +1,3 @@
1
1
  module Intel
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane