tazworks-api 0.1.1 → 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
  SHA256:
3
- metadata.gz: e7eb79fefb6c50c423aecdd1ab8fc00cf083525219d9fa3b5550e89a3b07c0c3
4
- data.tar.gz: 142b6edf03ffa9ecb70076c7b947cd67add521d030da49d600fff3eee2a3c694
3
+ metadata.gz: f33afbd50a33935243785e3d1ac777f25979a09d41af7b131ba271adc5697340
4
+ data.tar.gz: e1ff1624af4b1dd04088e1ea0fdc2140a74b4d0d4e02a63c44926e001b67ccec
5
5
  SHA512:
6
- metadata.gz: 612315964a2bbb3c44f5cc4ac75f594082488f1b28f8906fd07d832b139bcdaa96fde6bce548af0f5cc06dad07b772711c7c4afdd77a86af3a483eefb4875b57
7
- data.tar.gz: b91feab1e5e90e188abdf3a4fa6b2c82aeac1ba1e9c9a3a4e4ea15bce0c46d98e8479e6a550cfe39dedebc4f0e0ac83dc741d44fb461c42c8b20de344e38f45d
6
+ metadata.gz: a1f8c6832ac43b796497c75af38f64cccff182d714a32e6ac9a5755fb5a53a35fb8f6261ee756d1e6fe9c84703a613b25e78dce2b206fe060a8684977d0df516
7
+ data.tar.gz: '099bb7c2bfcd36cc888a9e1694f41daa3b27c5e9068555f00ad4488e04ff2e1f61695bf8ac3e65344bc849720ae4c76c806843d889cdf4c1446069de3ee3fe71'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2023-11-18
3
+
4
+ ## [0.1.2] - 2023-11-28
5
+
6
+ - Fixing paged_response sharing ids hash instead of having unique hash for each element
7
+
8
+ ## [0.1.1] - 2023-11-18
4
9
 
5
10
  - Initial release
@@ -25,8 +25,11 @@ module Tazworks
25
25
 
26
26
  json_response = JSON.parse(raw_response.body, { symbolize_names: true })
27
27
  @collection = json_response.map do |json_object|
28
- self.class.base_class.new(ids: map_individual_object_ids(@ids, json_object), attributes: json_object,
29
- attributes_loaded: true)
28
+ self.class.base_class.new(
29
+ ids: map_individual_object_ids(deep_copy(@ids), deep_copy(json_object)),
30
+ attributes: json_object,
31
+ attributes_loaded: true
32
+ )
30
33
  end
31
34
  end
32
35
 
@@ -69,5 +72,11 @@ module Tazworks
69
72
  # scary regex to pull the parameter off the url.
70
73
  last_link[/.*page=(\d+)&.*/, 1].to_i
71
74
  end
75
+
76
+ private
77
+
78
+ def deep_copy(o)
79
+ Marshal.load(Marshal.dump(o))
80
+ end
72
81
  end
73
82
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Tazworks Version
4
4
  module Tazworks
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tazworks-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peyton Smith
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-11-27 00:00:00.000000000 Z
12
+ date: 2023-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json