dynamodb_record 0.0.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 +7 -0
- data/.github/workflows/ci.yml +44 -0
- data/.gitignore +30 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +10 -0
- data/LICENSE +21 -0
- data/README.md +82 -0
- data/dynamodb_record.gemspec +32 -0
- data/lib/dynamodb_record/associations.rb +59 -0
- data/lib/dynamodb_record/collection.rb +47 -0
- data/lib/dynamodb_record/config.rb +16 -0
- data/lib/dynamodb_record/document.rb +45 -0
- data/lib/dynamodb_record/fields.rb +131 -0
- data/lib/dynamodb_record/finders.rb +21 -0
- data/lib/dynamodb_record/persistence.rb +127 -0
- data/lib/dynamodb_record/query.rb +50 -0
- data/lib/dynamodb_record/version.rb +5 -0
- data/lib/dynamodb_record.rb +27 -0
- data/spec/app/models/person.rb +7 -0
- data/spec/app/models/user.rb +5 -0
- data/spec/dynamodb_record/document_spec.rb +25 -0
- data/spec/dynamodb_record/fields_spec.rb +101 -0
- data/spec/dynamodb_record/finders_spec.rb +19 -0
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Document/initializes_from_database.yml +54 -0
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/finds_record.yml +54 -0
- data/spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/when_record_doesn_t_exists/returns_empty_object.yml +54 -0
- data/spec/spec_helper.rb +18 -0
- metadata +225 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DynamodbRecord
|
4
|
+
# Query Module
|
5
|
+
module Query
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
# Module that provides class methods for queries against the DynamoDB database.
|
9
|
+
module ClassMethods
|
10
|
+
def all(opts = {})
|
11
|
+
options = default_options
|
12
|
+
options.merge!(opts.slice(:limit))
|
13
|
+
response = client.scan(options)
|
14
|
+
DynamodbRecord::Collection.new(response, self)
|
15
|
+
end
|
16
|
+
|
17
|
+
# search table
|
18
|
+
# @param opts [Hash] Limit of record and exclusive_start_key
|
19
|
+
def where(opts = {})
|
20
|
+
limit = opts.delete(:limit)
|
21
|
+
exclusive_start_key = opts.delete(:exclusive_start_key)
|
22
|
+
|
23
|
+
expression_attribute_names = {}
|
24
|
+
expression_attribute_values = {}
|
25
|
+
filter_expression = ''
|
26
|
+
opts.each do |key, value|
|
27
|
+
expression_attribute_names["##{key}".to_sym] = key.to_s
|
28
|
+
expression_attribute_values[":#{key}"] = value
|
29
|
+
filter_expression << if filter_expression.empty?
|
30
|
+
"##{key} = :#{key}"
|
31
|
+
else
|
32
|
+
" And ##{key} = :#{key}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
options = default_options
|
37
|
+
options.merge!(limit:) if limit
|
38
|
+
options.merge!(expression_attribute_names:) if expression_attribute_names.present?
|
39
|
+
options.merge!(expression_attribute_values:) if expression_attribute_values.present?
|
40
|
+
options.merge!(filter_expression:) if filter_expression.present?
|
41
|
+
if exclusive_start_key.present?
|
42
|
+
json_string_decode = Base64.urlsafe_decode64(exclusive_start_key)
|
43
|
+
decode = JSON.parse(json_string_decode)
|
44
|
+
options.merge!(exclusive_start_key: decode)
|
45
|
+
end
|
46
|
+
DynamodbRecord::Collection.new(client.scan(options), self)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'securerandom'
|
4
|
+
require 'active_support'
|
5
|
+
require 'active_support/concern'
|
6
|
+
require 'active_support/core_ext'
|
7
|
+
|
8
|
+
require 'aws-sdk-dynamodb'
|
9
|
+
|
10
|
+
require 'dynamodb_record/version'
|
11
|
+
require 'dynamodb_record/config'
|
12
|
+
require 'dynamodb_record/collection'
|
13
|
+
require 'dynamodb_record/fields'
|
14
|
+
require 'dynamodb_record/persistence'
|
15
|
+
require 'dynamodb_record/associations'
|
16
|
+
require 'dynamodb_record/finders'
|
17
|
+
require 'dynamodb_record/query'
|
18
|
+
require 'dynamodb_record/document'
|
19
|
+
|
20
|
+
module DynamodbRecord
|
21
|
+
extend self
|
22
|
+
|
23
|
+
def configure
|
24
|
+
block_given? ? yield(DynamodbRecord::Config) : DynamodbRecord::Config
|
25
|
+
end
|
26
|
+
alias config configure
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe DynamodbRecord::Document do
|
4
|
+
it 'initializes a new document' do
|
5
|
+
class Person
|
6
|
+
include DynamodbRecord::Document
|
7
|
+
end
|
8
|
+
person = Person.new
|
9
|
+
expect(person.new_record).to be_truthy
|
10
|
+
expect(person.attributes).to be_empty
|
11
|
+
end
|
12
|
+
|
13
|
+
# it 'initializes from database', :vcr do
|
14
|
+
# user = User.find('hguzman10@gmail.com')
|
15
|
+
# expect(user.new_record).to be_falsy
|
16
|
+
# end
|
17
|
+
|
18
|
+
it 'raises error on unknown field' do
|
19
|
+
expect { User.new({ unknown_field: 'unknown' }) }.to raise_error(NoMethodError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'can ignore unknown field' do
|
23
|
+
expect { User.new({ unknown_field: 'unknown' }, true) }.to_not raise_error(NoMethodError)
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe DynamodbRecord::Fields do
|
4
|
+
it 'has default id primary key field' do
|
5
|
+
user = User.new
|
6
|
+
expect(user.id).to be_nil
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'accepts adding fields' do
|
10
|
+
class Employee
|
11
|
+
include DynamodbRecord::Document
|
12
|
+
|
13
|
+
field :first_name, :string
|
14
|
+
field :last_name, :string
|
15
|
+
end
|
16
|
+
expect(Employee.attributes).to eq({ id: { type: :string, options: {} },
|
17
|
+
first_name: { type: :string, options: {} },
|
18
|
+
last_name: { type: :string, options: {} } })
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'accepts default value' do
|
22
|
+
class City
|
23
|
+
include DynamodbRecord::Document
|
24
|
+
|
25
|
+
field :population, :integer, default: 0
|
26
|
+
end
|
27
|
+
|
28
|
+
expect(City.new.population).to eq(0)
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'coearce field to its data type when intializing' do
|
32
|
+
class Record
|
33
|
+
include DynamodbRecord::Document
|
34
|
+
|
35
|
+
field :integer_field, :integer
|
36
|
+
field :big_decimal_field, :big_decimal
|
37
|
+
field :datetime_field, :datetime
|
38
|
+
field :boolean_field, :boolean
|
39
|
+
end
|
40
|
+
|
41
|
+
expect(Record.new(integer_field: '1').integer_field).to be_a(Integer)
|
42
|
+
expect(Record.new(big_decimal_field: '1').big_decimal_field).to be_a(BigDecimal)
|
43
|
+
expect(Record.new(datetime_field: '2014-12-25T04:08:25Z').datetime_field).to eq(DateTime.parse('2014-12-25T04:08:25Z'))
|
44
|
+
expect(Record.new(boolean_field: 'true').boolean_field).to be_truthy
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'coearce field to its data type when calling writer' do
|
48
|
+
person = Person.new
|
49
|
+
person.created_at = '2015-01-23T04:27:21Z'
|
50
|
+
expect(person.created_at).to eq(DateTime.parse('2015-01-23T04:27:21Z'))
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'predicate method' do
|
54
|
+
specify { expect(Person.new(activated: false).activated?).to be_falsy }
|
55
|
+
specify { expect(Person.new(activated: true).activated?).to be_truthy }
|
56
|
+
specify { expect(Person.new(activated: 'true').activated?).to be_truthy }
|
57
|
+
specify { expect(Person.new(activated: 'false').activated?).to be_falsy }
|
58
|
+
end
|
59
|
+
|
60
|
+
describe '#unload' do
|
61
|
+
it 'unloads DateTime into String' do
|
62
|
+
now = DateTime.now
|
63
|
+
attrs = Person.unload({ created_at: now })
|
64
|
+
expect(attrs[:created_at]).to eq(now.iso8601)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
describe '#attributes=' do
|
69
|
+
it 'set attributes from hash' do
|
70
|
+
person = Person.new(name: 'A Person', activated: true)
|
71
|
+
person.attributes = { name: 'Updated Person', activated: false }
|
72
|
+
expect(person.name).to eq('Updated Person')
|
73
|
+
expect(person.activated).to eq(false)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'keys' do
|
78
|
+
it 'returns table\'s range key' do
|
79
|
+
class ThreadKey
|
80
|
+
include DynamodbRecord::Document
|
81
|
+
|
82
|
+
field :subject, :string, range_key: true
|
83
|
+
end
|
84
|
+
|
85
|
+
expect(ThreadKey.range_key).to eq(:subject)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'index' do
|
90
|
+
it 'returns table\'s secondary index' do
|
91
|
+
class ThreadKey
|
92
|
+
include DynamodbRecord::Document
|
93
|
+
|
94
|
+
field :name, :string, hash_key: true
|
95
|
+
field :subject, :string, index: true
|
96
|
+
end
|
97
|
+
|
98
|
+
expect(ThreadKey.secondary_indexes).to eq([:subject])
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe DynamodbRecord::Fields, :vcr do
|
4
|
+
describe '#find' do
|
5
|
+
# it 'finds record' do
|
6
|
+
# user = User.find('hguzman10@gmail.com')
|
7
|
+
# p user
|
8
|
+
# expect(user.id).to eq('hguzman10@gmail.com')
|
9
|
+
# expect(user.balance).to eq(0)
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# context 'when record doesn\'t exists' do
|
13
|
+
# it 'returns empty object' do
|
14
|
+
# user = User.find('not here')
|
15
|
+
# expect(user).to be_nil
|
16
|
+
# end
|
17
|
+
# end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8000/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"TableName":"users","Key":{"id":{"S":"hguzman10@gmail.com"}}}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- ''
|
12
|
+
Content-Type:
|
13
|
+
- application/x-amz-json-1.0
|
14
|
+
X-Amz-Target:
|
15
|
+
- DynamoDB_20120810.GetItem
|
16
|
+
User-Agent:
|
17
|
+
- aws-sdk-ruby3/3.191.3 ua/2.0 api/dynamodb#1.105.0 os/macos#20 md/x86_64 lang/ruby#3.2.3
|
18
|
+
md/3.2.3 cfg/retry-mode#legacy
|
19
|
+
Host:
|
20
|
+
- localhost:8000
|
21
|
+
X-Amz-Date:
|
22
|
+
- 20240418T230852Z
|
23
|
+
X-Amz-Content-Sha256:
|
24
|
+
- 7e2248df156bd85d1c08add1aaa7b84ed6041fe96165fb6879ddbb1424663802
|
25
|
+
Authorization:
|
26
|
+
- AWS4-HMAC-SHA256 Credential=AKIAV3OBKSDM5UO5PK5A/20240418/us-east-1/dynamodb/aws4_request,
|
27
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
28
|
+
Signature=a6e8d3a4fbfcc98091bff89a3d492337c072c486ea0a1d05c6ee45d69ff0834f
|
29
|
+
Content-Length:
|
30
|
+
- '62'
|
31
|
+
Accept:
|
32
|
+
- "*/*"
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 200
|
36
|
+
message: OK
|
37
|
+
headers:
|
38
|
+
Date:
|
39
|
+
- Thu, 18 Apr 2024 23:08:52 GMT
|
40
|
+
X-Amzn-Requestid:
|
41
|
+
- 2905a9b7-87da-494c-ba16-3d26a0e3df6b
|
42
|
+
Content-Type:
|
43
|
+
- application/x-amz-json-1.0
|
44
|
+
X-Amz-Crc32:
|
45
|
+
- '3745271733'
|
46
|
+
Content-Length:
|
47
|
+
- '63'
|
48
|
+
Server:
|
49
|
+
- Jetty(11.0.17)
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: '{"Item":{"balance":{"N":"0"},"id":{"S":"hguzman10@gmail.com"}}}'
|
53
|
+
recorded_at: Thu, 18 Apr 2024 23:08:52 GMT
|
54
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8000/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"TableName":"users","Key":{"id":{"S":"hguzman10@gmail.com"}}}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- ''
|
12
|
+
Content-Type:
|
13
|
+
- application/x-amz-json-1.0
|
14
|
+
X-Amz-Target:
|
15
|
+
- DynamoDB_20120810.GetItem
|
16
|
+
User-Agent:
|
17
|
+
- aws-sdk-ruby3/3.191.3 ua/2.0 api/dynamodb#1.105.0 os/macos#20 md/x86_64 lang/ruby#3.2.3
|
18
|
+
md/3.2.3 cfg/retry-mode#legacy
|
19
|
+
Host:
|
20
|
+
- localhost:8000
|
21
|
+
X-Amz-Date:
|
22
|
+
- 20240419T150314Z
|
23
|
+
X-Amz-Content-Sha256:
|
24
|
+
- 7e2248df156bd85d1c08add1aaa7b84ed6041fe96165fb6879ddbb1424663802
|
25
|
+
Authorization:
|
26
|
+
- AWS4-HMAC-SHA256 Credential=AKIAV3OBKSDM5UO5PK5A/20240419/us-east-1/dynamodb/aws4_request,
|
27
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
28
|
+
Signature=eabad8cbbf72dd69908f08a4144d979c1287ad246a253639c311a2ddda0ae2df
|
29
|
+
Content-Length:
|
30
|
+
- '62'
|
31
|
+
Accept:
|
32
|
+
- "*/*"
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 200
|
36
|
+
message: OK
|
37
|
+
headers:
|
38
|
+
Date:
|
39
|
+
- Fri, 19 Apr 2024 15:03:14 GMT
|
40
|
+
X-Amzn-Requestid:
|
41
|
+
- 8dff3212-b275-4948-a0ff-197f620c2344
|
42
|
+
Content-Type:
|
43
|
+
- application/x-amz-json-1.0
|
44
|
+
X-Amz-Crc32:
|
45
|
+
- '3745271733'
|
46
|
+
Content-Length:
|
47
|
+
- '63'
|
48
|
+
Server:
|
49
|
+
- Jetty(11.0.17)
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: '{"Item":{"balance":{"N":"0"},"id":{"S":"hguzman10@gmail.com"}}}'
|
53
|
+
recorded_at: Fri, 19 Apr 2024 15:03:14 GMT
|
54
|
+
recorded_with: VCR 6.2.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:8000/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"TableName":"users","Key":{"id":{"S":"not here"}}}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- ''
|
12
|
+
Content-Type:
|
13
|
+
- application/x-amz-json-1.0
|
14
|
+
X-Amz-Target:
|
15
|
+
- DynamoDB_20120810.GetItem
|
16
|
+
User-Agent:
|
17
|
+
- aws-sdk-ruby3/3.191.3 ua/2.0 api/dynamodb#1.105.0 os/macos#20 md/x86_64 lang/ruby#3.2.3
|
18
|
+
md/3.2.3 cfg/retry-mode#legacy
|
19
|
+
Host:
|
20
|
+
- localhost:8000
|
21
|
+
X-Amz-Date:
|
22
|
+
- 20240419T150314Z
|
23
|
+
X-Amz-Content-Sha256:
|
24
|
+
- acbe242b07a1de9c8a8ac78119a8da7e4bf1d57c7d59ed18930d06ad600c9d6c
|
25
|
+
Authorization:
|
26
|
+
- AWS4-HMAC-SHA256 Credential=AKIAV3OBKSDM5UO5PK5A/20240419/us-east-1/dynamodb/aws4_request,
|
27
|
+
SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,
|
28
|
+
Signature=47085d1e327831fd245c6c4e369ab311a42ec360f91eb745820dec01bafc46d5
|
29
|
+
Content-Length:
|
30
|
+
- '51'
|
31
|
+
Accept:
|
32
|
+
- "*/*"
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 200
|
36
|
+
message: OK
|
37
|
+
headers:
|
38
|
+
Date:
|
39
|
+
- Fri, 19 Apr 2024 15:03:14 GMT
|
40
|
+
X-Amzn-Requestid:
|
41
|
+
- cbb6dfa5-b168-48ab-a3d6-64eca11dbc6e
|
42
|
+
Content-Type:
|
43
|
+
- application/x-amz-json-1.0
|
44
|
+
X-Amz-Crc32:
|
45
|
+
- '2745614147'
|
46
|
+
Content-Length:
|
47
|
+
- '2'
|
48
|
+
Server:
|
49
|
+
- Jetty(11.0.17)
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: "{}"
|
53
|
+
recorded_at: Fri, 19 Apr 2024 15:03:14 GMT
|
54
|
+
recorded_with: VCR 6.2.0
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'dynamodb_record'
|
2
|
+
|
3
|
+
MODELS = File.join(File.dirname(__FILE__), 'app/models')
|
4
|
+
Dir[File.join(MODELS, '*.rb')].sort.each { |file| require file }
|
5
|
+
|
6
|
+
require 'vcr'
|
7
|
+
|
8
|
+
VCR.configure do |c|
|
9
|
+
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
10
|
+
c.hook_into :webmock
|
11
|
+
c.configure_rspec_metadata!
|
12
|
+
c.default_cassette_options = { match_requests_on: %i[method uri body] }
|
13
|
+
end
|
14
|
+
|
15
|
+
DynamodbRecord.configure do |config|
|
16
|
+
config.namespace = nil
|
17
|
+
config.endpoint = 'http://localhost:8000'
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dynamodb_record
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Henry Guzman
|
8
|
+
- Jhon Santander
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '7.1'
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 7.1.3.2
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '7.1'
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 7.1.3.2
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: aws-sdk-dynamodb
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.105'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.105'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: aws-sdk-sqs
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.70'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.70'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: jwt
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.8'
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 2.8.1
|
72
|
+
type: :runtime
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '2.8'
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.8.1
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rexml
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.2'
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 3.2.6
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '3.2'
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 3.2.6
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rspec
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '3.7'
|
109
|
+
type: :development
|
110
|
+
prerelease: false
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '3.7'
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rubocop
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.62'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '1.62'
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
name: vcr
|
132
|
+
requirement: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '6.2'
|
137
|
+
type: :development
|
138
|
+
prerelease: false
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '6.2'
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: webmock
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '3.23'
|
151
|
+
type: :development
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '3.23'
|
158
|
+
description:
|
159
|
+
email:
|
160
|
+
- hguzman10@gmail.com
|
161
|
+
- jsantander1219@gmail.com
|
162
|
+
executables: []
|
163
|
+
extensions: []
|
164
|
+
extra_rdoc_files: []
|
165
|
+
files:
|
166
|
+
- ".github/workflows/ci.yml"
|
167
|
+
- ".gitignore"
|
168
|
+
- ".ruby-version"
|
169
|
+
- CHANGELOG.md
|
170
|
+
- Gemfile
|
171
|
+
- LICENSE
|
172
|
+
- README.md
|
173
|
+
- dynamodb_record.gemspec
|
174
|
+
- lib/dynamodb_record.rb
|
175
|
+
- lib/dynamodb_record/associations.rb
|
176
|
+
- lib/dynamodb_record/collection.rb
|
177
|
+
- lib/dynamodb_record/config.rb
|
178
|
+
- lib/dynamodb_record/document.rb
|
179
|
+
- lib/dynamodb_record/fields.rb
|
180
|
+
- lib/dynamodb_record/finders.rb
|
181
|
+
- lib/dynamodb_record/persistence.rb
|
182
|
+
- lib/dynamodb_record/query.rb
|
183
|
+
- lib/dynamodb_record/version.rb
|
184
|
+
- spec/app/models/person.rb
|
185
|
+
- spec/app/models/user.rb
|
186
|
+
- spec/dynamodb_record/document_spec.rb
|
187
|
+
- spec/dynamodb_record/fields_spec.rb
|
188
|
+
- spec/dynamodb_record/finders_spec.rb
|
189
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Document/initializes_from_database.yml
|
190
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/finds_record.yml
|
191
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/when_record_doesn_t_exists/returns_empty_object.yml
|
192
|
+
- spec/spec_helper.rb
|
193
|
+
homepage: https://github.com/CarsOk/dynamodb-record
|
194
|
+
licenses:
|
195
|
+
- MIT
|
196
|
+
metadata: {}
|
197
|
+
post_install_message:
|
198
|
+
rdoc_options: []
|
199
|
+
require_paths:
|
200
|
+
- lib
|
201
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 3.2.0
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
requirements: []
|
212
|
+
rubygems_version: 3.4.19
|
213
|
+
signing_key:
|
214
|
+
specification_version: 4
|
215
|
+
summary: A simple DynamoDB ORM
|
216
|
+
test_files:
|
217
|
+
- spec/app/models/person.rb
|
218
|
+
- spec/app/models/user.rb
|
219
|
+
- spec/dynamodb_record/document_spec.rb
|
220
|
+
- spec/dynamodb_record/fields_spec.rb
|
221
|
+
- spec/dynamodb_record/finders_spec.rb
|
222
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Document/initializes_from_database.yml
|
223
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/finds_record.yml
|
224
|
+
- spec/fixtures/vcr_cassettes/DynamodbRecord_Fields/_find/when_record_doesn_t_exists/returns_empty_object.yml
|
225
|
+
- spec/spec_helper.rb
|