restpack_service 0.0.45 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acfc6fd14c0230a5762988cc3d3cc8bd9cf1a80c
4
- data.tar.gz: 31902fed975eceb3a41db6a1802b942cd843cabc
3
+ metadata.gz: bec0b10d2eb5b427542de2e71f54606449337562
4
+ data.tar.gz: 7cb2e1f25acd87b3a3cef8d0b2beda12d8e36189
5
5
  SHA512:
6
- metadata.gz: 8a152bf27e04c000716bb8607db90aec829073a0d7f168dcd15339575486eb7c540b62fbee6d0ef1dba8207248c6ea605870fce76060c677a04ca5ac6885804a
7
- data.tar.gz: e120d6742bac4a96ce1f5243ba476ba377ed02ca17e33ead81a6f65836d2ddfc2ea140ff44c36555da25bbf00a922a69ecef5628e63911beeda5ac5d8f4ae7f4
6
+ metadata.gz: f915ea644e36a8960448160c9be5526fa8c27b2b09824a77f36c5f7792d247cc9de04a58b426139c85abb2f91aa7daceb073afe3d9f007aa0067646d436bb493
7
+ data.tar.gz: ee2997d73b7a1720031d8659a4fd0caf4816bfaf34d9728f8559aac081a18cf7ffdfc2577b98bc3d73472b02baffa9442a66a130510e1bd889d570420e035536
@@ -18,23 +18,28 @@ module RestPack::Service
18
18
  require_service_module 'models', service_path, restpack_namespace
19
19
  require_service_module 'serializers', service_path, restpack_namespace
20
20
  require_service_module 'commands', service_path, restpack_namespace
21
+ require_service_module 'jobs', service_path, restpack_namespace
21
22
  end
22
23
 
23
24
  private
24
25
 
25
26
  def self.require_service_module(module_name, service_path, restpack_namespace)
26
- require_all "#{service_path}/#{module_name.downcase}"
27
- module_sym = module_name.capitalize.to_sym
27
+ path = "#{service_path}/#{module_name.downcase}"
28
28
 
29
- existing_module = Object.const_defined?(module_sym) ? Object.const_get(module_sym) : nil
29
+ if File.directory?(path)
30
+ require_all path
31
+ module_sym = module_name.capitalize.to_sym
30
32
 
31
- proxy_module = existing_module || Module.new
32
- proxy_module.module_eval do
33
- include Object.const_get("#{restpack_namespace}::Service::#{module_name.capitalize}")
34
- end
33
+ existing_module = Object.const_defined?(module_sym) ? Object.const_get(module_sym) : nil
34
+
35
+ proxy_module = existing_module || Module.new
36
+ proxy_module.module_eval do
37
+ include Object.const_get("#{restpack_namespace}::Service::#{module_name.capitalize}")
38
+ end
35
39
 
36
- unless existing_module
37
- Object.const_set module_sym, proxy_module
40
+ unless existing_module
41
+ Object.const_set module_sym, proxy_module
42
+ end
38
43
  end
39
44
  end
40
45
 
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Service
3
- VERSION = "0.0.45"
3
+ VERSION = "0.0.46"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.45
4
+ version: 0.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Joyce