fakerbot 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fakerbot/reflector.rb +6 -1
- data/lib/fakerbot/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: 659d15a1df1e316903fc54196be47bb5f6887c04
|
4
|
+
data.tar.gz: e419ed063d518c06ff6fae09a1294f88929abf3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ef6759c55b74e26c59b179045c99108d1bffb277647de15eb29a875a11b2874f220fab9e41f645f7d036e58536dd85d7d41b7022cea30244833637f5f01a28f
|
7
|
+
data.tar.gz: 1dce33ad7d335763fae4b920bb1cf5a6129af3595a23ed404bc738fb24ee066b3f80c2b6df7d25f17ced1c8ac407e8f626de8fd978d6719610c5365f5065f3a5
|
data/lib/fakerbot/reflector.rb
CHANGED
@@ -60,11 +60,16 @@ module FakerBot
|
|
60
60
|
def search_descendants_matching_query
|
61
61
|
faker_descendants.each do |faker|
|
62
62
|
methods = faker.my_singleton_methods
|
63
|
-
matching = methods.select { |m| m.
|
63
|
+
matching = methods.select { |m| query_matches?(m.to_s) }
|
64
64
|
store(faker, matching)
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def query_matches?(method_name)
|
69
|
+
method_name_parts = method_name.split(/_/).reject(&:empty?)
|
70
|
+
query.match(/#{method_name_parts.join('|')}/)
|
71
|
+
end
|
72
|
+
|
68
73
|
def store(descendant, methods)
|
69
74
|
return if methods.empty?
|
70
75
|
descendants_with_methods[descendant].concat(methods)
|
data/lib/fakerbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fakerbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Kabiru
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faker
|