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 +4 -4
- data/app/controllers/auth/concerns/token_concern.rb +1 -0
- data/app/models/auth/concerns/shopping/cart_item_concern.rb +0 -3
- data/app/models/auth/work/VICTORY SPEECH: +35 -12
- data/lib/auth/omniauth/path.rb +0 -2
- data/lib/auth/search/main.rb +27 -15
- data/lib/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998b4b6ae8498893000130fff555afcfbfc1a7f2
|
4
|
+
data.tar.gz: dbeca1a615b51d298572a4ef696230c0a1fd08a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6be7258a114b841b96c867bae18551ddf7100e69707c2166f954e8c884a9613898d28f2b9fb9df8be35d1d3c6b04375742123932d3d70d49c9703a33bd06a63
|
7
|
+
data.tar.gz: 9a089cdd3b60dd2bc778cd1fe1d50356a1d7e7ab813701fa0cb29f50295715688387e1d210e9e0f5723a90fd0f3cabfbe124fa925b7ab1a3be1dce0dbb200958
|
@@ -1,13 +1,36 @@
|
|
1
|
-
Some
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
|
data/lib/auth/omniauth/path.rb
CHANGED
@@ -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("::")
|
data/lib/auth/search/main.rb
CHANGED
@@ -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.
|
8
|
+
def self.es_six_base_ngram_query
|
8
9
|
{
|
9
10
|
body: {
|
10
11
|
query: {
|
11
|
-
|
12
|
-
|
13
|
-
query: {
|
12
|
+
bool: {
|
13
|
+
must: {
|
14
14
|
match: {
|
15
|
-
|
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
|
-
|
50
|
+
query = es_six_base_ngram_query
|
51
|
+
|
50
52
|
query[:size] = args[:size] || 20
|
51
|
-
|
52
|
-
query[:body][:query][:
|
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][:
|
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
|
-
|
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
|
data/lib/auth/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xpath
|