• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sds / mock_redis / 7560895549
98%

Build:
DEFAULT BRANCH: main
Ran 17 Jan 2024 07:36PM UTC
Jobs 8
Files 25
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jan 2024 07:35PM UTC coverage: 98.033%. Remained the same
7560895549

push

github

web-flow
#292 extend set method to accept a third positional argument (#299)

# Summary
closes #292 

This pull request is for issue #292.
I extend set method to accept a third positional argument.


## Purpose of This Change

The primary goal of this change is to enhance the compatibility of the
`mock_redis` `set` method with the `redis-store` `set` method. By
introducing a third positional argument, we aim to align more closely
with the `redis-store` implementation, facilitating easier integration
and use in environments where `redis-store` is prevalent.

## Compatibility Concerns with Standard Redis

While the `redis-store` `set` method accepts three positional arguments,
the standard Redis `set` method traditionally takes only two. This
discrepancy could raise concerns about compatibility. However, this
change ensures that compatibility with the standard Redis API is
maintained and verified through existing tests in `set_spec.rb`.


## Before and After the Change

### Before
The `set` method in `mock_redis` was defined as follows:
```ruby
def set(key, value, ex: nil, px: nil, exat: nil, pxat: nil, nx: nil, xx: nil, keepttl: nil, get: nil)
```
This definition aligns with the standard Redis API but lacks
compatibility with the `redis-store` version.

### After
The revised `set` method is now defined with an additional third
positional argument:
```ruby
def set(key, value, _hash = nil, ex: nil, px: nil, exat: nil, pxat: nil, nx: nil, xx: nil, keepttl: nil, get: nil)
```
This addition enables compatibility with `redis-store` without
compromising the existing functionality with standard Redis.

1794 of 1830 relevant lines covered (98.03%)

1615.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby3.2-7.0 - 7560895549.1 17 Jan 2024 07:36PM UTC 25
32.3
GitHub Action Run
2 ruby3.3-6.2 - 7560895549.2 17 Jan 2024 07:36PM UTC 25
98.03
GitHub Action Run
3 ruby3.0-6.2 - 7560895549.3 17 Jan 2024 07:36PM UTC 25
98.03
GitHub Action Run
4 ruby3.3-7.0 - 7560895549.4 17 Jan 2024 07:36PM UTC 25
32.31
GitHub Action Run
5 ruby3.1-6.2 - 7560895549.5 17 Jan 2024 07:36PM UTC 25
98.03
GitHub Action Run
6 ruby3.1-7.0 - 7560895549.6 17 Jan 2024 07:36PM UTC 25
32.3
GitHub Action Run
7 ruby3.0-7.0 - 7560895549.7 17 Jan 2024 07:36PM UTC 25
32.3
GitHub Action Run
8 ruby3.2-6.2 - 7560895549.8 17 Jan 2024 07:36PM UTC 25
98.03
GitHub Action Run
Source Files on build 7560895549
  • Tree
  • List 25
  • Changed 8
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9518740d on github
  • Prev Build on main (#7548716067)
  • Next Build on main (#7560935570)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc