dynomite 2.0.1 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99f5b950767f598fa9c97b4028d9d7d8c8796e4fdc80ff508cbcde2e9e64a5de
4
- data.tar.gz: 23140abd59f31218017100ec8ef5eccd9573667d78a8dc1992082f28bb5948da
3
+ metadata.gz: '0844c1bb653dbdd814f3ac748685e57d53c7f3cdcd70ba314ccd474e7be892a9'
4
+ data.tar.gz: 0c5dea965d4fb9645ffe3ac4fdd0fa0ff46a626e290a992bb1caa9d32def75f0
5
5
  SHA512:
6
- metadata.gz: 0e1d67deea755d6afa6a8c46c1a34bfcdf0008acea08b712b237fc8df48fba845979409d060bc4cc7779a1fe7f57db273cc101f365633705c733438a36dcf4db
7
- data.tar.gz: c81946b90d932c162d550c2adf1615a34459ac633ebc9ee7fc42102ca4bd98456bd5b18e7b6416890ee233b20b2d0750e0547396dae0dee4233220725cbd3d00
6
+ metadata.gz: c9d369653039d8421571edea938e71a1354185cdaaee3c83c6357ec992dc5d4fd2c70114250566def35e44793359f13b7148375e2c02c95fd677fdd1e31bf88a
7
+ data.tar.gz: e180385600a33d88894c9c01a69c595b42c9df562ef1714fd5f9056010f914b74babd7dc4dc728893e0ddf223c6ff75440becf4e52e3fe3dc1e99df7930e2576
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+
11
+ ## [2.0.2] - 2023-12-10
12
+ - [#37](https://github.com/tongueroo/dynomite/pull/37) fix eager load
13
+
6
14
  ## [2.0.1] - 2023-12-08
7
15
  - [#36](https://github.com/tongueroo/dynomite/pull/36) set log level info as default
8
16
 
data/README.md CHANGED
@@ -10,4 +10,4 @@ A DynamoDB ORM that is ActiveModel compatible.
10
10
 
11
11
  ## Dynomite Docs
12
12
 
13
- * [Database Dynomite](https://rubyonjets.com/docs/database/dynamodb/)
13
+ * [Database Dynomite](https://v5.docs.rubyonjets.com/docs/database/dynamodb/)
@@ -13,11 +13,14 @@ module Dynomite
13
13
  def setup
14
14
  loader = Zeitwerk::Loader.new
15
15
  loader.inflector = Inflector.new
16
- loader.push_dir(File.dirname(__dir__)) # lib
17
- loader.ignore("#{File.dirname(__dir__)}/jets/commands")
18
- loader.ignore("#{__dir__}/migration/internal/*")
19
- loader.ignore("#{__dir__}/migration/templates/*")
20
- loader.ignore("#{__dir__}/reserved_words.rb")
16
+ lib = File.dirname(__dir__)
17
+ loader.push_dir(lib)
18
+ loader.ignore("#{lib}/jets/commands")
19
+ loader.ignore("#{lib}/dynomite/migration/internal/*")
20
+ loader.ignore("#{lib}/dynomite/migration/templates/*")
21
+ loader.ignore("#{lib}/dynomite/reserved_words.rb")
22
+ loader.do_not_eager_load("#{lib}/generators")
23
+ loader.do_not_eager_load("#{lib}/dynomite/engine.rb")
21
24
  loader.setup
22
25
  end
23
26
  end
@@ -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 && endpoint.include?("8000")
64
+ return unless endpoint
65
+ endpoint_uri = URI.parse(endpoint)
65
66
 
66
- open = port_open?("127.0.0.1", 8000, 0.2)
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
@@ -14,4 +14,4 @@ class <%= @migration_class_name %> < Dynomite::Migration
14
14
  end
15
15
  end
16
16
 
17
- # More examples: https://rubyonjets.com/docs/database/dynamodb/migration/
17
+ # More examples: https://v5.docs.rubyonjets.com/docs/database/dynamodb/migration/
@@ -4,4 +4,4 @@ class <%= @migration_class_name %> < Dynomite::Migration
4
4
  end
5
5
  end
6
6
 
7
- # More examples: https://rubyonjets.com/docs/database/dynamodb/migration/
7
+ # More examples: https://v5.docs.rubyonjets.com/docs/database/dynamodb/migration/
@@ -8,4 +8,4 @@ class <%= @migration_class_name %> < Dynomite::Migration
8
8
  end
9
9
  end
10
10
 
11
- # More examples: https://rubyonjets.com/docs/database/dynamodb/migration/
11
+ # More examples: https://v5.docs.rubyonjets.com/docs/database/dynamodb/migration/
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Dynomite
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.3"
3
3
  end
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.1
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: 2023-12-08 00:00:00.000000000 Z
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.4.20
337
+ rubygems_version: 3.5.10
338
338
  signing_key:
339
339
  specification_version: 4
340
340
  summary: ActiveRecord-ish DynamoDB ORM