mastico 0.1.1 → 0.1.2

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
- SHA256:
3
- metadata.gz: 46282da7310c519736cd0947cd37b93cb28324ca7c4bfec8e4d042f4dcfbd112
4
- data.tar.gz: bb39aaacb4a89cfa83143347a2136246fed4ef40f930abf7a1b5561fe5e7550a
2
+ SHA1:
3
+ metadata.gz: 10574d0b9586998f4d7fd7543d5c7ef614e28a29
4
+ data.tar.gz: bd2cad87ba6821b050e3483d857acdf2c4f1cd8a
5
5
  SHA512:
6
- metadata.gz: 8917049d8ab75f18fb6a53446e1ddabba4c5ba9ff595e22dee3ee5869d8e0a1a7a90fcd577584d95f832d6d2642441892e776b06f68d8673a572be6e25db2f8c
7
- data.tar.gz: 9c92b1644a6f6dbb285682cf1560c125ad5af4cb408d4fd81844707750041b5d265a89f68a6f88db86c517fea6f480003c8f73607ecdf2b22b3f8bc2cbad86b8
6
+ metadata.gz: 3899db6f982100299f90d94db7fb8e81c6b97513906ef3aaa2247bb1859cfaee7341341b293892e7c41613e69701ad458cf43315afd26867c72cdd2bf2fe44a1
7
+ data.tar.gz: 6133e753e4409c3fe2e9482d02b198a99f4eae19acdfb82bce766ddc685293ba25b4de95d678624c8420238142116762a646b79ef3957ee93d708a5033c35e6a
data/README.md CHANGED
@@ -15,7 +15,7 @@ Mastico creates queries based on a list of fields:
15
15
 
16
16
  ```ruby
17
17
  query = FooIndex.query
18
- query = Mastico::Query.new(fields: [:title, description], query: "ciao").perform(query)
18
+ query = Mastico::Query.new(fields: [:title, description], query: "ciao").apply(query)
19
19
  ```
20
20
  This creates a series of queries: word, prefix, infix and fuzzy match of the word `ciao` against the supplied fields.
21
21
 
@@ -33,7 +33,7 @@ def weight(word)
33
33
  end
34
34
  end
35
35
 
36
- query = Mastico::Query.new(fields: [:title, description], word_weight: method(:weight), query: "I like cheese").perform(query)
36
+ query = Mastico::Query.new(fields: [:title, description], word_weight: method(:weight), query: "I like cheese").apply(query)
37
37
  ```
38
38
 
39
39
  ## Example 3:
@@ -41,7 +41,7 @@ query = Mastico::Query.new(fields: [:title, description], word_weight: method(:w
41
41
  What if I don't want all the different types of matching?
42
42
 
43
43
  ```ruby
44
- query = Mastico::Query.new(fields: {title: {boost: 4.0, types: [:term]} }, query: "Simple").perform(query)
44
+ query = Mastico::Query.new(fields: {title: {boost: 4.0, types: [:term]} }, query: "Simple").apply(query)
45
45
  ```
46
46
  This will return only the `term` type search for the attribute `title`.
47
47
 
@@ -62,10 +62,6 @@ Or install it yourself as:
62
62
 
63
63
  $ gem install mastico
64
64
 
65
- ## Usage
66
-
67
- TODO: Write usage instructions here
68
-
69
65
  ## Development
70
66
 
71
67
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -27,7 +27,7 @@ module Mastico
27
27
  @parts = nil
28
28
  end
29
29
 
30
- def perform(scope)
30
+ def apply(scope)
31
31
  parts ? scope.query(parts) : scope
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module Mastico
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Manzo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-07 00:00:00.000000000 Z
11
+ date: 2018-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.7.3
111
+ rubygems_version: 2.5.1
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: A chewy helper