Skip to content

Commit 38c1a2f

Browse files
authored
Merge pull request #717 from Dynamoid/ak/prepare-release-3-10-0
Prepare release v3.10.0
2 parents 8029e13 + eeb4de2 commit 38c1a2f

File tree

6 files changed

+53
-55
lines changed

6 files changed

+53
-55
lines changed

CHANGELOG.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88

99
### Fixed
10-
1110
### Added
12-
* [#697](https://github.com/Dynamoid/dynamoid/pull/697) Ensure Ruby 3.3 and Rails 7.1 versions are supported and added them on CI.
13-
1411
### Changed
15-
1612
### Removed
1713

18-
## 3.9.0
14+
## 3.10.0
15+
### Fixed
16+
* [#681](https://github.com/Dynamoid/dynamoid/pull/681) Fixed saving persisted model and deleting attributes with `nil` value if `config.store_attribute_with_nil_value` is `false`
17+
* [#716](https://github.com/Dynamoid/dynamoid/pull/716), [#691](https://github.com/Dynamoid/dynamoid/pull/691), [#687](https://github.com/Dynamoid/dynamoid/pull/687), [#660](https://github.com/Dynamoid/dynamoid/pull/660) Numerous fixes in README.md and RDoc documentation (@ndjndj, @kiharito, @dunkOnIT)
18+
### Added
19+
* [#656](https://github.com/Dynamoid/dynamoid/pull/656) Added a `create_table_on_save` configuration flag to create table on save (@imaximix)
20+
* [#697](https://github.com/Dynamoid/dynamoid/pull/697) Ensure Ruby 3.3 and Rails 7.1 versions are supported and added them on CI
21+
### Changed
22+
* [#655](https://github.com/Dynamoid/dynamoid/pull/655) Support multiple `where` in the same chain with multiple conditions for the same field
23+
24+
## 3.9.0 / 2023-04-13
1925
### Fixed
2026
* [#610](https://github.com/Dynamoid/dynamoid/pull/610) Specs in JRuby; Support for JRuby 9.4.0.0 (@pboling)
2127
* [#624](https://github.com/Dynamoid/dynamoid/pull/624) Fixed `#increment!`/`#decrement!` methods and made them compatible with Rails counterparts
@@ -58,7 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5864
* [#633](https://github.com/Dynamoid/dynamoid/pull/633) Change `#inspect` method to return only attributes
5965
* [#623](https://github.com/Dynamoid/dynamoid/pull/623) Optimized performance of persisting to send only changed attributes in a request to DynamoDB
6066

61-
## 3.8.0
67+
## 3.8.0 / 2022-11-09
6268
### Fixed
6369
* [#525](https://github.com/Dynamoid/dynamoid/pull/525) Don't mark an attribute as changed if new assigned value equals the old one (@a5-stable)
6470
* Minor changes in the documentation:

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GEM
6565
iniparse (~> 1.4)
6666
rexml (~> 3.2)
6767
parallel (1.24.0)
68-
parser (3.3.0.2)
68+
parser (3.3.0.5)
6969
ast (~> 2.4.1)
7070
racc
7171
pry (0.14.2)
@@ -92,11 +92,11 @@ GEM
9292
diff-lcs (>= 1.2.0, < 2.0)
9393
rspec-support (~> 3.12.0)
9494
rspec-support (3.12.1)
95-
rubocop (1.59.0)
95+
rubocop (1.60.2)
9696
json (~> 2.3)
9797
language_server-protocol (>= 3.17.0)
9898
parallel (~> 1.10)
99-
parser (>= 3.2.2.4)
99+
parser (>= 3.3.0.2)
100100
rainbow (>= 2.2.2, < 4.0)
101101
regexp_parser (>= 1.8, < 3.0)
102102
rexml (>= 3.2.5, < 4.0)
@@ -105,10 +105,10 @@ GEM
105105
unicode-display_width (>= 2.4.0, < 3.0)
106106
rubocop-ast (1.30.0)
107107
parser (>= 3.2.1.0)
108-
rubocop-capybara (2.19.0)
108+
rubocop-capybara (2.20.0)
109+
rubocop (~> 1.41)
110+
rubocop-factory_bot (2.25.1)
109111
rubocop (~> 1.41)
110-
rubocop-factory_bot (2.24.0)
111-
rubocop (~> 1.33)
112112
rubocop-md (1.2.2)
113113
rubocop (>= 1.0)
114114
rubocop-packaging (0.5.2)
@@ -118,7 +118,7 @@ GEM
118118
rubocop-ast (>= 1.30.0, < 2.0)
119119
rubocop-rake (0.6.0)
120120
rubocop (~> 1.0)
121-
rubocop-rspec (2.25.0)
121+
rubocop-rspec (2.26.1)
122122
rubocop (~> 1.40)
123123
rubocop-capybara (~> 2.17)
124124
rubocop-factory_bot (~> 2.22)

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,12 +1132,12 @@ Listed below are all configuration options.
11321132
in ISO 8601 string format. Default is `false`
11331133
* `store_boolean_as_native` - if `true` Dynamoid stores boolean fields
11341134
as native DynamoDB boolean values. Otherwise boolean fields are stored
1135-
as string values `'t'` and `'f'`. Default is true
1135+
as string values `'t'` and `'f'`. Default is `true`
11361136
* `backoff` - is a hash: key is a backoff strategy (symbol), value is
11371137
parameters for the strategy. Is used in batch operations. Default id
11381138
`nil`
11391139
* `backoff_strategies`: is a hash and contains all available strategies.
1140-
Default is { constant: ..., exponential: ...}
1140+
Default is `{ constant: ..., exponential: ...}`
11411141
* `log_formatter`: overrides default AWS SDK formatter. There are
11421142
several canned formatters: `Aws::Log::Formatter.default`,
11431143
`Aws::Log::Formatter.colored` and `Aws::Log::Formatter.short`. Please
@@ -1155,6 +1155,9 @@ Listed below are all configuration options.
11551155
* `http_read_timeout`:The number of seconds to wait for HTTP response
11561156
data. Default option value is `nil`. If not specified effected value
11571157
is `60`
1158+
* `create_table_on_save`: if `true` then Dynamoid creates a
1159+
corresponding table in DynamoDB at model persisting if the table
1160+
doesn't exist yet. Default is `true`
11581161

11591162

11601163
## Concurrency

bin/console

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ require 'dynamoid/log/formatter'
1313
# Pry.start
1414

1515
Dynamoid.configure do |config|
16-
config.access_key = 'REPLACE_WITH_ACCESS_KEY_ID'
17-
config.secret_key = 'REPLACE_WITH_SECRET_ACCESS_KEY'
16+
# DynamoDB local version 2.0.0 and greater AWS_ACCESS_KEY_ID can contain
17+
# the only letters (A–Z, a–z) and numbers (0–9).
18+
# See https://hub.docker.com/r/amazon/dynamodb-local
19+
config.access_key = 'accesskey'
20+
config.secret_key = 'secretkey'
21+
1822
config.region = 'us-west-2'
1923
config.endpoint = 'http://localhost:8000'
2024
config.log_formatter = Dynamoid::Log::Formatter::Compact.new

spec/dynamoid/persistence_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def self.dynamoid_field_type
603603

604604
context 'with namespace is empty' do
605605
def reload_address
606-
Object.send(:remove_const, 'Address')
606+
Object.send(:remove_const, 'Address') # rubocop:disable RSpec/RemoveConst
607607
load 'app/models/address.rb'
608608
end
609609

spec/dynamoid/sti_spec.rb

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,31 @@
4747

4848
describe 'persistence' do
4949
before do
50-
# rubocop:disable Lint/ConstantDefinitionInBlock
51-
A = new_class class_name: 'A' do
50+
class_a = new_class class_name: 'A' do
5251
field :type
5352
end
54-
B = Class.new(A) do
53+
stub_const 'A', class_a
54+
55+
class_b = Class.new(A) do
5556
def self.name
5657
'B'
5758
end
5859
end
59-
C = Class.new(A) do
60+
stub_const 'B', class_b
61+
62+
class_c = Class.new(A) do
6063
def self.name
6164
'C'
6265
end
6366
end
64-
D = Class.new(B) do
67+
stub_const 'C', class_c
68+
69+
class_d = Class.new(B) do
6570
def self.name
6671
'D'
6772
end
6873
end
69-
# rubocop:enable Lint/ConstantDefinitionInBlock
70-
end
71-
72-
after do
73-
Object.send(:remove_const, :A)
74-
Object.send(:remove_const, :B)
75-
Object.send(:remove_const, :C)
76-
Object.send(:remove_const, :D)
74+
stub_const 'D', class_d
7775
end
7876

7977
it 'saves subclass objects in the parent table' do
@@ -127,25 +125,20 @@ def self.name
127125

128126
describe '`inheritance_field` document option' do
129127
before do
130-
# rubocop:disable Lint/ConstantDefinitionInBlock
131-
A = new_class class_name: 'A' do
128+
class_a = new_class class_name: 'A' do
132129
table inheritance_field: :type_new
133130

134131
field :type
135132
field :type_new
136133
end
134+
stub_const 'A', class_a
137135

138-
B = Class.new(A) do
136+
class_b = Class.new(A) do
139137
def self.name
140138
'B'
141139
end
142140
end
143-
# rubocop:enable Lint/ConstantDefinitionInBlock
144-
end
145-
146-
after do
147-
Object.send(:remove_const, :A)
148-
Object.send(:remove_const, :B)
141+
stub_const 'B', class_b
149142
end
150143

151144
it 'allows to switch from `type` field to another one to store class name' do
@@ -167,8 +160,7 @@ def self.name
167160

168161
describe '`sti_name` support' do
169162
before do
170-
# rubocop:disable Lint/ConstantDefinitionInBlock
171-
A = new_class class_name: 'A' do
163+
class_a = new_class class_name: 'A' do
172164
field :type
173165

174166
def self.sti_class_for(type_name)
@@ -178,17 +170,14 @@ def self.sti_class_for(type_name)
178170
end
179171
end
180172
end
181-
B = Class.new(A) do
173+
stub_const 'A', class_a
174+
175+
class_b = Class.new(A) do
182176
def self.sti_name
183177
'beta'
184178
end
185179
end
186-
# rubocop:enable Lint/ConstantDefinitionInBlock
187-
end
188-
189-
after do
190-
Object.send(:remove_const, :A)
191-
Object.send(:remove_const, :B)
180+
stub_const 'B', class_b
192181
end
193182

194183
it 'saves subclass objects in the parent table' do
@@ -200,15 +189,11 @@ def self.sti_name
200189

201190
describe 'sti_class_for' do
202191
before do
203-
# rubocop:disable Lint/ConstantDefinitionInBlock
204-
A = new_class class_name: 'A' do
192+
class_a = new_class class_name: 'A' do
205193
field :type
206194
end
207-
# rubocop:enable Lint/ConstantDefinitionInBlock
208-
end
209195

210-
after do
211-
Object.send(:remove_const, :A)
196+
stub_const 'A', class_a
212197
end
213198

214199
it 'successes exist class' do

0 commit comments

Comments
 (0)