dynamodb_record 0.4.0 → 0.4.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 +4 -4
- data/README.md +42 -0
- data/lib/dynamodb_record/has_and_belongs_to_many_collection.rb +15 -10
- data/lib/dynamodb_record/has_many_collection.rb +18 -0
- data/lib/dynamodb_record/persistence.rb +1 -1
- data/lib/dynamodb_record/version.rb +1 -1
- data/spec/dynamodb_record/association_spec.rb +7 -2
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_belongs_to/get_object.yml +28 -24
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_and_belongs_to_many/create.yml +67 -108
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_and_belongs_to_many/destroy.yml +84 -124
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_and_belongs_to_many/only_one_record.yml +52 -44
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_many/create_item.yml +41 -35
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_many/create_item_with_.yml +216 -0
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_many/get_collection.yml +28 -24
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/has_and_belongs_to_many.yml +41 -35
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/has_many_through.yml +28 -78
- metadata +3 -3
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_many/add_list.yml +0 -362
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b207ff51e2f61f838af62f1e71ac5420435ca474515c776d6ecd86bd36b2e231
|
4
|
+
data.tar.gz: f1ee8e9771fad229e20078ca1bacc6df3fa95bd801214a9552c006e58aa1d44a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12dc3c2e3255b43a7ce21522eb1cf7307ff69fc44b4b841aca7a251117e053d169826b68b5920bffb4bb6ec454ce15d3216415d347025961abeb1783ebb6a309
|
7
|
+
data.tar.gz: 70e365459e0c41e6871b0864b53221a2a1dfb8a257c9269b2e217d543e9b1f49bde366418faa09753fd47d3e46455948714d175df6630cbd541bea29e544f4f2
|
data/README.md
CHANGED
@@ -76,6 +76,48 @@ user = User.find('f9b351b0-d06d-4fff-b8d4-8af162e2b8ba')
|
|
76
76
|
User.find!('f9b351b0-d06d-4fff-b8d4-8af162e2b8ba')
|
77
77
|
```
|
78
78
|
|
79
|
+
### The has_many Association
|
80
|
+
|
81
|
+
Associations are placed in their respective classes
|
82
|
+
|
83
|
+
**car.rb**
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
class Car
|
87
|
+
include DynamodbRecord::Document
|
88
|
+
|
89
|
+
field :marca, :string
|
90
|
+
has_many :insurances
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
**insurance.rb**
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
class Insurance
|
98
|
+
include DynamodbRecord::Document
|
99
|
+
|
100
|
+
field :name, :string
|
101
|
+
field :car_id, :string, index: true
|
102
|
+
belongs_to :car
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
There are many ways to generate associations:
|
107
|
+
|
108
|
+
#### '<<' method
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
# Find a car with ID 'UVX123'
|
112
|
+
car = Car.find('UVX123')
|
113
|
+
|
114
|
+
# Create a new insurance instance
|
115
|
+
insurance = Insurance.new(name: 'Bolivar')
|
116
|
+
|
117
|
+
# Associate the insurance with the car
|
118
|
+
car.insurances << insurance
|
119
|
+
```
|
120
|
+
|
79
121
|
## Contributing
|
80
122
|
|
81
123
|
1. Fork it ( https://github.com/[my-github-username]/dynamo_record/fork )
|
@@ -41,18 +41,23 @@ module DynamodbRecord
|
|
41
41
|
self.class.new(@pager.next_page(last_key), @base_object) if last_key
|
42
42
|
end
|
43
43
|
|
44
|
-
def <<(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
44
|
+
def <<(pluralizable_object)
|
45
|
+
pluralizable_object = [pluralizable_object] unless pluralizable_object.is_a?(Array)
|
46
|
+
|
47
|
+
pluralizable_object.each do |object|
|
48
|
+
table_name = @options[:table_name]
|
49
|
+
item = @options[:expression_attribute_values].transform_keys { |k| k.delete_prefix(':').to_sym }
|
50
|
+
item[:"#{@base_model}_id"] = object.id
|
51
|
+
item[:created_at] = DateTime.now.to_s
|
52
|
+
key = {table_name:, item:}
|
50
53
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
54
|
+
res = @items.none? { |data| data.id == object.id }
|
55
|
+
if res
|
56
|
+
@klass.client.put_item(key)
|
57
|
+
@items << object
|
58
|
+
end
|
55
59
|
end
|
60
|
+
|
56
61
|
@items
|
57
62
|
end
|
58
63
|
|
@@ -46,5 +46,23 @@ module DynamodbRecord
|
|
46
46
|
@items << object
|
47
47
|
object
|
48
48
|
end
|
49
|
+
|
50
|
+
def <<(pluralizable_object)
|
51
|
+
pluralizable_object = [pluralizable_object] unless pluralizable_object.is_a?(Array)
|
52
|
+
|
53
|
+
pluralizable_object.each do |object|
|
54
|
+
res = @items.none? { |data| data.id == object.id }
|
55
|
+
|
56
|
+
next unless res
|
57
|
+
|
58
|
+
foreign_attribute = "#{@base_object.class.to_s.downcase}_id="
|
59
|
+
object.send(foreign_attribute, @base_object.id)
|
60
|
+
object.save!
|
61
|
+
|
62
|
+
@items << object
|
63
|
+
end
|
64
|
+
|
65
|
+
@items
|
66
|
+
end
|
49
67
|
end
|
50
68
|
end
|
@@ -38,10 +38,8 @@ RSpec.describe DynamodbRecord::Associations, :vcr do
|
|
38
38
|
car.users.destroy(user)
|
39
39
|
expect(car.users.count).to eq(2)
|
40
40
|
end
|
41
|
-
|
42
41
|
end
|
43
42
|
|
44
|
-
|
45
43
|
describe '#has_many' do
|
46
44
|
it 'get collection' do
|
47
45
|
car = Car.find!('UVX455')
|
@@ -54,6 +52,13 @@ RSpec.describe DynamodbRecord::Associations, :vcr do
|
|
54
52
|
insurance = car.insurances.create!(name: 'fasecolda')
|
55
53
|
expect(insurance).to be_an(Insurance)
|
56
54
|
end
|
55
|
+
|
56
|
+
it 'create item with <<' do
|
57
|
+
car = Car.find!('UVX455')
|
58
|
+
insurance = Insurance.find!('12')
|
59
|
+
car_insurances = car.insurances << insurance
|
60
|
+
expect(car_insurances.any? { |item| item.id == insurance.id }).to eq(true)
|
61
|
+
end
|
57
62
|
end
|
58
63
|
|
59
64
|
describe '#belongs_to' do
|
@@ -9,23 +9,25 @@ http_interactions:
|
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- ''
|
12
|
+
Amz-Sdk-Invocation-Id:
|
13
|
+
- 82a096b7-4dcb-4971-a2f5-2a5422bd6896
|
12
14
|
Content-Type:
|
13
15
|
- application/x-amz-json-1.0
|
14
16
|
X-Amz-Target:
|
15
17
|
- DynamoDB_20120810.GetItem
|
16
18
|
User-Agent:
|
17
|
-
- aws-sdk-ruby3/3.
|
19
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
18
20
|
md/3.2.3 cfg/retry-mode#legacy
|
19
21
|
Host:
|
20
22
|
- localhost:8000
|
21
23
|
X-Amz-Date:
|
22
|
-
-
|
24
|
+
- 20240531T203020Z
|
23
25
|
X-Amz-Content-Sha256:
|
24
26
|
- efb57ec65a1d5400e11f2c1d7ef1abae0923c0d84b3e4a442db0abcb6408f474
|
25
27
|
Authorization:
|
26
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
27
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
28
|
-
Signature=
|
28
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
29
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
30
|
+
Signature=f0f1f9990edd7886e7c723b18d07574ef1241b6df0a68edd907cab7c8c0675e3
|
29
31
|
Content-Length:
|
30
32
|
- '63'
|
31
33
|
Accept:
|
@@ -36,21 +38,21 @@ http_interactions:
|
|
36
38
|
message: OK
|
37
39
|
headers:
|
38
40
|
Date:
|
39
|
-
-
|
41
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
40
42
|
X-Amzn-Requestid:
|
41
|
-
-
|
43
|
+
- 25f44928-cec6-4efc-a435-219587453290
|
42
44
|
Content-Type:
|
43
45
|
- application/x-amz-json-1.0
|
44
46
|
X-Amz-Crc32:
|
45
|
-
- '
|
47
|
+
- '1835808279'
|
46
48
|
Content-Length:
|
47
|
-
- '
|
49
|
+
- '147'
|
48
50
|
Server:
|
49
|
-
- Jetty(
|
51
|
+
- Jetty(9.4.48.v20220622)
|
50
52
|
body:
|
51
53
|
encoding: UTF-8
|
52
|
-
string: '{"Item":{"
|
53
|
-
recorded_at:
|
54
|
+
string: '{"Item":{"created_at":{"S":"2024-05-31T15:29:47-05:00"},"id":{"S":"12345"},"updated_at":{"S":"2024-05-31T15:29:47-05:00"},"car_id":{"S":"UVX455"}}}'
|
55
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
54
56
|
- request:
|
55
57
|
method: post
|
56
58
|
uri: http://localhost:8000/
|
@@ -60,23 +62,25 @@ http_interactions:
|
|
60
62
|
headers:
|
61
63
|
Accept-Encoding:
|
62
64
|
- ''
|
65
|
+
Amz-Sdk-Invocation-Id:
|
66
|
+
- 2a2bee78-402a-4cb4-8df1-7335168c7e1f
|
63
67
|
Content-Type:
|
64
68
|
- application/x-amz-json-1.0
|
65
69
|
X-Amz-Target:
|
66
70
|
- DynamoDB_20120810.GetItem
|
67
71
|
User-Agent:
|
68
|
-
- aws-sdk-ruby3/3.
|
72
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
69
73
|
md/3.2.3 cfg/retry-mode#legacy
|
70
74
|
Host:
|
71
75
|
- localhost:8000
|
72
76
|
X-Amz-Date:
|
73
|
-
-
|
77
|
+
- 20240531T203020Z
|
74
78
|
X-Amz-Content-Sha256:
|
75
79
|
- 3f40080fdb7ac1732232c14b86645a9ffbd3f94cf8ecda6b3c584d105288bb8d
|
76
80
|
Authorization:
|
77
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
78
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
79
|
-
Signature=
|
81
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
82
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
83
|
+
Signature=6083bcf5e4610b6881eea1980aaf65689809b86ff8deec22777cda31ae753670
|
80
84
|
Content-Length:
|
81
85
|
- '58'
|
82
86
|
Accept:
|
@@ -87,19 +91,19 @@ http_interactions:
|
|
87
91
|
message: OK
|
88
92
|
headers:
|
89
93
|
Date:
|
90
|
-
-
|
94
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
91
95
|
X-Amzn-Requestid:
|
92
|
-
-
|
96
|
+
- 16c19001-7dad-432e-a479-3d8fc978ff97
|
93
97
|
Content-Type:
|
94
98
|
- application/x-amz-json-1.0
|
95
99
|
X-Amz-Crc32:
|
96
|
-
- '
|
100
|
+
- '2965787765'
|
97
101
|
Content-Length:
|
98
|
-
- '
|
102
|
+
- '124'
|
99
103
|
Server:
|
100
|
-
- Jetty(
|
104
|
+
- Jetty(9.4.48.v20220622)
|
101
105
|
body:
|
102
106
|
encoding: UTF-8
|
103
|
-
string: '{"Item":{"
|
104
|
-
recorded_at:
|
107
|
+
string: '{"Item":{"updated_at":{"S":"2024-05-31T15:29:47-05:00"},"created_at":{"S":"2024-05-31T15:29:47-05:00"},"id":{"S":"UVX455"}}}'
|
108
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
105
109
|
recorded_with: VCR 6.2.0
|
data/spec/fixtures/vcr_cassettes/DynamodbRecord_Associations/_has_and_belongs_to_many/create.yml
CHANGED
@@ -9,23 +9,25 @@ http_interactions:
|
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- ''
|
12
|
+
Amz-Sdk-Invocation-Id:
|
13
|
+
- e1ebd743-672c-430a-9e14-1b06ec5bb837
|
12
14
|
Content-Type:
|
13
15
|
- application/x-amz-json-1.0
|
14
16
|
X-Amz-Target:
|
15
17
|
- DynamoDB_20120810.GetItem
|
16
18
|
User-Agent:
|
17
|
-
- aws-sdk-ruby3/3.
|
19
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
18
20
|
md/3.2.3 cfg/retry-mode#legacy
|
19
21
|
Host:
|
20
22
|
- localhost:8000
|
21
23
|
X-Amz-Date:
|
22
|
-
-
|
24
|
+
- 20240531T203020Z
|
23
25
|
X-Amz-Content-Sha256:
|
24
26
|
- 3f40080fdb7ac1732232c14b86645a9ffbd3f94cf8ecda6b3c584d105288bb8d
|
25
27
|
Authorization:
|
26
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
27
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
28
|
-
Signature=
|
28
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
29
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
30
|
+
Signature=3a4be5ce148f800d64ef28f8f54ef72cdc1ab9e845fd7bf93c553aad4e9c4672
|
29
31
|
Content-Length:
|
30
32
|
- '58'
|
31
33
|
Accept:
|
@@ -36,21 +38,21 @@ http_interactions:
|
|
36
38
|
message: OK
|
37
39
|
headers:
|
38
40
|
Date:
|
39
|
-
-
|
41
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
40
42
|
X-Amzn-Requestid:
|
41
|
-
-
|
43
|
+
- 398d9142-8397-4328-9bbc-46e90e494d83
|
42
44
|
Content-Type:
|
43
45
|
- application/x-amz-json-1.0
|
44
46
|
X-Amz-Crc32:
|
45
|
-
- '
|
47
|
+
- '2965787765'
|
46
48
|
Content-Length:
|
47
|
-
- '
|
49
|
+
- '124'
|
48
50
|
Server:
|
49
|
-
- Jetty(
|
51
|
+
- Jetty(9.4.48.v20220622)
|
50
52
|
body:
|
51
53
|
encoding: UTF-8
|
52
|
-
string: '{"Item":{"
|
53
|
-
recorded_at:
|
54
|
+
string: '{"Item":{"updated_at":{"S":"2024-05-31T15:29:47-05:00"},"created_at":{"S":"2024-05-31T15:29:47-05:00"},"id":{"S":"UVX455"}}}'
|
55
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
54
56
|
- request:
|
55
57
|
method: post
|
56
58
|
uri: http://localhost:8000/
|
@@ -61,23 +63,25 @@ http_interactions:
|
|
61
63
|
headers:
|
62
64
|
Accept-Encoding:
|
63
65
|
- ''
|
66
|
+
Amz-Sdk-Invocation-Id:
|
67
|
+
- 9d25a1f7-feca-49c5-9795-f6681792075a
|
64
68
|
Content-Type:
|
65
69
|
- application/x-amz-json-1.0
|
66
70
|
X-Amz-Target:
|
67
71
|
- DynamoDB_20120810.Query
|
68
72
|
User-Agent:
|
69
|
-
- aws-sdk-ruby3/3.
|
73
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
70
74
|
md/3.2.3 cfg/retry-mode#legacy
|
71
75
|
Host:
|
72
76
|
- localhost:8000
|
73
77
|
X-Amz-Date:
|
74
|
-
-
|
78
|
+
- 20240531T203020Z
|
75
79
|
X-Amz-Content-Sha256:
|
76
80
|
- cace0a22d92863fee1a25aaedd2a1d186e28b09ab69c98bf43ee1e5d1e62dc78
|
77
81
|
Authorization:
|
78
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
79
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
80
|
-
Signature=
|
82
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
83
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
84
|
+
Signature=7e430110c350a266b6bd93708974c421f955d1a2f6b9c549504b2d5da67a1646
|
81
85
|
Content-Length:
|
82
86
|
- '184'
|
83
87
|
Accept:
|
@@ -88,21 +92,21 @@ http_interactions:
|
|
88
92
|
message: OK
|
89
93
|
headers:
|
90
94
|
Date:
|
91
|
-
-
|
95
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
92
96
|
X-Amzn-Requestid:
|
93
|
-
-
|
97
|
+
- a51b9a22-c46f-4c9f-951e-8a53b859d40b
|
94
98
|
Content-Type:
|
95
99
|
- application/x-amz-json-1.0
|
96
100
|
X-Amz-Crc32:
|
97
|
-
- '
|
101
|
+
- '1826001805'
|
98
102
|
Content-Length:
|
99
|
-
- '
|
103
|
+
- '149'
|
100
104
|
Server:
|
101
|
-
- Jetty(
|
105
|
+
- Jetty(9.4.48.v20220622)
|
102
106
|
body:
|
103
107
|
encoding: UTF-8
|
104
|
-
string: '{"Items":[{"user_id":{"S":"hguzman10@gmail.com"},"car_id":{"S":"UVX455"},"created_at":{"S":"2024-05-
|
105
|
-
recorded_at:
|
108
|
+
string: '{"Items":[{"user_id":{"S":"hguzman10@gmail.com"},"car_id":{"S":"UVX455"},"created_at":{"S":"2024-05-31T15:30:20-05:00"}}],"Count":1,"ScannedCount":1}'
|
109
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
106
110
|
- request:
|
107
111
|
method: post
|
108
112
|
uri: http://localhost:8000/
|
@@ -112,74 +116,25 @@ http_interactions:
|
|
112
116
|
headers:
|
113
117
|
Accept-Encoding:
|
114
118
|
- ''
|
119
|
+
Amz-Sdk-Invocation-Id:
|
120
|
+
- b003a5e5-b73a-4b6c-8796-6e7ce085dde4
|
115
121
|
Content-Type:
|
116
122
|
- application/x-amz-json-1.0
|
117
123
|
X-Amz-Target:
|
118
124
|
- DynamoDB_20120810.GetItem
|
119
125
|
User-Agent:
|
120
|
-
- aws-sdk-ruby3/3.
|
126
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
121
127
|
md/3.2.3 cfg/retry-mode#legacy
|
122
128
|
Host:
|
123
129
|
- localhost:8000
|
124
130
|
X-Amz-Date:
|
125
|
-
-
|
131
|
+
- 20240531T203020Z
|
126
132
|
X-Amz-Content-Sha256:
|
127
133
|
- ab20f394f9f17ab85359c8cef098ff2e93991ca4f4f9402376eaa33ea97d5545
|
128
134
|
Authorization:
|
129
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
130
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
131
|
-
Signature=
|
132
|
-
Content-Length:
|
133
|
-
- '72'
|
134
|
-
Accept:
|
135
|
-
- "*/*"
|
136
|
-
response:
|
137
|
-
status:
|
138
|
-
code: 200
|
139
|
-
message: OK
|
140
|
-
headers:
|
141
|
-
Date:
|
142
|
-
- Mon, 20 May 2024 00:35:42 GMT
|
143
|
-
X-Amzn-Requestid:
|
144
|
-
- 4015f9f2-51f3-4643-8a33-124c9d6d1175
|
145
|
-
Content-Type:
|
146
|
-
- application/x-amz-json-1.0
|
147
|
-
X-Amz-Crc32:
|
148
|
-
- '2698900000'
|
149
|
-
Content-Length:
|
150
|
-
- '247'
|
151
|
-
Server:
|
152
|
-
- Jetty(11.0.17)
|
153
|
-
body:
|
154
|
-
encoding: UTF-8
|
155
|
-
string: '{"Item":{"code":{"N":"2133"},"balance":{"N":"10"},"updated_at":{"S":"2024-05-14T13:48:27-05:00"},"overdraft":{"N":"0"},"roles":{"L":[{"S":"admin"},{"S":"assitant"}]},"created_at":{"S":"2024-05-14T13:48:27-05:00"},"id":{"S":"hguzman10@gmail.com"}}}'
|
156
|
-
recorded_at: Mon, 20 May 2024 00:35:42 GMT
|
157
|
-
- request:
|
158
|
-
method: post
|
159
|
-
uri: http://localhost:8000/
|
160
|
-
body:
|
161
|
-
encoding: UTF-8
|
162
|
-
string: '{"TableName":"fleteo-v2-users","Key":{"id":{"S":"hguzman30@gmail.com"}}}'
|
163
|
-
headers:
|
164
|
-
Accept-Encoding:
|
165
|
-
- ''
|
166
|
-
Content-Type:
|
167
|
-
- application/x-amz-json-1.0
|
168
|
-
X-Amz-Target:
|
169
|
-
- DynamoDB_20120810.GetItem
|
170
|
-
User-Agent:
|
171
|
-
- aws-sdk-ruby3/3.191.6 ua/2.0 api/dynamodb#1.106.0 os/macos#20 md/x86_64 lang/ruby#3.2.3
|
172
|
-
md/3.2.3 cfg/retry-mode#legacy
|
173
|
-
Host:
|
174
|
-
- localhost:8000
|
175
|
-
X-Amz-Date:
|
176
|
-
- 20240520T003542Z
|
177
|
-
X-Amz-Content-Sha256:
|
178
|
-
- a79dcb92885a84695d4b1862815eea675a96021cd0385eb31b4c9bd91074dd19
|
179
|
-
Authorization:
|
180
|
-
- AWS4-HMAC-SHA256 Credential=key/20240520/us-east-1/dynamodb/aws4_request,
|
181
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
182
|
-
Signature=2d2da4ef48638ff5f344d1d5aa11334f7dff2c9a2d6ce7615bda85b932661523
|
135
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
136
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
137
|
+
Signature=ef5084fa8247916b0735fd26ee6bebfd2558e8ecafe480ee67421393cdea2089
|
183
138
|
Content-Length:
|
184
139
|
- '72'
|
185
140
|
Accept:
|
@@ -190,47 +145,49 @@ http_interactions:
|
|
190
145
|
message: OK
|
191
146
|
headers:
|
192
147
|
Date:
|
193
|
-
-
|
148
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
194
149
|
X-Amzn-Requestid:
|
195
|
-
-
|
150
|
+
- 93d356a3-6656-4b67-9da7-d73f876060ac
|
196
151
|
Content-Type:
|
197
152
|
- application/x-amz-json-1.0
|
198
153
|
X-Amz-Crc32:
|
199
|
-
- '
|
154
|
+
- '1366903316'
|
200
155
|
Content-Length:
|
201
156
|
- '157'
|
202
157
|
Server:
|
203
|
-
- Jetty(
|
158
|
+
- Jetty(9.4.48.v20220622)
|
204
159
|
body:
|
205
160
|
encoding: UTF-8
|
206
|
-
string: '{"Item":{"created_at":{"S":"2024-05-
|
207
|
-
recorded_at:
|
161
|
+
string: '{"Item":{"created_at":{"S":"2024-05-31T15:29:47-05:00"},"id":{"S":"hguzman10@gmail.com"},"balance":{"N":"0"},"updated_at":{"S":"2024-05-31T15:29:47-05:00"}}}'
|
162
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
208
163
|
- request:
|
209
164
|
method: post
|
210
165
|
uri: http://localhost:8000/
|
211
166
|
body:
|
212
167
|
encoding: UTF-8
|
213
|
-
string: '{"TableName":"fleteo-v2-users","Item":{"balance":{"N":"0"},"id":{"S":"hguzman50@gmail.com"},"created_at":{"S":"2024-05-
|
168
|
+
string: '{"TableName":"fleteo-v2-users","Item":{"balance":{"N":"0"},"id":{"S":"hguzman50@gmail.com"},"created_at":{"S":"2024-05-31T15:30:20-05:00"},"updated_at":{"S":"2024-05-31T15:30:20-05:00"}}}'
|
214
169
|
headers:
|
215
170
|
Accept-Encoding:
|
216
171
|
- ''
|
172
|
+
Amz-Sdk-Invocation-Id:
|
173
|
+
- 620abcdb-0a71-443f-a4db-9263dfe2605a
|
217
174
|
Content-Type:
|
218
175
|
- application/x-amz-json-1.0
|
219
176
|
X-Amz-Target:
|
220
177
|
- DynamoDB_20120810.PutItem
|
221
178
|
User-Agent:
|
222
|
-
- aws-sdk-ruby3/3.
|
179
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
223
180
|
md/3.2.3 cfg/retry-mode#legacy
|
224
181
|
Host:
|
225
182
|
- localhost:8000
|
226
183
|
X-Amz-Date:
|
227
|
-
-
|
184
|
+
- 20240531T203020Z
|
228
185
|
X-Amz-Content-Sha256:
|
229
|
-
-
|
186
|
+
- '0218027c93753f19174cb0fd30472457a85883ed61bc0d79b192693507567d64'
|
230
187
|
Authorization:
|
231
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
232
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
233
|
-
Signature=
|
188
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
189
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
190
|
+
Signature=157969ac604c93ad96f9ca086bdeefced1e9924a055091a0e9591781981570eb
|
234
191
|
Content-Length:
|
235
192
|
- '187'
|
236
193
|
Accept:
|
@@ -241,9 +198,9 @@ http_interactions:
|
|
241
198
|
message: OK
|
242
199
|
headers:
|
243
200
|
Date:
|
244
|
-
-
|
201
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
245
202
|
X-Amzn-Requestid:
|
246
|
-
-
|
203
|
+
- f3c25294-c12d-4886-ad12-b419f58c7406
|
247
204
|
Content-Type:
|
248
205
|
- application/x-amz-json-1.0
|
249
206
|
X-Amz-Crc32:
|
@@ -251,37 +208,39 @@ http_interactions:
|
|
251
208
|
Content-Length:
|
252
209
|
- '2'
|
253
210
|
Server:
|
254
|
-
- Jetty(
|
211
|
+
- Jetty(9.4.48.v20220622)
|
255
212
|
body:
|
256
213
|
encoding: UTF-8
|
257
214
|
string: "{}"
|
258
|
-
recorded_at:
|
215
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
259
216
|
- request:
|
260
217
|
method: post
|
261
218
|
uri: http://localhost:8000/
|
262
219
|
body:
|
263
220
|
encoding: UTF-8
|
264
|
-
string: '{"TableName":"fleteo-v2-cars-users","Item":{"car_id":{"S":"UVX455"},"user_id":{"S":"hguzman50@gmail.com"},"created_at":{"S":"2024-05-
|
221
|
+
string: '{"TableName":"fleteo-v2-cars-users","Item":{"car_id":{"S":"UVX455"},"user_id":{"S":"hguzman50@gmail.com"},"created_at":{"S":"2024-05-31T15:30:20-05:00"}}}'
|
265
222
|
headers:
|
266
223
|
Accept-Encoding:
|
267
224
|
- ''
|
225
|
+
Amz-Sdk-Invocation-Id:
|
226
|
+
- 4576eb9a-4c0a-4d00-a312-0015b20a910d
|
268
227
|
Content-Type:
|
269
228
|
- application/x-amz-json-1.0
|
270
229
|
X-Amz-Target:
|
271
230
|
- DynamoDB_20120810.PutItem
|
272
231
|
User-Agent:
|
273
|
-
- aws-sdk-ruby3/3.
|
232
|
+
- aws-sdk-ruby3/3.196.1 ua/2.0 api/dynamodb#1.111.0 os/macos#23 md/arm64 lang/ruby#3.2.3
|
274
233
|
md/3.2.3 cfg/retry-mode#legacy
|
275
234
|
Host:
|
276
235
|
- localhost:8000
|
277
236
|
X-Amz-Date:
|
278
|
-
-
|
237
|
+
- 20240531T203020Z
|
279
238
|
X-Amz-Content-Sha256:
|
280
|
-
-
|
239
|
+
- da478dee13a22865505669b847c8f0b449fe8aa84a668b1dda0f29e85273a4d6
|
281
240
|
Authorization:
|
282
|
-
- AWS4-HMAC-SHA256 Credential=key/
|
283
|
-
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
284
|
-
Signature=
|
241
|
+
- AWS4-HMAC-SHA256 Credential=key/20240531/us-east-1/dynamodb/aws4_request,
|
242
|
+
SignedHeaders=amz-sdk-invocation-id;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
243
|
+
Signature=36848abeb20dba1f6c7744e8a65f00c37d36e52d5bce7953fb2120a13ef8a2f6
|
285
244
|
Content-Length:
|
286
245
|
- '154'
|
287
246
|
Accept:
|
@@ -292,9 +251,9 @@ http_interactions:
|
|
292
251
|
message: OK
|
293
252
|
headers:
|
294
253
|
Date:
|
295
|
-
-
|
254
|
+
- Fri, 31 May 2024 20:30:20 GMT
|
296
255
|
X-Amzn-Requestid:
|
297
|
-
-
|
256
|
+
- 22b217f0-047c-4454-8114-c8cfe21acd95
|
298
257
|
Content-Type:
|
299
258
|
- application/x-amz-json-1.0
|
300
259
|
X-Amz-Crc32:
|
@@ -302,9 +261,9 @@ http_interactions:
|
|
302
261
|
Content-Length:
|
303
262
|
- '2'
|
304
263
|
Server:
|
305
|
-
- Jetty(
|
264
|
+
- Jetty(9.4.48.v20220622)
|
306
265
|
body:
|
307
266
|
encoding: UTF-8
|
308
267
|
string: "{}"
|
309
|
-
recorded_at:
|
268
|
+
recorded_at: Fri, 31 May 2024 20:30:20 GMT
|
310
269
|
recorded_with: VCR 6.2.0
|