dynomite 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/lib/dynomite/autoloader.rb +1 -0
- data/lib/dynomite/client.rb +5 -2
- data/lib/dynomite/item/query/relation.rb +1 -1
- data/lib/dynomite/item/read/find_with_event.rb +1 -1
- data/lib/dynomite/item/typecaster.rb +1 -1
- data/lib/dynomite/migration/templates/create_table.rb +1 -1
- data/lib/dynomite/migration/templates/delete_table.rb +1 -1
- data/lib/dynomite/migration/templates/update_table.rb +1 -1
- data/lib/dynomite/types.rb +1 -1
- data/lib/dynomite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0844c1bb653dbdd814f3ac748685e57d53c7f3cdcd70ba314ccd474e7be892a9'
|
4
|
+
data.tar.gz: 0c5dea965d4fb9645ffe3ac4fdd0fa0ff46a626e290a992bb1caa9d32def75f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9d369653039d8421571edea938e71a1354185cdaaee3c83c6357ec992dc5d4fd2c70114250566def35e44793359f13b7148375e2c02c95fd677fdd1e31bf88a
|
7
|
+
data.tar.gz: e180385600a33d88894c9c01a69c595b42c9df562ef1714fd5f9056010f914b74babd7dc4dc728893e0ddf223c6ff75440becf4e52e3fe3dc1e99df7930e2576
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.0.3] - 2024-10-29
|
7
|
+
- [#38](https://github.com/tongueroo/dynomite/pull/38) fix issue where running dynamodb-local in docker-compose (where host is not localhost)
|
8
|
+
- [#40](https://github.com/tongueroo/dynomite/pull/40) Avoids eager-loading Dynomite::Engine
|
9
|
+
- Updates documentation link in README.md
|
10
|
+
|
6
11
|
## [2.0.2] - 2023-12-10
|
7
12
|
- [#37](https://github.com/tongueroo/dynomite/pull/37) fix eager load
|
8
13
|
|
data/README.md
CHANGED
data/lib/dynomite/autoloader.rb
CHANGED
@@ -20,6 +20,7 @@ module Dynomite
|
|
20
20
|
loader.ignore("#{lib}/dynomite/migration/templates/*")
|
21
21
|
loader.ignore("#{lib}/dynomite/reserved_words.rb")
|
22
22
|
loader.do_not_eager_load("#{lib}/generators")
|
23
|
+
loader.do_not_eager_load("#{lib}/dynomite/engine.rb")
|
23
24
|
loader.setup
|
24
25
|
end
|
25
26
|
end
|
data/lib/dynomite/client.rb
CHANGED
@@ -61,9 +61,12 @@ module Dynomite
|
|
61
61
|
# for DynamoDB local to time out, about 10 seconds...
|
62
62
|
# This wastes less of the users time.
|
63
63
|
def check_dynamodb_local!(endpoint)
|
64
|
-
return unless endpoint
|
64
|
+
return unless endpoint
|
65
|
+
endpoint_uri = URI.parse(endpoint)
|
65
66
|
|
66
|
-
|
67
|
+
return unless endpoint_uri.port == 8000
|
68
|
+
|
69
|
+
open = port_open?(endpoint_uri.host, endpoint_uri.port, 0.2)
|
67
70
|
unless open
|
68
71
|
raise "You have configured your app to use DynamoDB local, but it is not running. Please start DynamoDB local. Example: brew cask install dynamodb-local && dynamodb-local"
|
69
72
|
end
|
@@ -120,7 +120,7 @@ module Dynomite::Item::Query
|
|
120
120
|
WARN: Scanning detected. It's recommended to not use scan. It can be slow.
|
121
121
|
Scanning table: #{@source.table_name}
|
122
122
|
Try creating a LSI or GSI index so dynomite can use query instead.
|
123
|
-
Docs: https://rubyonjets.com/docs/database/dynamodb/indexing/
|
123
|
+
Docs: https://v5.docs.rubyonjets.com/docs/database/dynamodb/indexing/
|
124
124
|
EOL
|
125
125
|
end
|
126
126
|
end
|
@@ -5,7 +5,7 @@ module Dynomite::Item::Read
|
|
5
5
|
class_methods do
|
6
6
|
def find_all_with_stream_event(event, options={})
|
7
7
|
# For event payload structure see
|
8
|
-
# https://rubyonjets.com/docs/events/dynamodb/#event-payload
|
8
|
+
# https://v5.docs.rubyonjets.com/docs/events/dynamodb/#event-payload
|
9
9
|
# Keys structure:
|
10
10
|
# {
|
11
11
|
# "Records": [
|
@@ -29,7 +29,7 @@ class Dynomite::Item
|
|
29
29
|
#
|
30
30
|
# The method also helps keep track of where we cast_to_type
|
31
31
|
# It's only a few spots this provides an easy to search for it.
|
32
|
-
# See: https://rubyonjets.com/docs/database/dynamodb/model/typecasting/
|
32
|
+
# See: https://v5.docs.rubyonjets.com/docs/database/dynamodb/model/typecasting/
|
33
33
|
FALSEY = [false, 'false', 'FALSE', 0, '0', 'f', 'F', 'off', 'OFF']
|
34
34
|
def cast_to_type(type, value, on: :read)
|
35
35
|
case type
|
data/lib/dynomite/types.rb
CHANGED
@@ -13,7 +13,7 @@ module Dynomite
|
|
13
13
|
binary_set: 'BS',
|
14
14
|
}
|
15
15
|
|
16
|
-
# https://rubyonjets.com/docs/database/dynamodb/types/
|
16
|
+
# https://v5.docs.rubyonjets.com/docs/database/dynamodb/types/
|
17
17
|
# https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypeDescriptors
|
18
18
|
def type_map(attribute_type)
|
19
19
|
TYPE_MAP[attribute_type.to_s.downcase.to_sym] || attribute_type
|
data/lib/dynomite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynomite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.
|
337
|
+
rubygems_version: 3.5.10
|
338
338
|
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: ActiveRecord-ish DynamoDB ORM
|