cirro-ruby-client 1.2.1 → 1.2.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
  SHA256:
3
- metadata.gz: ae8201867c4e81773872690ee39df951dfb161d68cdf4ab10807a497a8e2744b
4
- data.tar.gz: 59b06b8045b93026ddae29649542f54398ecc5c8fd5eb727608709153bcd57ea
3
+ metadata.gz: af3baedbf5539e9ad9f959866058793297fa577636b8b1d0668546feab80f4f5
4
+ data.tar.gz: 2a9fd6c37c1cb04385bf45fa20dd747909d92d472264d993221e31d7f1627b70
5
5
  SHA512:
6
- metadata.gz: 6e664faa51a535dec4b7544c5bd43870e31dfa014d3f5e8665df7c20f4a6fa075529b226ae9835276105e229a86ab020cdfc005662bc5f972d587a43cba40515
7
- data.tar.gz: f3263a656d9d2cc6500233dafdd40d47dee4727a3d1d1b4e9f464a4ecdc4e2c399b8a728360061b498f32dc77c30dfed40515560ce8b33ad01bdd6031b002861
6
+ metadata.gz: be7b514feca8a7afab9a31d99dd52a31ae837cb0586965673874472ac04d025d4ee8212eaedac8032863f80d59415c1a065fd262230804a33325092c9394fa23
7
+ data.tar.gz: a7a56b0ff10355836c1abe9ba293921052011b62eb2f1ff7ba302e68fa212e5eea5a8b5599fd226383d4100243fe2d0aab601d7636763883b5639487321d7638
@@ -34,7 +34,7 @@ GEM
34
34
  hashdiff (1.0.1)
35
35
  i18n (1.8.5)
36
36
  concurrent-ruby (~> 1.0)
37
- json_api_client (1.17.1)
37
+ json_api_client (1.18.0)
38
38
  activemodel (>= 3.2.0)
39
39
  activesupport (>= 3.2.0)
40
40
  addressable (~> 2.2)
@@ -1,10 +1,5 @@
1
1
  require 'json_api_client'
2
2
 
3
- # temporary monkey patch code to fix gem bug
4
- require 'cirro_io/has_one'
5
- require 'cirro_io/base_association'
6
- # temporary monkey patch code to fix gem bug
7
-
8
3
  require 'cirro_io/client/version'
9
4
  require 'cirro_io/client/configuration'
10
5
  require 'cirro_io/client/response_debugging_middleware'
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Style/MutableConstant
2
2
  module CirroIO
3
3
  module Client
4
- VERSION = '1.2.1'
4
+ VERSION = '1.2.2'
5
5
  end
6
6
  end
7
7
  # rubocop:enable Style/MutableConstant
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirro-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirro Dev Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -74,7 +74,6 @@ files:
74
74
  - bin/console
75
75
  - bin/setup
76
76
  - cirro-ruby-client.gemspec
77
- - lib/cirro_io/base_association.rb
78
77
  - lib/cirro_io/client.rb
79
78
  - lib/cirro_io/client/app_user.rb
80
79
  - lib/cirro_io/client/app_worker.rb
@@ -89,7 +88,6 @@ files:
89
88
  - lib/cirro_io/client/response_debugging_middleware.rb
90
89
  - lib/cirro_io/client/version.rb
91
90
  - lib/cirro_io/client/worker_invitation_filter.rb
92
- - lib/cirro_io/has_one.rb
93
91
  homepage: https://cirro.io/api-docs/v1#cirro-api-documentation
94
92
  licenses:
95
93
  - MIT
@@ -1,33 +0,0 @@
1
- module JsonApiClient
2
- module Associations
3
- class BaseAssociation
4
- attr_reader :attr_name, :klass, :options
5
- def initialize(attr_name, klass, options = {})
6
- @attr_name = attr_name
7
- @klass = klass
8
- @options = options
9
- end
10
-
11
- def association_class
12
- @association_class ||= Utils.compute_type(klass, options.fetch(:class_name) do
13
- attr_name.to_s.classify
14
- end)
15
- end
16
-
17
- def data(url)
18
- from_result_set(association_class.requestor.linked(url))
19
- end
20
-
21
- def from_result_set(result_set)
22
- result_set.to_a
23
- end
24
-
25
- def load_records(data)
26
- data.map do |d|
27
- record_class = Utils.compute_type(klass, klass.key_formatter.unformat(d['type']).classify)
28
- record_class.load id: d['id']
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,16 +0,0 @@
1
- module JsonApiClient
2
- module Associations
3
- module HasOne
4
- class Association < BaseAssociation
5
- def from_result_set(result_set)
6
- result_set.first
7
- end
8
-
9
- def load_records(data)
10
- record_class = Utils.compute_type(klass, klass.key_formatter.unformat(data['type']).classify)
11
- record_class.load id: data['id']
12
- end
13
- end
14
- end
15
- end
16
- end