Closed grempe closed 15 years ago
Thanks for the detailed note. There was a bug in the way that the list of CouchDB databases used in the app were assembled. It resulted in the errors you experienced with no output and the false warnings. I've also updated the documentation with regards to the rake tasks.
Excellent. Works much better now.
I have a couple of additional minor things you may want to look at:
I did note that you list only a subset of the rake tasks in the readme though. Might want to expand to add:
$ rake -T couch
rake couchdb:create[database]
rake couchdb:delete[database]
rake couchdb:fixtures:load[database]
rake couchdb:lucene:push[database]
rake couchdb:views:push[database]
rake doc:plugins:couchrest-rails
Also, for installation you specify that the user should run:
script/generate couch_rest_rails relax
However, I think the 'relax' part is unnecessary as far as I can tell. And I think the USAGE statement here is incomplete as well as far as which files will be created and the need for 'relax':
http://github.com/hpoydar/couchrest-rails/blob/master/generators/couch_rest_rails/USAGE
Thanks for the quick fixes!
You are correct ... no need for the 'relax' (the generator was inheriting from Rails::Generator::NamesBase instead of Rails::Generator::Base) Thanks!
Super. Thank you.
A minor nitpick. The USAGE file does not show all the files and dirs that will be generated. I'm not sure how that file gets used though.
The rake tasks only seem to work when passed an argument for the database name to be used, instead of using the config from couchdb.yml.
The way to pass rake arguments are not documented in the couchrest-rails docs, and are tough to find on google (I wasted about an hour or more on figuring out the solution...)
If no args are passed, the rake task runs with no error output, and just generates two blank lines.
As an example if 'foobar' is the name of the database and a db suffix is setup in the couchdb config yml file to add the current env like 'foobar_development':
Note, also that the warning generated in this example is erroneous. There is a 'foobar' database specified in the model file (but of course, not foobar_development which is handled in the config). The model file was tested from the console with Model.create and it wrote to the expected foobar_development db.
Also note that tasks which don't accept arguments and instead run other tasks (like 'rake couchdb:reset' seem to always fail unless the individual tasks to destroy and create are run with args).
Is there something I am missing here from a config perspective? If not, would it be possible to make the rake tasks use sensible values from the config file? Or if not, can you please add docs to the readme showing which tasks need args, and what args they accept?
Thanks