q_auth_ruby_client 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4abb1acfc8a0f95d737d9e8fa89ea1c2a6219cd2
|
4
|
+
data.tar.gz: a45fbe4060819abffdefaffa63764a09dfa2496e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1c9a738dc9cfd388d70e5e9d6cebb8e6e28513f258c642368a87ec7a1f3c2a43572c0126ab77b546a49d65397bd9b121828fc1ff0fe8f7e6db2e0aece77068
|
7
|
+
data.tar.gz: 0758e99466b00245caa513bd6a4fcd8b7894648e5d701e6a58dc05adaf56af3514bc2deec59f9d4f8a2b73fcd58bb6741346aaabb91f6e5cbb46260122a0e57c
|
@@ -4,6 +4,14 @@ class QAuthRubyClient::User < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
self.table_name = 'users'
|
6
6
|
|
7
|
+
# return an active record relation object with the search query in its where clause
|
8
|
+
# Return the ActiveRecord::Relation object
|
9
|
+
# == Examples
|
10
|
+
# >>> user.search(query)
|
11
|
+
# => ActiveRecord::Relation object
|
12
|
+
scope :search, lambda {|query| where("LOWER(users.name) LIKE LOWER('%#{query}%') OR LOWER(users.username) LIKE LOWER('%#{query}%') OR LOWER(users.email) LIKE LOWER('%#{query}%') OR LOWER(users.phone) LIKE LOWER('%#{query}%') OR LOWER(users.city) LIKE LOWER('%#{query}%') OR LOWER(users.designation) LIKE LOWER('%#{query}%') OR LOWER(users.department) LIKE LOWER('%#{query}%')")}
|
13
|
+
|
14
|
+
|
7
15
|
def self.fetch_all_users(auth_token)
|
8
16
|
qauth_url = QAuthRubyClient.configuration.q_auth_url + "/api/v1/members"
|
9
17
|
request = Typhoeus::Request.new(
|
@@ -13,6 +13,12 @@ module QAuthRubyClient
|
|
13
13
|
helper QAuthRubyClient::NotificationHelper
|
14
14
|
helper QAuthRubyClient::SessionsHelper
|
15
15
|
end
|
16
|
+
|
17
|
+
config.to_prepare do
|
18
|
+
Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
|
19
|
+
require_dependency(c)
|
20
|
+
end
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: q_auth_ruby_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krishnaprasad Varma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|