Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Run specs against real redis as well; refactor Action's scope #2

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Run specs against real redis as well; refactor Action's scope #2

wants to merge 16 commits into from

Conversation

kigster
Copy link
Contributor

@kigster kigster commented Jan 10, 2017

We are using Pause on a project, and I was getting an error that seemed like a redis error. Without being able to run specs against a real redis server, it was impossible to tell if the problem was with the gem or somewhere else.

Now the entire spec suite can run using fakeredis (the default), and against a local redis instance.

To access integration tests, run rake spec:integration instead of rake spec.

Additionally, refactored the Pause::Action to stop using a class variable, which are considered harmful.

Updated Travis config to run against ruby 2.4.0, and to run both test suites.

Konstantin Gredeskoul added 8 commits January 5, 2017 16:04
 * refactored Action class-level methods
 * got rid of a horrendous class level variable
 * derive default action scope from the class name
 * flush redis db before each test.
 * clean up gemspec
 * bump version to 0.3.0
@wanelo-pair
Copy link

@kigster : Travis fails on 1.9.3

Gem::InstallError: ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.

Thoughts on supporting anything less than 2.2?

@kigster
Copy link
Contributor Author

kigster commented Jan 10, 2017

I am happy to drop 1.9.3 if you guys are :)

Konstantin Gredeskoul added 2 commits January 10, 2017 13:18
The issue I faced is a race condition when two processes increment at
the same time; first one performs zrem on two old elements, second
does not have any elements to zrem (even though zcard > value) was
satisified. This race condition must be simply coded around.
@hjhart
Copy link

hjhart commented Jan 17, 2017

Looks good to @mattcamuto and I.

@kigster Should we try to do some real redis tests in travis?

@kigster
Copy link
Contributor Author

kigster commented Jan 31, 2017

We do on this branch! Check out .travis.yml; we start redis server, and the test suite runs twice: once with redis, and once without.

kigster added 6 commits March 28, 2018 20:26
- together with tests
- updating gems, removing unused gems
- migrating gem to /kigster for maintenance
- bump version to 0.4.0
 - also adding CodeCimate, new tests
 - updating README
 - version bump 0.4.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants