fake-aws-sdk 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzFlYzIwMWZkMjRhYzg3MmY2ODY4YjdkZTY1MjVjM2U3YWFjMjg5Mw==
5
+ data.tar.gz: !binary |-
6
+ NmY5MjEyNDBmY2U1MDlhMTliY2MxNjNhMWE0YWQxMTRjOGRlMjUyYg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NGEyZDM3OTY5M2ZiMGQ2YWQyNTc0NDViNTE3ZDBhMDQ5NWM2ZmM5YTdiYjIw
10
+ NGUxNDgyYzhiNWFkM2NjMGZhZjBjMzcxNzdmZTY2NDdjYWNjZjUyNjdlM2Ux
11
+ OTFiOGVjODhmN2UzMjk1ZTk4ODBkMjVkMzY0MDZhZjc4YzAyNzQ=
12
+ data.tar.gz: !binary |-
13
+ MzhhODE0NjY2NzVjMjRlNWY5YTkxYjI2NGI1MWMzYjQwNDVkZjUyNTM2M2U1
14
+ ZWM0YmI3MDAyMGQ4YmM5Zjc1ZWIwZDFkYzU0M2RlNzJhNDU5M2Q4ZTk2NDE4
15
+ NTYxODAyOWM2NGYzMmJjMGJlOTZiNDFmMGVkZjBmNDc0NjE1ODE=
@@ -13,6 +13,7 @@ module FakeAWS
13
13
 
14
14
  def write(data, options = {})
15
15
  data = data.read if data.respond_to?(:read)
16
+ data = data.dup.force_encoding("BINARY") if data.respond_to?(:force_encoding)
16
17
  @data = data
17
18
  end
18
19
 
@@ -1,3 +1,3 @@
1
1
  module FakeAWS
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require "fake_aws/s3/bucket"
2
4
  require "fake_aws/s3/s3_object"
3
5
 
@@ -127,6 +129,20 @@ describe FakeAWS::S3::S3Object do
127
129
 
128
130
  end
129
131
 
132
+ context "with UTF-8 data" do
133
+
134
+ let(:utf8_content) { "SN☃WMAN" }
135
+
136
+ before do
137
+ object.write(utf8_content)
138
+ end
139
+
140
+ it "converts it to BINARY" do
141
+ object.read.encoding.name.should eq("ASCII-8BIT")
142
+ end
143
+
144
+ end
145
+
130
146
  end
131
147
 
132
148
  describe "#copy_to" do
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake-aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mike Williams
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
11
+ date: 2013-09-25 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Fake implementation of AWS SDK
15
14
  email:
@@ -40,33 +39,26 @@ files:
40
39
  - spec/fake-aws/s3_spec.rb
41
40
  homepage: http://github.com/cogent/fake-aws-sdk
42
41
  licenses: []
42
+ metadata: {}
43
43
  post_install_message:
44
44
  rdoc_options: []
45
45
  require_paths:
46
46
  - lib
47
47
  required_ruby_version: !ruby/object:Gem::Requirement
48
- none: false
49
48
  requirements:
50
49
  - - ! '>='
51
50
  - !ruby/object:Gem::Version
52
51
  version: '0'
53
- segments:
54
- - 0
55
- hash: 1837342833771022398
56
52
  required_rubygems_version: !ruby/object:Gem::Requirement
57
- none: false
58
53
  requirements:
59
54
  - - ! '>='
60
55
  - !ruby/object:Gem::Version
61
56
  version: '0'
62
- segments:
63
- - 0
64
- hash: 1837342833771022398
65
57
  requirements: []
66
58
  rubyforge_project:
67
- rubygems_version: 1.8.23
59
+ rubygems_version: 2.0.7
68
60
  signing_key:
69
- specification_version: 3
61
+ specification_version: 4
70
62
  summary: Fake implementation of AWS SDK
71
63
  test_files:
72
64
  - spec/fake-aws/s3/bucket_collection_spec.rb