Skip to content

Commit

Permalink
Merge pull request #57 from sleepingkingstudios/chore/refactor-contracts
Browse files Browse the repository at this point in the history
Chore/Refactor contracts.
  • Loading branch information
sleepingkingstudios authored Nov 28, 2023
2 parents 2f0e805 + ecb1fb4 commit 5576c68
Show file tree
Hide file tree
Showing 54 changed files with 4,370 additions and 4,118 deletions.
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

0 comments on commit 5576c68

Please sign in to comment.