services 0.1.0 → 0.1.2

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: df1ba6063f4bba38b277be74e5ec56cc71872078
4
- data.tar.gz: 63d57f90d5d3372c9c88e0aedc79b25a39f3c185
3
+ metadata.gz: c148465c5f9136b280c87824fb53878b9e17e05d
4
+ data.tar.gz: 3fd963a4ec9b77e26a2cd2c0bacfe9e1f7924ecd
5
5
  SHA512:
6
- metadata.gz: b2ba9c8855a2c23bf6b559eb6023a8f72b0026e873e6307b7a3532ede57e9553bf3c8451dee1825f793ec183580a060bb4ff123604860dc6f1cd9d7b8a9f9636
7
- data.tar.gz: 296aed48e3ce98785a24830bb944ab8763a0987cf38e31c91510372ebec2fbcd3dccd920bc23750e362976e9d146904db9e32e92e0acd62478df3dbcc205062e
6
+ metadata.gz: d963a730efde270e4137e45f08465a127f27a15581a4c8cc26401ae1b0101bc19737097200502b57004b73fc4b4e8fce3a5b4b15e0347d88e1bab339155ee3f0
7
+ data.tar.gz: 23fc5b5174f0ecf0ec261b35fcb886f67907a506f755fc7fb13c10a93f74aede3eec0005eca608ef0e7fada73342a02ae08f9bc44825aa630d789ee7a90ad0ac
data/lib/services/base.rb CHANGED
@@ -39,7 +39,7 @@ module Services
39
39
  raise 'Array can only contain IDs.' if ids_or_objects.any? { |ids_or_object| !ids_or_object.is_a?(Fixnum) }
40
40
  objects = "Services::#{klass.to_s.pluralize}::Find".constantize.call(ids_or_objects)
41
41
  missing_ids = ids_or_objects - objects.pluck(:id)
42
- raise self.class::Error, "#{klass.to_s.pluralize(missing_ids)} #{missing_ids.join(', ')} not found." if missing_ids.present?
42
+ raise self.class::Error, "#{klass.to_s.pluralize(missing_ids)} #{missing_ids.join(', ')} not found." if missing_ids.size > 0
43
43
  return objects
44
44
  when Fixnum
45
45
  object = "Services::#{klass.to_s.pluralize}::Find".constantize.call(ids_or_objects).first
@@ -56,7 +56,7 @@ module Services
56
56
 
57
57
  def controller
58
58
  @controller ||= begin
59
- raise 'Please configure host.' unless Services.configuration.host?
59
+ raise 'Please configure host.' if Services.configuration.host.nil?
60
60
  request = ActionDispatch::TestRequest.new
61
61
  request.host = Services.configuration.host
62
62
  ActionController::Base.new.tap do |controller|
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer