rested 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rested/debug.rb +9 -3
  3. metadata +4 -13
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/lib/rested/debug.rb CHANGED
@@ -4,7 +4,7 @@ module Rested
4
4
 
5
5
  def self.debug(val=nil)
6
6
  return @debug unless val
7
- if val == true then
7
+ if val == true || val == 1 || val.nil? then
8
8
  @debug = STDOUT
9
9
  else
10
10
  @debug = val
@@ -20,9 +20,15 @@ module Rested
20
20
  if block_given? then
21
21
  s = yield
22
22
  return if not s.kind_of? String
23
- @debug.puts(s)
24
- elsif not msg.nil? then
23
+ msg = s
24
+ end
25
+ return if msg.nil?
26
+ if @debug.respond_to? :puts then
25
27
  @debug.puts(msg)
28
+ elsif @debug.respond_to? :debug then
29
+ @debug.debug(msg)
30
+ else
31
+ puts "[Rested.debug] #{msg}"
26
32
  end
27
33
  end
28
34
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rested
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
- - 2
7
+ - 3
9
8
  - 0
10
- version: 0.2.0
9
+ version: 0.3.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Chetan Sarva
@@ -15,18 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-07-21 00:00:00 -04:00
17
+ date: 2010-08-27 00:00:00 -04:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: httpclient
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 119
30
27
  segments:
31
28
  - 2
32
29
  - 1
@@ -39,11 +36,9 @@ dependencies:
39
36
  name: json
40
37
  prerelease: false
41
38
  requirement: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
39
  requirements:
44
40
  - - ">="
45
41
  - !ruby/object:Gem::Version
46
- hash: 3
47
42
  segments:
48
43
  - 1
49
44
  - 4
@@ -81,27 +76,23 @@ rdoc_options:
81
76
  require_paths:
82
77
  - lib
83
78
  required_ruby_version: !ruby/object:Gem::Requirement
84
- none: false
85
79
  requirements:
86
80
  - - ">="
87
81
  - !ruby/object:Gem::Version
88
- hash: 3
89
82
  segments:
90
83
  - 0
91
84
  version: "0"
92
85
  required_rubygems_version: !ruby/object:Gem::Requirement
93
- none: false
94
86
  requirements:
95
87
  - - ">="
96
88
  - !ruby/object:Gem::Version
97
- hash: 3
98
89
  segments:
99
90
  - 0
100
91
  version: "0"
101
92
  requirements: []
102
93
 
103
94
  rubyforge_project:
104
- rubygems_version: 1.3.7
95
+ rubygems_version: 1.3.6
105
96
  signing_key:
106
97
  specification_version: 3
107
98
  summary: Ruby library for working with RESTful APIs