apollo-federation 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee348cd629e831432a5500ed0396962f5bcb614570aaaded9c017acffe89c716
4
- data.tar.gz: cf5a7bcc824e67dbd5ae431b6a05d575d0d501e2ce44410607bddf313917f543
3
+ metadata.gz: c332c531c60246c58c66365271cf0cb7c20a65c21f8a3ff41920bbe4a5a5459d
4
+ data.tar.gz: 80ab13a30a6bbb31f5156af967e951e526afdef886fd0d3f51ebf07f0dcca731
5
5
  SHA512:
6
- metadata.gz: eb4bcaebf99a78f3f9b3af9b085cbcd908c00ffcabc5e23caf23f55341cd46ad9b86cd735b43701742c671a9547c2ef3536fbcf7211d0b27b9ede8c8d39ed338
7
- data.tar.gz: aa35f034de34453234a2d71a8e00cccbe435264efd0e277120a3c82531d9deb0035976420ee7c7ad415dc0ddfa8574537687cf863842c9d75021ec74f54843d8
6
+ metadata.gz: ba2c5740717f76209899979207aa8e28c42d207cb69b770627aac702266c2501e2795efd032f7397dedff7624d076d46e10d1575eabec81b7a8a3a8b89c82047
7
+ data.tar.gz: 68bb01edc76d73caee59c2ae0d01e07004e783b1a881a6796758ed99b9e738fbcb8d53e80f4dee3d4c78df77d1afdb0e756e13e26d73a5cdb05e0ecb900e29fb
@@ -1,3 +1,10 @@
1
+ ## [0.5.1](https://github.com/Gusto/apollo-federation-ruby/compare/v0.5.0...v0.5.1) (2019-10-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * drop actionpack from runtime dependencies ([#34](https://github.com/Gusto/apollo-federation-ruby/issues/34)) ([64acd27](https://github.com/Gusto/apollo-federation-ruby/commit/64acd27))
7
+
1
8
  # [0.5.0](https://github.com/Gusto/apollo-federation-ruby/compare/v0.4.2...v0.5.0) (2019-10-22)
2
9
 
3
10
 
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/array/wrap'
4
3
  require 'apollo-federation/tracing/proto'
5
4
 
6
5
  module ApolloFederation
@@ -28,7 +27,7 @@ module ApolloFederation
28
27
  end
29
28
 
30
29
  def node_for_path(path)
31
- nodes[Array.wrap(path).join('.')]
30
+ nodes[array_wrap(path).join('.')]
32
31
  end
33
32
 
34
33
  def add(path)
@@ -54,10 +53,10 @@ module ApolloFederation
54
53
  end
55
54
 
56
55
  def add_error(error)
57
- path = Array.wrap(error['path']).join('.')
56
+ path = array_wrap(error['path']).join('.')
58
57
  node = nodes[path] || root
59
58
 
60
- locations = Array.wrap(error['locations']).map do |location|
59
+ locations = array_wrap(error['locations']).map do |location|
61
60
  ApolloFederation::Tracing::Location.new(location)
62
61
  end
63
62
 
@@ -67,6 +66,16 @@ module ApolloFederation
67
66
  json: JSON.dump(error),
68
67
  )
69
68
  end
69
+
70
+ def array_wrap(object)
71
+ if object.nil?
72
+ []
73
+ elsif object.respond_to?(:to_ary)
74
+ object.to_ary || [object]
75
+ else
76
+ [object]
77
+ end
78
+ end
70
79
  end
71
80
  end
72
81
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApolloFederation
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo-federation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noa Elad