crazylegs 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,7 +107,6 @@ module Crazylegs
107
107
  # using a method other than the one you passed to the constructor, it will not work.
108
108
  def full_url(timestamp=nil,nonce=nil)
109
109
  query_string_params,oauth_params = get_query_and_oauth_parameters(timestamp,nonce)
110
- oauth_params = escape_param_values(oauth_params)
111
110
 
112
111
  assembled_url = assemble_url(query_string_params.merge(oauth_params))
113
112
  @logger.debug("Full URL is " + assembled_url)
@@ -171,6 +170,8 @@ module Crazylegs
171
170
 
172
171
  oauth_params['oauth_signature'] = signature
173
172
 
173
+ oauth_params = escape_param_values(oauth_params)
174
+
174
175
  [url_params,oauth_params]
175
176
  end
176
177
 
@@ -1,3 +1,3 @@
1
1
  module Crazylegs
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -65,7 +65,7 @@ class TC_testURL < Test::Unit::TestCase
65
65
 
66
66
  private
67
67
  def do_simple_assert
68
- signature = 'tR3+Ty81lMeYAr/Fid0kMTYa/WM='
68
+ # The unencoded signature is 'tR3+Ty81lMeYAr/Fid0kMTYa/WM='
69
69
  signature_encoded = 'tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D'
70
70
  expected_url_with_query_string = 'http://photos.example.net/photos?file=vacation.jpg&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_nonce=kllo9940pd9333jh&oauth_signature=' + signature_encoded + '&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1191242096&oauth_token=nnch734d00sl2jdk&oauth_version=1.0&size=original'
71
71
  assert_equal(expected_url_with_query_string,@signed_url.full_url(1191242096,'kllo9940pd9333jh'))
@@ -74,7 +74,7 @@ class TC_testURL < Test::Unit::TestCase
74
74
  result = @signed_url.full_url_using_headers(1191242096,'kllo9940pd9333jh')
75
75
  assert_equal(expected_url_for_headers,result[0])
76
76
  expected_headers = {
77
- 'Authorization' => 'OAuth oauth_consumer_key="dpf43f3p2l4k3l03",oauth_nonce="kllo9940pd9333jh",oauth_signature="' + signature + '",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1191242096",oauth_token="nnch734d00sl2jdk",oauth_version="1.0"'
77
+ 'Authorization' => 'OAuth oauth_consumer_key="dpf43f3p2l4k3l03",oauth_nonce="kllo9940pd9333jh",oauth_signature="' + signature_encoded + '",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1191242096",oauth_token="nnch734d00sl2jdk",oauth_version="1.0"'
78
78
  }
79
79
  assert_equal(expected_headers,result[1])
80
80
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crazylegs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dave Copeland
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-19 00:00:00 -04:00
18
+ date: 2011-06-17 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency