Skip to content

Commit

Permalink
Merge pull request #717 from Dynamoid/ak/prepare-release-3-10-0
Browse files Browse the repository at this point in the history
Prepare release v3.10.0
  • Loading branch information
andrykonchin authored Feb 10, 2024
2 parents 8029e13 + eeb4de2 commit 38c1a2f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 55 deletions.
18 changes: 12 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed

### Added
* [#697](https://github.com/Dynamoid/dynamoid/pull/697) Ensure Ruby 3.3 and Rails 7.1 versions are supported and added them on CI.

### Changed

### Removed

## 3.9.0
## 3.10.0
### Fixed
* [#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`
* [#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)
### Added
* [#656](https://github.com/Dynamoid/dynamoid/pull/656) Added a `create_table_on_save` configuration flag to create table on save (@imaximix)
* [#697](https://github.com/Dynamoid/dynamoid/pull/697) Ensure Ruby 3.3 and Rails 7.1 versions are supported and added them on CI
### Changed
* [#655](https://github.com/Dynamoid/dynamoid/pull/655) Support multiple `where` in the same chain with multiple conditions for the same field

## 3.9.0 / 2023-04-13
### Fixed
* [#610](https://github.com/Dynamoid/dynamoid/pull/610) Specs in JRuby; Support for JRuby 9.4.0.0 (@pboling)
* [#624](https://github.com/Dynamoid/dynamoid/pull/624) Fixed `#increment!`/`#decrement!` methods and made them compatible with Rails counterparts
Expand Down Expand Up @@ -58,7 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#633](https://github.com/Dynamoid/dynamoid/pull/633) Change `#inspect` method to return only attributes
* [#623](https://github.com/Dynamoid/dynamoid/pull/623) Optimized performance of persisting to send only changed attributes in a request to DynamoDB

## 3.8.0
## 3.8.0 / 2022-11-09
### Fixed
* [#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)
* Minor changes in the documentation:
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ GEM
iniparse (~> 1.4)
rexml (~> 3.2)
parallel (1.24.0)
parser (3.3.0.2)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand All @@ -92,11 +92,11 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.59.0)
rubocop (1.60.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand All @@ -105,10 +105,10 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-md (1.2.2)
rubocop (>= 1.0)
rubocop-packaging (0.5.2)
Expand All @@ -118,7 +118,7 @@ GEM
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.25.0)
rubocop-rspec (2.26.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1132,12 +1132,12 @@ Listed below are all configuration options.
in ISO 8601 string format. Default is `false`
* `store_boolean_as_native` - if `true` Dynamoid stores boolean fields
as native DynamoDB boolean values. Otherwise boolean fields are stored
as string values `'t'` and `'f'`. Default is true
as string values `'t'` and `'f'`. Default is `true`
* `backoff` - is a hash: key is a backoff strategy (symbol), value is
parameters for the strategy. Is used in batch operations. Default id
`nil`
* `backoff_strategies`: is a hash and contains all available strategies.
Default is { constant: ..., exponential: ...}
Default is `{ constant: ..., exponential: ...}`
* `log_formatter`: overrides default AWS SDK formatter. There are
several canned formatters: `Aws::Log::Formatter.default`,
`Aws::Log::Formatter.colored` and `Aws::Log::Formatter.short`. Please
Expand All @@ -1155,6 +1155,9 @@ Listed below are all configuration options.
* `http_read_timeout`:The number of seconds to wait for HTTP response
data. Default option value is `nil`. If not specified effected value
is `60`
* `create_table_on_save`: if `true` then Dynamoid creates a
corresponding table in DynamoDB at model persisting if the table
doesn't exist yet. Default is `true`


## Concurrency
Expand Down
8 changes: 6 additions & 2 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ require 'dynamoid/log/formatter'
# Pry.start

Dynamoid.configure do |config|
config.access_key = 'REPLACE_WITH_ACCESS_KEY_ID'
config.secret_key = 'REPLACE_WITH_SECRET_ACCESS_KEY'
# DynamoDB local version 2.0.0 and greater AWS_ACCESS_KEY_ID can contain
# the only letters (A–Z, a–z) and numbers (0–9).
# See https://hub.docker.com/r/amazon/dynamodb-local
config.access_key = 'accesskey'
config.secret_key = 'secretkey'

config.region = 'us-west-2'
config.endpoint = 'http://localhost:8000'
config.log_formatter = Dynamoid::Log::Formatter::Compact.new
Expand Down
2 changes: 1 addition & 1 deletion spec/dynamoid/persistence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def self.dynamoid_field_type

context 'with namespace is empty' do
def reload_address
Object.send(:remove_const, 'Address')
Object.send(:remove_const, 'Address') # rubocop:disable RSpec/RemoveConst
load 'app/models/address.rb'
end

Expand Down
59 changes: 22 additions & 37 deletions spec/dynamoid/sti_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,31 @@

describe 'persistence' do
before do
# rubocop:disable Lint/ConstantDefinitionInBlock
A = new_class class_name: 'A' do
class_a = new_class class_name: 'A' do
field :type
end
B = Class.new(A) do
stub_const 'A', class_a

class_b = Class.new(A) do
def self.name
'B'
end
end
C = Class.new(A) do
stub_const 'B', class_b

class_c = Class.new(A) do
def self.name
'C'
end
end
D = Class.new(B) do
stub_const 'C', class_c

class_d = Class.new(B) do
def self.name
'D'
end
end
# rubocop:enable Lint/ConstantDefinitionInBlock
end

after do
Object.send(:remove_const, :A)
Object.send(:remove_const, :B)
Object.send(:remove_const, :C)
Object.send(:remove_const, :D)
stub_const 'D', class_d
end

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

describe '`inheritance_field` document option' do
before do
# rubocop:disable Lint/ConstantDefinitionInBlock
A = new_class class_name: 'A' do
class_a = new_class class_name: 'A' do
table inheritance_field: :type_new

field :type
field :type_new
end
stub_const 'A', class_a

B = Class.new(A) do
class_b = Class.new(A) do
def self.name
'B'
end
end
# rubocop:enable Lint/ConstantDefinitionInBlock
end

after do
Object.send(:remove_const, :A)
Object.send(:remove_const, :B)
stub_const 'B', class_b
end

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

describe '`sti_name` support' do
before do
# rubocop:disable Lint/ConstantDefinitionInBlock
A = new_class class_name: 'A' do
class_a = new_class class_name: 'A' do
field :type

def self.sti_class_for(type_name)
Expand All @@ -178,17 +170,14 @@ def self.sti_class_for(type_name)
end
end
end
B = Class.new(A) do
stub_const 'A', class_a

class_b = Class.new(A) do
def self.sti_name
'beta'
end
end
# rubocop:enable Lint/ConstantDefinitionInBlock
end

after do
Object.send(:remove_const, :A)
Object.send(:remove_const, :B)
stub_const 'B', class_b
end

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

describe 'sti_class_for' do
before do
# rubocop:disable Lint/ConstantDefinitionInBlock
A = new_class class_name: 'A' do
class_a = new_class class_name: 'A' do
field :type
end
# rubocop:enable Lint/ConstantDefinitionInBlock
end

after do
Object.send(:remove_const, :A)
stub_const 'A', class_a
end

it 'successes exist class' do
Expand Down

0 comments on commit 38c1a2f

Please sign in to comment.