Skip to content
Browse files

updated rocking chair for ruby 1.9.3

  • Loading branch information...
1 parent 827a35b commit b72c1b7b2de3d09cfa948f0251ce32d3a664fe9d @toriaezu toriaezu committed May 29, 2012
Showing with 12 additions and 9 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 Gemfile
  3. +1 −0 lib/rocking_chair/database.rb
  4. +6 −6 rocking_chair.gemspec
  5. +3 −2 test/view_test.rb
View
1 .gitignore
@@ -1,2 +1,3 @@
*.swp
Gemfile.lock
+.rvmrc
View
2 Gemfile
@@ -1,7 +1,7 @@
source :rubygems
gem 'uuidtools'
-gem 'simply_stored', '0.7.0rc7', :require => 'simply_stored/couch'
+gem 'simply_stored', '0.8.0', :require => 'simply_stored/couch'
gem 'couch_potato', '0.6.0.1'
gem 'jeweler'
View
1 lib/rocking_chair/database.rb
@@ -135,6 +135,7 @@ def view(design_doc_name, view_name, options = {})
protected
def normalize_payload(doc)
+ doc = doc.to_json unless doc.is_a?(String)
doc = JSON.parse(doc, :create_additions => false) unless doc.is_a?(Hash)
raise "is not a Hash" unless doc.is_a?(Hash)
doc
View
12 rocking_chair.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "rocking_chair"
- s.version = "0.4.10"
+ s.version = "0.5.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jonathan Weiss"]
- s.date = "2011-10-13"
+ s.date = "2012-05-29"
s.description = "In-memory CouchDB for Couchrest and SimplyStored. Works for database and document API, by_attribute views, and for SimplyStored generated views"
s.email = "jw@innerewut.de"
s.extra_rdoc_files = [
@@ -31,23 +31,23 @@ Gem::Specification.new do |s|
]
s.homepage = "http://github.com/jweiss/rocking_chair"
s.require_paths = ["lib"]
- s.rubygems_version = "1.8.10"
+ s.rubygems_version = "1.8.24"
s.summary = "In-memory CouchDB for Couchrest and SimplyStored"
if s.respond_to? :specification_version then
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<uuidtools>, [">= 0"])
- s.add_runtime_dependency(%q<simply_stored>, ["= 0.7.0rc7"])
+ s.add_runtime_dependency(%q<simply_stored>, ["= 0.8.0"])
s.add_runtime_dependency(%q<couch_potato>, ["= 0.6.0.1"])
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
s.add_runtime_dependency(%q<simply_stored>, [">= 0.1.12"])
s.add_runtime_dependency(%q<rest-client>, [">= 1.6.1"])
s.add_runtime_dependency(%q<couchrest>, [">= 1.0.1"])
else
s.add_dependency(%q<uuidtools>, [">= 0"])
- s.add_dependency(%q<simply_stored>, ["= 0.7.0rc7"])
+ s.add_dependency(%q<simply_stored>, ["= 0.8.0"])
s.add_dependency(%q<couch_potato>, ["= 0.6.0.1"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<simply_stored>, [">= 0.1.12"])
@@ -56,7 +56,7 @@ Gem::Specification.new do |s|
end
else
s.add_dependency(%q<uuidtools>, [">= 0"])
- s.add_dependency(%q<simply_stored>, ["= 0.7.0rc7"])
+ s.add_dependency(%q<simply_stored>, ["= 0.8.0"])
s.add_dependency(%q<couch_potato>, ["= 0.6.0.1"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<simply_stored>, [">= 0.1.12"])
View
5 test/view_test.rb
@@ -392,6 +392,7 @@ class ViewTest < Test::Unit::TestCase
should "return all item not storing keys" do
assert_equal(parse_json({
"total_rows" => 2,
+ "offset" => 0,
"rows" => [
{"doc" => {
"_rev" => "the-rev",
@@ -414,8 +415,8 @@ class ViewTest < Test::Unit::TestCase
"id" => "user_2",
"value" => nil,
"key" => "group_1"
- }],
- "offset" => 0}.to_json), parse_json(@db.view('user', 'association_user_has_and_belongs_to_many_groups', 'key' => "group_1".to_json, 'include_docs' => 'true')))
+ }]
+ }.to_json), parse_json(@db.view('user', 'association_user_has_and_belongs_to_many_groups', 'key' => "group_1".to_json, 'include_docs' => 'true')))
end
should "return all item storing keys" do

0 comments on commit b72c1b7

Please sign in to comment.
Something went wrong with that request. Please try again.