wordjelly-auth 1.2.0 → 1.2.1

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: c42a092272dcecebcb9c5f277eb787c3c7ef9ab3
4
- data.tar.gz: 99fa8856c5190308411e17fe33eceeda23e6db6e
3
+ metadata.gz: 998b4b6ae8498893000130fff555afcfbfc1a7f2
4
+ data.tar.gz: dbeca1a615b51d298572a4ef696230c0a1fd08a7
5
5
  SHA512:
6
- metadata.gz: 34a5426617603247d634b31ab22c5e91ad992925555ff32d95183430921feea2d102ebc27ca34bfa1db9a63f36c356216a88e6ecaef9b46448a2e17d3560d7c1
7
- data.tar.gz: 701f931788735292d0c9faf7139cff73516091a9adae3496ae1430a5647605b07bebea06f1faa2b5bd6abe594747cadf225a650b54264f8c1f7f46ccf7980163
6
+ metadata.gz: c6be7258a114b841b96c867bae18551ddf7100e69707c2166f954e8c884a9613898d28f2b9fb9df8be35d1d3c6b04375742123932d3d70d49c9703a33bd06a63
7
+ data.tar.gz: 9a089cdd3b60dd2bc778cd1fe1d50356a1d7e7ab813701fa0cb29f50295715688387e1d210e9e0f5723a90fd0f3cabfbe124fa925b7ab1a3be1dce0dbb200958
@@ -31,6 +31,7 @@ module Auth::Concerns::TokenConcern
31
31
  ## if there is more than one model : all but the last will have a fallback of :none.
32
32
  ##
33
33
 
34
+
34
35
  TCONDITIONS = {} unless defined? TCONDITIONS
35
36
 
36
37
 
@@ -12,9 +12,6 @@ module Auth::Concerns::Shopping::CartItemConcern
12
12
 
13
13
  included do
14
14
 
15
-
16
-
17
-
18
15
  INDEX_DEFINITION = {
19
16
  index_options: {
20
17
  settings: {
@@ -1,13 +1,36 @@
1
- Some people who deserve a mention:
2
-
3
- -Dr.Manas Dutta(for the motivation, and setting a fine example),
4
- -Dr.Harvinder Singh & Dr. Priyam Pargaonkar(for being so understanding in my first year),
5
- -Dr.Shailendra Tiwari(for the tutorial on Hindi romantic poetry and its indications and contraindications),
6
- -Dr.Vanshika Shahi(for teaching me pathology),
7
- -Dr.Rishabh Joshi(for redefining my notion of 'capacity'),
8
- -Dr.Chaitrangi Rohekar Paranjpe(for being as blunt as is humanly possible),
9
- -Dr.Iqbal Ahmed Farooqi(for the tips on MCQ's),
10
- -Dr.Monalisa Makashir Laturkar(for telling me I'd top this exam),
11
- -Dr.Kumud Jeswani Raut(for the sugar cubes, and Lahejat tea),
12
- -Dr.Aditya Raut(for existing) and my parents(for everything).
1
+ Some sunshine after nearly 15 years of hell.
2
+
3
+ It feels good to be back to doing what I was once the best at.
4
+
5
+ I'd like to thank some people who have been instrumental in this:
6
+
7
+ 1. My parents - for the unconditional love.
8
+
9
+ 2. My brother - for managing everything at home.
10
+ Dr.Kumud Jeswani - for being so kind all throughout.
11
+
12
+ 3. Dr.Manas Dutta - The only person who saw from up close what it took to get here. It has been a honour and a privilege to know you.
13
+
14
+ 4. Dr.Iqbal Ahmed Farooqi - For all the tips on MCQ's.
15
+
16
+ 5. Dr. Rishabh Joshi, Dr.Shailendra Tiwari - The surgery buddies I should have had from day one, especially Dr.Shailendra who got me into the habit of studying for 24 hours in a row.
17
+
18
+ Dr.Harvinder Singh, Dr.Vanshika Shahi, Dr.Priyam Pargaonkar, Dr.Jinal Patel, Dr Nidhi Patel, Dr.Khushboo Patel, Dr.Ansul Choudhary, Dr Puja Karalia and all my other colleagues at the Dept of Pathology, who were kind enough to overlook my frequent disappearances.
19
+
20
+ Dr.Anjali Kelkar - for teaching us that hematology is much to vast to be learnt in 2 short years.
21
+
22
+ Dr.Ashka Kodnani - for being so kind while teaching me cytology reporting.
23
+
24
+ Dr.Nisal, Dr.Doshi, Dr.Jagadale and Dr.Lakhe, Dr.Nimbargi - for everything.
25
+
26
+ Dr.N.S.Mani for introducing to me the concept of the 1st reading, 2nd reading and 3rd reading. Until then I only read things once.
27
+
28
+ 6. Dr.Manjiri Karandikar my original MBBS pathology teacher, whose dedication to her work is impossible to emulate, and whose concepts are simply too clear to be true.
29
+
30
+ 7. Possibly the most important person: Dr.Chaitrangi Rohekar Paranjpe, who told me to get my act together.
31
+
32
+ 8. Dr.Monalisa Makashir, for telling me 6 months ago, that I was going to top the exam. I don't know how you did that.
33
+
34
+ 9. Dr.S.P - for existing.
35
+
13
36
 
@@ -14,12 +14,10 @@ module Auth
14
14
  cls_name_as_string.split("::").map{|c| c = c.underscore}.join("/")
15
15
  end
16
16
 
17
-
18
17
  def self.new_path(cls)
19
18
  "new_" + cls.constantize.new.class.name.underscore.gsub(/\//,"_") + "_path"
20
19
  end
21
20
 
22
-
23
21
  def self.show_or_update_or_delete_path(cls)
24
22
 
25
23
  parts = cls.constantize.new.class.name.split("::")
@@ -1,18 +1,18 @@
1
1
  module Auth
2
2
  module Search
3
3
  module Main
4
+
4
5
  ## this def, returns a hash with the structure for the basic ngram query.
5
6
  ## the query_string is left blank, and you should merge this in through any def that wants to perform an ngram query.
6
7
  ## @return[Hash]
7
- def self.base_ngram_query
8
+ def self.es_six_base_ngram_query
8
9
  {
9
10
  body: {
10
11
  query: {
11
- filtered:
12
- {
13
- query: {
12
+ bool: {
13
+ must: {
14
14
  match: {
15
- _all: {
15
+ _all_fields: {
16
16
  query: "",
17
17
  operator: "and"
18
18
  }
@@ -29,29 +29,33 @@ module Auth
29
29
  }
30
30
  end
31
31
 
32
+
33
+ ## searches all indices, for the search string.
32
34
  ## @param[Hash] : This is expected to contain the following:
33
35
  ## @query_string : the query supplied by the user
34
36
  ## @resource_id : a resource_id with which to filter search results, if its not provided, no filter is used on the search results
35
37
  ## @size : if not provided a default size of 20 is used
36
38
  ## this def will use the #base_ngram_query hash and merge in a filter for the resource_id.
37
-
38
39
  ## 'Public' Resources
39
40
  ## if the public field is present, don't add any resource_id filter.
40
41
  ## if the public field is not present, then add the resource_id filter if the resource_id is provided.
42
+ ## @return[Hash] : returns a query clause(hash)
43
+ def self.es_six_finalize_search_query_clause(args)
41
44
 
42
-
43
- ## @return[Array] response: an array of mongoid search result objects.
44
- def self.search(args)
45
+
45
46
  args = args.deep_symbolize_keys
47
+
46
48
  return [] unless args[:query_string]
47
- query = base_ngram_query
48
49
 
49
- ## set all the required values.
50
+ query = es_six_base_ngram_query
51
+
50
52
  query[:size] = args[:size] || 20
51
-
52
- query[:body][:query][:filtered][:query][:match][:_all][:query] = args[:query_string]
53
+
54
+ query[:body][:query][:bool][:must][:match][:_all_fields][:query] = args[:query_string]
55
+
56
+
53
57
  if args[:resource_id]
54
- query[:body][:query][:filtered][:filter] = {
58
+ query[:body][:query][:bool][:filter] = {
55
59
 
56
60
  bool: {
57
61
  should: [
@@ -89,7 +93,15 @@ module Auth
89
93
  ## as is.
90
94
  end
91
95
 
92
- #puts JSON.pretty_generate(query)
96
+ query
97
+
98
+ end
99
+
100
+
101
+ ## delegates the building of the query to finalize_search_query_clause.
102
+ ## @return[Array] response: an array of mongoid search result objects.
103
+ def self.search(args)
104
+ query = es_six_finalize_search_query_clause(args)
93
105
  Mongoid::Elasticsearch.search(query,{:wrapper => :load}).results
94
106
  end
95
107
  end
@@ -1,3 +1,3 @@
1
1
  module Auth
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordjelly-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bhargav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-28 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xpath