chimps 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -7,7 +7,7 @@ module Chimps
7
7
  #
8
8
  # @return [Configliere::Param]
9
9
  def self.config
10
- @config ||= Configliere.new
10
+ @config ||= Configliere::Param.new
11
11
  end
12
12
 
13
13
  # Backwards compatibility for version < 0.3.0.
@@ -9,7 +9,7 @@ module Chimps
9
9
  #
10
10
  # @return [true, false]
11
11
  def authenticable?
12
- !Chimps.config[:query][:key].blank?
12
+ Chimps.config[:query][:key]
13
13
  end
14
14
 
15
15
  def url_with_query_string
@@ -102,7 +102,7 @@ module Chimps
102
102
  #
103
103
  # @return [true, false]
104
104
  def authenticable?
105
- !Chimps.config[:catalog][:key].blank? && !Chimps.config[:catalog][:secret].blank?
105
+ Chimps.config[:catalog][:key] && Chimps.config[:catalog][:secret]
106
106
  end
107
107
  alias_method :signable?, :authenticable?
108
108
 
@@ -261,7 +261,7 @@ module Chimps
261
261
  # @return [String]
262
262
  def signed_query_string
263
263
  return unsigned_query_string unless should_encode?
264
- text_to_sign = ((body == true || (! body.blank?)) ? encoded_body : unsigned_query_string_stripped)
264
+ text_to_sign = ((body == true || (! body.empty?)) ? encoded_body : unsigned_query_string_stripped)
265
265
  signature = sign(text_to_sign)
266
266
  "#{unsigned_query_string}&signature=#{signature}"
267
267
  end
@@ -162,7 +162,7 @@ module Chimps
162
162
  #
163
163
  # @return [Hash, Array, String]
164
164
  def parse_response_body
165
- return {} if body.blank? || body == 'null'
165
+ return {} if body.nil? || body.empty? || body == 'null'
166
166
  if content_type == :yaml
167
167
  begin
168
168
  YAML.load(StringIO.new(body))
@@ -54,7 +54,7 @@ describe Chimps::Request do
54
54
 
55
55
  describe "generating the request body" do
56
56
  it "should have no body by default" do
57
- Chimps::Request.new('/path/to/something').body.should be_blank
57
+ Chimps::Request.new('/path/to/something').body.should be_empty
58
58
  end
59
59
 
60
60
  it "should encode a Hash of parameters when given" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chimps
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dhruv Bansal
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-12 00:00:00 -05:00
19
- default_executable:
18
+ date: 2011-05-18 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: json
@@ -133,7 +132,6 @@ files:
133
132
  - spec/chimps/workflows/download_spec.rb
134
133
  - spec/spec_helper.rb
135
134
  - spec/support/custom_matchers.rb
136
- has_rdoc: true
137
135
  homepage: http://github.com/infochimps/chimps
138
136
  licenses: []
139
137
 
@@ -163,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
161
  requirements: []
164
162
 
165
163
  rubyforge_project:
166
- rubygems_version: 1.3.7
164
+ rubygems_version: 1.7.2
167
165
  signing_key:
168
166
  specification_version: 3
169
167
  summary: Chimps is a Ruby interface for the Infochimps Catalog & Query APIs (http://www.infochimps.com/apis)