langalex/couch_potato — Issue #57: Loss of view parameters if view does not exist in db
Author: bterkuile
Created: 2012-03-07 09:15:53+00:00
State: open

I am working in a different branch now, but want to move back in the future since the required features are built in the main repo for a large part. I ran into an issue however that might be important:
in the file lib / couch_potato / view / view_query.rb on line 21 query_view parameters is called. If this one fails, an update_view is called followed by a retry. In the first attempt however the parameters are changed and therefore the retry is done with different parameters.

Failing case:
Task.database(Task.by_state(keys: ['active', 'running']))

The keys parameter is removed after the first query_view call.

Info:
Ruby 1.9.2p290,
Gems included by the bundle:
* activemodel (3.2.1)
* activesupport (3.2.1)
* archive-tar-minitar (0.5.2)
* builder (3.0.0)
* bundler (1.0.21)
* columnize (0.3.6)
* couch_potato (0.5.7 3dfc617)
* couchrest (1.1.2)
* diff-lcs (1.1.3)
* i18n (0.6.0)
* json (1.6.5)
* linecache19 (0.5.12)
* mime-types (1.17.2)
* multi_json (1.0.4)
* rake (0.9.2.2)
* rest-client (1.6.7)
* rspec (2.8.0)
* rspec-core (2.8.0)
* rspec-expectations (2.8.0)
* rspec-mocks (2.8.0)
* ruby-debug-base19 (0.11.25)
* ruby-debug19 (0.11.6)
* ruby_core_source (0.1.5)
* timecop (0.3.5)
* tzinfo (0.3.31)