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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92a4ec35a5e3bdc057281dfb1dbbc7a0df243483927d19c820789b182975530c
4
- data.tar.gz: 1155d236c7759608f237f9fcec65d072c4b8941687dc9511c103b0cddb138f36
3
+ metadata.gz: '0844c1bb653dbdd814f3ac748685e57d53c7f3cdcd70ba314ccd474e7be892a9'
4
+ data.tar.gz: 0c5dea965d4fb9645ffe3ac4fdd0fa0ff46a626e290a992bb1caa9d32def75f0
5
5
  SHA512:
6
- metadata.gz: 7fc1d59405466afc447496c05169c91b738dd55220944e00e66be153fb58c8225dafdf76c9cbbbdb4a42218a8b7f6159ea0924d336a92c4186bae49ed3dcaa58
7
- data.tar.gz: fcc1935828a72b9681c5329f1b83fbd24234d241f4cf130e4e86d473766b53effb23c91e034d03c6b8a83bb435da48367c7be454d1740748ee031a06fbfcc806
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
@@ -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/)
@@ -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
@@ -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.2"
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.2
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-10 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