flickraw 0.4.1 → 0.4.2

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.
Files changed (3) hide show
  1. data/lib/flickraw.rb +3 -2
  2. data/test/test.rb +8 -0
  3. metadata +3 -3
@@ -23,9 +23,10 @@
23
23
  require 'net/http'
24
24
  require 'md5'
25
25
  require 'yaml'
26
+ require 'cgi'
26
27
 
27
28
  module FlickRaw
28
- VERSION='0.4.1'
29
+ VERSION='0.4.2'
29
30
 
30
31
  FLICKR_HOST='api.flickr.com'.freeze
31
32
 
@@ -199,7 +200,7 @@ module FlickRaw
199
200
  full_args = {:api_key => FlickRaw.api_key, :format => 'json', :nojsoncallback => 1}
200
201
  full_args[:method] = req if req
201
202
  full_args[:auth_token] = @token if @token
202
- args.each {|k, v| full_args[k.to_sym] = v }
203
+ args.each {|k, v| full_args[k.to_sym] = CGI.escape(v.to_s) }
203
204
  full_args[:api_sig] = FlickRaw.api_sig(full_args) if FlickRaw.shared_secret
204
205
  full_args
205
206
  end
@@ -43,4 +43,12 @@ class Basic < Test::Unit::TestCase
43
43
  assert_respond_to info, :comments
44
44
  assert_respond_to info, :tags
45
45
  end
46
+
47
+ def test_url_escape
48
+ result_set = nil
49
+ assert_nothing_raised {
50
+ result_set = flickr.photos.search :text => "family vacation"
51
+ }
52
+ assert_operator result_set.total.to_i, :>=, 0
53
+ end
46
54
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: flickraw
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.1
7
- date: 2007-02-02 00:00:00 +01:00
6
+ version: 0.4.2
7
+ date: 2007-04-09 00:00:00 +02:00
8
8
  summary: Flickr library with a syntax close to the syntax described on http://www.flickr.com/services/api
9
9
  require_paths:
10
10
  - lib