maquina 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/maquina/organization.rb +0 -1
- data/app/models/maquina/user.rb +0 -1
- data/lib/maquina/version.rb +1 -1
- metadata +1 -2
- data/app/models/concerns/maquina/searchable.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f39a0b2ab151429d764ab650eeb2000b0d7f273f2d8db62432eb331f46ae5609
|
4
|
+
data.tar.gz: ff0518eb8328e885ef95245e3faad7fecf7f7a69637c00f967a2efb7d0a34d2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a55a0eefda11374168612994a6fdf4b2f13c9264483aadc894c77b881231a8ac84ff5594698e30fedb5aca57b3a221a0b46c0b2f560463f28538555786ae74
|
7
|
+
data.tar.gz: 591238b607bf082ff2247ff83391cbfac9738827dd3043e1c8958b1812394dff383556569d15cc11b0c381e2f3f862bd642191f57e1e3ffd8cfe605898e81372
|
data/Gemfile.lock
CHANGED
data/app/models/maquina/user.rb
CHANGED
@@ -6,7 +6,6 @@ module Maquina
|
|
6
6
|
include Maquina::AuthenticateBy
|
7
7
|
include Maquina::Blockeable
|
8
8
|
include Maquina::Multifactor
|
9
|
-
# include Maquina::Searchable
|
10
9
|
|
11
10
|
PASSWORD_COMPLEXITY_REGEX = /\A(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#-=+])[A-Za-z\d@$!%*?&#-=+]{8,}\z/
|
12
11
|
has_secure_password
|
data/lib/maquina/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maquina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Alberto Chávez
|
@@ -295,7 +295,6 @@ files:
|
|
295
295
|
- app/models/concerns/maquina/multifactor.rb
|
296
296
|
- app/models/concerns/maquina/organization_scoped.rb
|
297
297
|
- app/models/concerns/maquina/retain_passwords.rb
|
298
|
-
- app/models/concerns/maquina/searchable.rb
|
299
298
|
- app/models/concerns/maquina/user_scoped.rb
|
300
299
|
- app/models/maquina/active_session.rb
|
301
300
|
- app/models/maquina/application_record.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "pg_search"
|
4
|
-
|
5
|
-
module Maquina
|
6
|
-
module Searchable
|
7
|
-
extend ActiveSupport::Concern
|
8
|
-
|
9
|
-
included do
|
10
|
-
include PgSearch::Model
|
11
|
-
end
|
12
|
-
|
13
|
-
class_methods do
|
14
|
-
def search_scope(fields: [], options: {}, associated_against: {})
|
15
|
-
return if fields.empty?
|
16
|
-
|
17
|
-
default_options = {tsearch: {prefix: true, any_word: true}}
|
18
|
-
search_options = options.deep_merge(default_options)
|
19
|
-
|
20
|
-
pg_search_scope :search_full, against: fields, using: search_options, associated_against: associated_against # , ignoring: :accents
|
21
|
-
end
|
22
|
-
|
23
|
-
def searchable?
|
24
|
-
true
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|