naranya_ecm-sdk 0.0.41 → 0.0.42

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: edbecada2ac547b8b240b1837dbdf521feabbc22
4
- data.tar.gz: d7164b81f91713648f718664d88004a8733da199
3
+ metadata.gz: edcb5360a556fa04739d34bda3fd6ae7e3f0a696
4
+ data.tar.gz: 6e2f6e3fe4f775b8e0df4a4c76c18299a5249740
5
5
  SHA512:
6
- metadata.gz: 37e1d2b3ffd2c367f6c5814f5bab27a79daa1358edb51b6d7f3d047879ac8ac7ed5b6109961abeda46deab79efdb352163e6dadc1a1314123eb08ac13c9bf219
7
- data.tar.gz: ae03270c59dbf3a20a7dba932cf9a08d43702c858c56630652e4803f24743e158a25a05fab128dee5614dade4a0e3ab2ac9057d4a3899218acc4613f87fd8175
6
+ metadata.gz: 743f9b659c78a0b6c972092c032d81a0cd20e337ac2db8091ab4fbf57da82f731cc1f3932c27d279e1c4dd7c3e10e5d9790a841b68587523431c68b3342b884b
7
+ data.tar.gz: 8f1ef6a70618d0e6857ed2bbfe648c79cbece07e36268ab2a2eab8cfc87472e394e4ea0c3852be46ce92bed1f7f20ac028e7cf633644526fbb9f32fc26eb63b9
@@ -4,10 +4,10 @@ require 'naranya_ecm/rest/client'
4
4
  module NaranyaEcm::Rest
5
5
  class Relation
6
6
  include Enumerable
7
- delegate :to_yaml, :all?, :each, :first, :last, to: :to_a
7
+ delegate :to_yaml, :all?, :each, :first, :last, :to_ary, to: :to_a
8
8
 
9
9
  attr_reader :klass, :conditions, :elements
10
-
10
+
11
11
  def initialize(given_klass, given_conditions = {})
12
12
  @klass, @conditions = given_klass, given_conditions.with_indifferent_access
13
13
  end
@@ -33,7 +33,7 @@ module NaranyaEcm::Rest
33
33
  def load(given_list)
34
34
  # Revisar que todos los elementos sean Hash o la clase asociada:
35
35
  if given_list.count > 0 && given_list.map{ |e| e.is_a?(Hash) || e.is_a?(@klass) }.reduce { |res, e| res && e } == false
36
- raise "Type Mismatch: some elements are not a hash nor associated_class"
36
+ raise "Type Mismatch: some elements are not a hash nor associated_class"
37
37
  end
38
38
 
39
39
  @elements = given_list.map { |e| e.is_a?(Hash) ? @klass.load(e) : e }
@@ -49,4 +49,4 @@ module NaranyaEcm::Rest
49
49
  end
50
50
 
51
51
  end
52
- end
52
+ end
@@ -1,3 +1,3 @@
1
1
  module NaranyaEcm
2
- VERSION = "0.0.41"
2
+ VERSION = "0.0.42"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naranya_ecm-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.41
4
+ version: 0.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-14 00:00:00.000000000 Z
11
+ date: 2015-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport