Skip to content

Commit

Permalink
Fixing Manifest contents and adding Rails information to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Sosinski committed Nov 11, 2010
1 parent 9795a2e commit 662720a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,3 +1,5 @@
v0.1.1. Fixing Manifest contents and adding Rails information to README.

v0.1.0. Adding rake tasks to sync and manage database functions and design documents. Also added support for list and show functions; as well as fulltext administration.

v0.0.2. Fixing gemspec.
Expand Down
12 changes: 12 additions & 0 deletions Manifest
Expand Up @@ -4,6 +4,7 @@ Manifest
README.markdown
Rakefile
TODO
couch-client.gemspec
lib/couch-client.rb
lib/couch-client/attachment.rb
lib/couch-client/attachment_list.rb
Expand All @@ -15,6 +16,7 @@ lib/couch-client/database.rb
lib/couch-client/design.rb
lib/couch-client/document.rb
lib/couch-client/hookup.rb
lib/couch-client/rake_task.rb
lib/couch-client/row.rb
spec/attachment_list_spec.rb
spec/attachment_spec.rb
Expand All @@ -25,9 +27,19 @@ spec/consistent_hash_spec.rb
spec/couch-client_spec.rb
spec/database_spec.rb
spec/design_spec.rb
spec/designs/create/people/fulltext/by_name/index.js
spec/designs/create/people/validate_on_update.js
spec/designs/create/people/views/all/map.js
spec/designs/create/people/views/sum/map.js
spec/designs/create/people/views/sum/reduce.js
spec/designs/update/people/fulltext/by_name/index.js
spec/designs/update/people/validate_on_update.js
spec/designs/update/people/views/sum/map.js
spec/designs/update/people/views/sum/reduce.js
spec/document_spec.rb
spec/files/image.png
spec/files/plain.txt
spec/hookup_spec.rb
spec/rake_task_spec.rb
spec/row_spec.rb
spec/spec_helper.rb
11 changes: 11 additions & 0 deletions README.markdown
Expand Up @@ -179,6 +179,17 @@ CouchClient rake tasks can be enabled by adding the following to your `Rakefile`
c.design_path = "./designs"
end

Or you can add CouchClient rake tasks to your rails app by making the following file in `lib/tasks/couch.rake`.

require "#{Rails.root}/config/environment"

CouchClient::RakeTask.new do |c|
c.connection = Couch
c.design_path = "./app/designs"
end

You can then specify your CouchClient settings for each each environment in their respective configuration files (e.g. development.rb, test.rb and production.rb).

Two parameters are available, `connection` should be the actual variable used for your CouchDB interface and `design_path` should be the application's location where design documents will be stored.

Within the design path, you should format each design document with folders and files corresponding to the fields in your design document.
Expand Down
8 changes: 4 additions & 4 deletions couch-client.gemspec
Expand Up @@ -2,15 +2,15 @@

Gem::Specification.new do |s|
s.name = %q{couch-client}
s.version = "0.1.0"
s.version = "0.1.1"

s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Robert Sosinski"]
s.date = %q{2010-11-05}
s.date = %q{2010-11-11}
s.description = %q{A Ruby interface for CouchDB}
s.email = %q{email@robertsosinski.com}
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.markdown", "TODO", "lib/couch-client.rb", "lib/couch-client/attachment.rb", "lib/couch-client/attachment_list.rb", "lib/couch-client/collection.rb", "lib/couch-client/connection.rb", "lib/couch-client/connection_handler.rb", "lib/couch-client/consistent_hash.rb", "lib/couch-client/database.rb", "lib/couch-client/design.rb", "lib/couch-client/document.rb", "lib/couch-client/hookup.rb", "lib/couch-client/row.rb"]
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.markdown", "Rakefile", "TODO", "lib/couch-client.rb", "lib/couch-client/attachment.rb", "lib/couch-client/attachment_list.rb", "lib/couch-client/collection.rb", "lib/couch-client/connection.rb", "lib/couch-client/connection_handler.rb", "lib/couch-client/consistent_hash.rb", "lib/couch-client/database.rb", "lib/couch-client/design.rb", "lib/couch-client/document.rb", "lib/couch-client/hookup.rb", "lib/couch-client/row.rb", "spec/attachment_list_spec.rb", "spec/attachment_spec.rb", "spec/collection_spec.rb", "spec/conection_handler_spec.rb", "spec/connection_spec.rb", "spec/consistent_hash_spec.rb", "spec/couch-client_spec.rb", "spec/database_spec.rb", "spec/design_spec.rb", "spec/document_spec.rb", "spec/files/image.png", "spec/files/plain.txt", "spec/hookup_spec.rb", "spec/row_spec.rb", "spec/spec_helper.rb", "couch-client.gemspec"]
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.markdown", "TODO", "lib/couch-client.rb", "lib/couch-client/attachment.rb", "lib/couch-client/attachment_list.rb", "lib/couch-client/collection.rb", "lib/couch-client/connection.rb", "lib/couch-client/connection_handler.rb", "lib/couch-client/consistent_hash.rb", "lib/couch-client/database.rb", "lib/couch-client/design.rb", "lib/couch-client/document.rb", "lib/couch-client/hookup.rb", "lib/couch-client/rake_task.rb", "lib/couch-client/row.rb"]
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.markdown", "Rakefile", "TODO", "couch-client.gemspec", "lib/couch-client.rb", "lib/couch-client/attachment.rb", "lib/couch-client/attachment_list.rb", "lib/couch-client/collection.rb", "lib/couch-client/connection.rb", "lib/couch-client/connection_handler.rb", "lib/couch-client/consistent_hash.rb", "lib/couch-client/database.rb", "lib/couch-client/design.rb", "lib/couch-client/document.rb", "lib/couch-client/hookup.rb", "lib/couch-client/rake_task.rb", "lib/couch-client/row.rb", "spec/attachment_list_spec.rb", "spec/attachment_spec.rb", "spec/collection_spec.rb", "spec/conection_handler_spec.rb", "spec/connection_spec.rb", "spec/consistent_hash_spec.rb", "spec/couch-client_spec.rb", "spec/database_spec.rb", "spec/design_spec.rb", "spec/designs/create/people/fulltext/by_name/index.js", "spec/designs/create/people/validate_on_update.js", "spec/designs/create/people/views/all/map.js", "spec/designs/create/people/views/sum/map.js", "spec/designs/create/people/views/sum/reduce.js", "spec/designs/update/people/fulltext/by_name/index.js", "spec/designs/update/people/validate_on_update.js", "spec/designs/update/people/views/sum/map.js", "spec/designs/update/people/views/sum/reduce.js", "spec/document_spec.rb", "spec/files/image.png", "spec/files/plain.txt", "spec/hookup_spec.rb", "spec/rake_task_spec.rb", "spec/row_spec.rb", "spec/spec_helper.rb"]
s.homepage = %q{http://github.com/robertsosinski/couch-client}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Couch-client", "--main", "README.markdown"]
s.require_paths = ["lib"]
Expand Down
2 changes: 1 addition & 1 deletion lib/couch-client.rb
Expand Up @@ -11,7 +11,7 @@
require 'couch-client/design'
require 'couch-client/collection'
require 'couch-client/row'
require "couch-client/rake_task" if defined?(Rake)
require 'couch-client/rake_task' if defined?(Rake)

# The CouchClient module is the overall container of all CouchClient logic.
module CouchClient
Expand Down
2 changes: 1 addition & 1 deletion lib/couch-client/hookup.rb
Expand Up @@ -87,7 +87,7 @@ def curl(verb, path = nil, query = nil, data = {}, content_type = "application/j
code = easy.response_code

# body is either a nil, a hash or a string containing attachment data.
body = if easy.body_str == "" || easy.body_str.nil?
body = if verb == :head
# Head requests should return `nil`.
nil
# If the response is not a 200, then it must be JSON (as CouchDB returns all feedback as JSON), so parse it.
Expand Down

0 comments on commit 662720a

Please sign in to comment.