rocking_chair 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -39,6 +39,14 @@ If you have tests where you want to run against the real CouchDB,
39
39
  just deactivate RockingChair:
40
40
 
41
41
  RockingChair.disable
42
+
43
+ You can also make RockingChair dump all requests:
44
+
45
+ RockingChair.enable_debug
46
+
47
+ and
48
+
49
+ RockingChair.disable_debug
42
50
 
43
51
 
44
52
  Caveats
@@ -2,7 +2,7 @@ module RockingChair
2
2
  module CouchRestHttpAdapter
3
3
  URL_PARAMETER = /[a-zA-Z0-9\-\_\%]+/
4
4
 
5
- @_rocking_chair_debug = true
5
+ @_rocking_chair_debug = false
6
6
 
7
7
  def get(uri, headers={})
8
8
  puts "GET: #{uri.inspect}: #{headers.inspect}" if @_rocking_chair_debug
data/lib/rocking_chair.rb CHANGED
@@ -35,4 +35,12 @@ module RockingChair
35
35
  end
36
36
  end
37
37
 
38
+ def self.enable_debug
39
+ HttpAbstraction.instance_variable_set("@_rocking_chair_debug", true)
40
+ end
41
+
42
+ def self.disable_debug
43
+ HttpAbstraction.instance_variable_set("@_rocking_chair_debug", false)
44
+ end
45
+
38
46
  end
@@ -5,7 +5,6 @@ class Comment < CouchRest::ExtendedDocument
5
5
  use_database SERVER.default_database
6
6
  property :body
7
7
  property :post_id
8
- timestamps!
9
8
 
10
9
  view_by :post_id
11
10
  end
@@ -14,7 +13,6 @@ class Post < CouchRest::ExtendedDocument
14
13
  use_database SERVER.default_database
15
14
  property :title
16
15
  property :body
17
- timestamps!
18
16
 
19
17
  def comments
20
18
  Comment.by_post_id :key => id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocking_chair
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Weiss
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-18 00:00:00 +01:00
12
+ date: 2010-03-04 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency