services 4.1.3 → 4.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/services/base.rb +6 -2
- data/lib/services/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: 1dc5bf4df6a1672dc93cdc1a8999dd2b60c67491
|
4
|
+
data.tar.gz: 72a50ae2edad15f05f509f8272c7a888ccf76d4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae6a705a197f1ced734580b48153444b2f311bfb39c96079ba53afaa7623addadfc246de65853bc0100680c217533da534ebd7bdf0eb597b08f850d78ae6fd0
|
7
|
+
data.tar.gz: 306927ee9a380fa98928b085f1f4043da4a841dd526de227c51bf45a51cbf622af120599a7717df8f564478af0ac1ef7855cab0759e1e49131d2701b8568a4f7
|
data/CHANGELOG.md
CHANGED
data/lib/services/base.rb
CHANGED
@@ -48,8 +48,12 @@ module Services
|
|
48
48
|
|
49
49
|
def find_service(klass)
|
50
50
|
find_service_name = "#{klass.to_s.pluralize}::Find"
|
51
|
-
candidates = [
|
52
|
-
|
51
|
+
candidates = ["Services::#{find_service_name}", find_service_name]
|
52
|
+
# Use a lazy enumerator here because attempting to
|
53
|
+
# constantize the find service without a namespace
|
54
|
+
# might raise a circular dependency error if it has
|
55
|
+
# a namespace
|
56
|
+
candidates.lazy.map(&:safe_constantize).detect(&:itself) or raise self.class::Error, "Could not find find service (tried: #{candidates.join(', ')})"
|
53
57
|
end
|
54
58
|
|
55
59
|
def find_objects(ids_or_objects, klass = object_class)
|
data/lib/services/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Meurer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|