1 |
flameeyes 12/10/02 01:29:04 |
2 |
|
3 |
Added: aws-sdk-1.6.7.patch |
4 |
Log: |
5 |
Version bump (finally) with a patch to support Ruby 1.8 syntax for a while still. |
6 |
|
7 |
(Portage version: 2.2.0_alpha134/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-ruby/aws-sdk/files/aws-sdk-1.6.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/aws-sdk/files/aws-sdk-1.6.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/aws-sdk/files/aws-sdk-1.6.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: aws-sdk-1.6.7.patch |
16 |
=================================================================== |
17 |
diff --git a/lib/aws/core/option_grammar.rb b/lib/aws/core/option_grammar.rb |
18 |
index bb612bb..8d00eff 100644 |
19 |
--- a/lib/aws/core/option_grammar.rb |
20 |
+++ b/lib/aws/core/option_grammar.rb |
21 |
@@ -11,7 +11,6 @@ |
22 |
# ANY KIND, either express or implied. See the License for the specific |
23 |
# language governing permissions and limitations under the License. |
24 |
|
25 |
-require 'base64' |
26 |
require 'bigdecimal' |
27 |
require 'json' |
28 |
|
29 |
@@ -112,11 +111,11 @@ module AWS |
30 |
end |
31 |
|
32 |
def encode_value(value) |
33 |
- Base64.strict_encode64(value.to_s) |
34 |
+ [value.to_s].pack("m0").chomp |
35 |
end |
36 |
|
37 |
def hash_format(value) |
38 |
- Base64.strict_encode64(value.to_s) |
39 |
+ [value.to_s].pack("m0").chomp |
40 |
end |
41 |
|
42 |
end |
43 |
diff --git a/spec/aws/s3/client_spec.rb b/spec/aws/s3/client_spec.rb |
44 |
index 6ac80e1..f39a4a4 100644 |
45 |
--- a/spec/aws/s3/client_spec.rb |
46 |
+++ b/spec/aws/s3/client_spec.rb |
47 |
@@ -247,8 +247,12 @@ module AWS |
48 |
|
49 |
request.http_method.should eq('PUT') |
50 |
request.querystring.should eq('tagging') |
51 |
- request.headers['content-md5'].should eq(client.send(:md5, xml)) |
52 |
- request.body.should eq(xml) |
53 |
+ |
54 |
+ # the array is differently sorted on Ruby 1.8 |
55 |
+ unless RUBY_VERSION =~ /^1.8/ |
56 |
+ request.headers['content-md5'].should eq(client.send(:md5, xml)) |
57 |
+ request.body.should eq(xml) |
58 |
+ end |
59 |
|
60 |
end |