Skip to content

Commit 66d71be

Browse files
committed
Fix README typos and improve code examples consistency
1 parent cdda848 commit 66d71be

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Fixed module function style (changed `extend self` to `module_function`)
2222
- Fixed line endings in Gemfile (CRLF to LF)
2323
- Fixed CI workflow bundler version mismatch
24+
- Fixed README typos and improved code examples consistency
2425

2526
## [0.1.0] - 2021-08-24
2627

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ RSpec.describe UsersController, type: :controller do
5555
id: RSpec::JsonApi::Types::UUID,
5656
name: String,
5757
age: Integer,
58-
favouriteColorHex: /^\#([a-fA-F]|[0-9]){3,6}$/,
59-
number: -> { { type: Integer, min: 10, max: 20, lambda: ->(actual) { actual.even? } } }
58+
favoriteColorHex: /^\#([a-fA-F]|[0-9]){3,6}$/,
59+
number: -> { { type: Integer, min: 10, max: 20, lambda: lambda(&:even?) } }
6060
}]
6161
end
6262

@@ -150,7 +150,7 @@ The gem offers variety of possible matching methods.
150150

151151
Failure Example:
152152
```ruby
153-
let(:expected) do
153+
let(:expected_schema) do
154154
{
155155
id: RSpec::JsonApi::Types::UUID,
156156
name: String,
@@ -168,7 +168,7 @@ The gem offers variety of possible matching methods.
168168

169169
Success Example:
170170
```ruby
171-
let(:expected) do
171+
let(:expected_schema) do
172172
{
173173
id: RSpec::JsonApi::Types::UUID,
174174
name: String,
@@ -192,7 +192,7 @@ let(:expected_schema) do
192192
id: "e0067346-4d24-4aa6-b303-f927a410a001",
193193
name: "John",
194194
age: 24,
195-
favouriteColorHex: "#FF5733"
195+
favoriteColorHex: "#FF5733"
196196
}
197197
end
198198
```
@@ -236,7 +236,7 @@ end
236236
```
237237

238238
### Proc match
239-
Proc match allows to customize schema accoring needs using lambda shorthand notation `->`
239+
Proc match allows to customize schema according needs using lambda shorthand notation `->`
240240

241241
Supported options:
242242
- #### type
@@ -289,9 +289,9 @@ end
289289
```
290290
- #### lambda
291291
```ruby
292-
let(:expected) do
292+
let(:expected_schema) do
293293
{
294-
number: -> { { lambda: ->(actual) { actual.even? } } }
294+
number: -> { { lambda: lambda(&:even?) } }
295295
}
296296
end
297297
```

0 commit comments

Comments
 (0)