Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/Refactor contracts. #57

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.7
NewCops: enable
Exclude:
- tmp/**/*
- vendor/**/*

RSpec:
Language:
ExampleGroups:
Expand All @@ -17,6 +24,8 @@ RSpec:
- fdescribe
- fwrap_context
Includes:
Contexts:
- with_contract
Examples:
- finclude_contract
- finclude_examples
Expand All @@ -28,13 +37,6 @@ RSpec:
- xinclude_examples
- xwrap_examples

AllCops:
TargetRubyVersion: 2.7
NewCops: enable
Exclude:
- tmp/**/*
- vendor/**/*

Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation

Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,26 @@
Implemented `Cuprum::Collections::Association`, which represents an association between entity types.

- Implemented `Cuprum::Collections::Associations::BelongsTo`.
- Implemented `Cuprum::Collections::Associations::HasMany`.
- Implemented `Cuprum::Collections::Associations::HasOne`.

### Collections

Defined standard interface for collections.

- Implemented `Cuprum::Collections::Collection`.
- Collections can now be initialized with any combination of collection name and entity class.
- Collections can now be initialized with any combination of collection name, entity class, and qualified name.

Updated `Cuprum::Collections::Basic::Collection`.

- Implemented `#count` method.
- Implemented `#qualified_name` method.

Deprecated certain collection methods and corresponding constructor keywords:

- `#collection_name`: Use `#name`.
- `#member_name`: Use `#singular_name`.

### Commands

Implemented built-in Commands, which take a `:collection` parameter:
Expand Down Expand Up @@ -49,6 +56,10 @@ Defined standard interface for repositories.

Defined `Cuprum::Collections::Resource`, representing a singular or plural resource of entities.

### RSpec

- **(Breaking Change)** Contracts have been refactored to use `RSpec::SleepingKingStudios::Contract`. Contract names and filenames have changed.

## 0.2.0

Implemented `Cuprum::Collections::Repository`.
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Steps to add an operator:

- Update Queries::Operators.
- Update Queries::ParseBlock::Builder.
- Define context(s) in RSpec::QUERYING_CONTEXTS.
- Add test cases in RSpec::QUERYING_CONTRACT.
- Define context(s) in QueryContracts::WithQueryContexts.
- Add test cases in QueryContracts::ShouldPerformQueries.
- Add implementations to Basic::QueryBuilder.

### ParseCriteria
Expand Down
Loading
Loading