Class: Fog::AWS::Storage::Mock

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/fog/storage/requests/aws/get_bucket.rb,
lib/fog/storage/aws.rb,
lib/fog/storage/requests/aws/get_object.rb,
lib/fog/storage/requests/aws/list_parts.rb,
lib/fog/storage/requests/aws/put_bucket.rb,
lib/fog/storage/requests/aws/put_object.rb,
lib/fog/storage/requests/aws/sync_clock.rb,
lib/fog/storage/requests/aws/copy_object.rb,
lib/fog/storage/requests/aws/get_service.rb,
lib/fog/storage/requests/aws/head_object.rb,
lib/fog/storage/requests/aws/upload_part.rb,
lib/fog/storage/requests/aws/delete_bucket.rb,
lib/fog/storage/requests/aws/delete_object.rb,
lib/fog/storage/requests/aws/get_bucket_acl.rb,
lib/fog/storage/requests/aws/get_object_acl.rb,
lib/fog/storage/requests/aws/get_object_url.rb,
lib/fog/storage/requests/aws/put_bucket_acl.rb,
lib/fog/storage/requests/aws/put_object_acl.rb,
lib/fog/storage/requests/aws/put_object_url.rb,
lib/fog/storage/requests/aws/get_bucket_logging.rb,
lib/fog/storage/requests/aws/get_object_torrent.rb,
lib/fog/storage/requests/aws/put_bucket_logging.rb,
lib/fog/storage/requests/aws/get_bucket_location.rb,
lib/fog/storage/requests/aws/get_request_payment.rb,
lib/fog/storage/requests/aws/put_request_payment.rb,
lib/fog/storage/requests/aws/get_bucket_versioning.rb,
lib/fog/storage/requests/aws/put_bucket_versioning.rb,
lib/fog/storage/requests/aws/abort_multipart_upload.rb,
lib/fog/storage/requests/aws/list_multipart_uploads.rb,
lib/fog/storage/requests/aws/complete_multipart_upload.rb,
lib/fog/storage/requests/aws/initiate_multipart_upload.rb,
lib/fog/storage/requests/aws/post_object_hidden_fields.rb,
lib/fog/storage/requests/aws/get_bucket_object_versions.rb

Overview

:nodoc:all

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

#cdn, #parse_data, #url

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/fog/storage/aws.rb', line 192

def initialize(options={})
  unless options.delete(:provider)
    location = caller.first
    warning = "[yellow][WARN] Fog::AWS::Storage.new is deprecated, use Fog::Storage.new(:provider => 'AWS') instead[/]"
    warning << " [light_black](" << location << ")[/] "
    Formatador.display_line(warning)
  end

  require 'mime/types'
  @aws_access_key_id = options[:aws_access_key_id]
  @aws_secret_access_key = options[:aws_secret_access_key]
  options[:region] ||= 'us-east-1'
  @host = options[:host] || case options[:region]
  when 'eu-west-1'
    's3-eu-west-1.amazonaws.com'
  when 'us-east-1'
    's3.amazonaws.com'
  when 'ap-southeast-1'
    's3-ap-southeast-1.amazonaws.com'
  when 'us-west-1'
    's3-us-west-1.amazonaws.com'
  else
    raise ArgumentError, "Unknown region: #{options[:region].inspect}"
  end
  @data = self.class.data[options[:region]][@aws_access_key_id]
end

Class Method Details

.acls(type) ⇒ Object



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/fog/storage/aws.rb', line 111

def self.acls(type)
  case type
  when 'private'
    {
      "AccessControlList" => [
        {
          "Permission" => "FULL_CONTROL",
          "Grantee" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
        }
      ],
      "Owner" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
    }
  when 'public-read'
    {
      "AccessControlList" => [
        {
          "Permission" => "FULL_CONTROL",
          "Grantee" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
        },
        {
          "Permission" => "READ",
          "Grantee" => {"URI" => "http://acs.amazonaws.com/groups/global/AllUsers"}
        }
      ],
      "Owner" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
    }
  when 'public-read-write'
    {
      "AccessControlList" => [
        {
          "Permission" => "FULL_CONTROL",
          "Grantee" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
        },
        {
          "Permission" => "READ",
          "Grantee" => {"URI" => "http://acs.amazonaws.com/groups/global/AllUsers"}
        },
        {
          "Permission" => "WRITE",
          "Grantee" => {"URI" => "http://acs.amazonaws.com/groups/global/AllUsers"}
        }
      ],
      "Owner" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
    }
  when 'authenticated-read'
    {
      "AccessControlList" => [
        {
          "Permission" => "FULL_CONTROL",
          "Grantee" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
        },
        {
          "Permission" => "READ",
          "Grantee" => {"URI" => "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"}
        }
      ],
      "Owner" => {"DisplayName" => "me", "ID" => "2744ccd10c7533bd736ad890f9dd5cab2adb27b07d500b9493f29cdc420cb2e0"}
    }
  end
end

.dataObject



172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/fog/storage/aws.rb', line 172

def self.data
  @data ||= Hash.new do |hash, region|
    hash[region] = Hash.new do |region_hash, key|
      region_hash[key] = {
        :acls => {
          :bucket => {},
          :object => {}
        },
        :buckets => {}
      }
    end
  end
end

.reset_data(keys = data.keys) ⇒ Object



186
187
188
189
190
# File 'lib/fog/storage/aws.rb', line 186

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#abort_multipart_upload(bucket_name, object_name, upload_id) ⇒ Object

:nodoc:all



31
32
33
# File 'lib/fog/storage/requests/aws/abort_multipart_upload.rb', line 31

def abort_multipart_upload(bucket_name, object_name, upload_id)
  Fog::Mock.not_implemented
end

#complete_multipart_upload(bucket_name, object_name, upload_id, parts) ⇒ Object

:nodoc:all



53
54
55
# File 'lib/fog/storage/requests/aws/complete_multipart_upload.rb', line 53

def complete_multipart_upload(bucket_name, object_name, upload_id, parts)
  Fog::Mock.not_implemented
end

#copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {}) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/fog/storage/requests/aws/copy_object.rb', line 47

def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
  response = Excon::Response.new
  source_bucket = @data[:buckets][source_bucket_name]
  source_object = source_bucket && source_bucket[:objects][source_object_name]
  target_bucket = @data[:buckets][target_bucket_name]

  if source_object && target_bucket
    response.status = 200
    target_object = source_object.dup
    target_object.merge!({
      'Name' => target_object_name
    })
    target_bucket[:objects][target_object_name] = target_object
    response.body = {
      'ETag'          => target_object['ETag'],
      'LastModified'  => Time.parse(target_object['LastModified'])
    }
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end

  response
end

#delete_bucket(bucket_name) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/fog/storage/requests/aws/delete_bucket.rb', line 31

def delete_bucket(bucket_name)
  response = Excon::Response.new
  if @data[:buckets][bucket_name].nil?
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 204}, response))
  elsif @data[:buckets][bucket_name] && !@data[:buckets][bucket_name][:objects].empty?
    response.status = 409
    raise(Excon::Errors.status_error({:expects => 204}, response))
  else
    @data[:buckets].delete(bucket_name)
    response.status = 204
  end
  response
end

#delete_object(bucket_name, object_name) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/fog/storage/requests/aws/delete_object.rb', line 34

def delete_object(bucket_name, object_name)
  response = Excon::Response.new
  if bucket = @data[:buckets][bucket_name]
    response.status = 204
    bucket[:objects].delete(object_name)
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 204}, response))
  end
  response
end

#get_bucket(bucket_name, options = {}) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/fog/storage/requests/aws/get_bucket.rb', line 62

def get_bucket(bucket_name, options = {})
  unless bucket_name
    raise ArgumentError.new('bucket_name is required')
  end
  if options['delimiter']
    Fog::Mock.not_implemented
  end
  response = Excon::Response.new
  if bucket = @data[:buckets][bucket_name]
    contents = bucket[:objects].values.sort {|x,y| x['Key'] <=> y['Key']}.reject do |object|
        (options['prefix'] && object['Key'][0...options['prefix'].length] != options['prefix']) ||
        (options['marker'] && object['Key'] <= options['marker'])
      end.map do |object|
        data = object.reject {|key, value| !['ETag', 'Key', 'LastModified', 'Size', 'StorageClass'].include?(key)}
        data.merge!({
          'LastModified' => Time.parse(data['LastModified']),
          'Owner'        => bucket['Owner'],
          'Size'         => data['Size'].to_i
        })
      data
    end
    max_keys = options['max-keys'] || 1000
    size = [max_keys, 1000].min
    truncated_contents = contents[0...size]

    response.status = 200
    response.body = {
      'CommonPrefixes'  => [],
      'Contents'        => truncated_contents,
      'IsTruncated'     => truncated_contents.size != contents.size,
      'Marker'          => options['marker'],
      'MaxKeys'         => max_keys,
      'Name'            => bucket['Name'],
      'Prefix'          => options['prefix']
    }
    if options['max-keys'] && options['max-keys'] < response.body['Contents'].length
        response.body['IsTruncated'] = true
        response.body['Contents'] = response.body['Contents'][0...options['max-keys']]
    end
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_bucket_acl(bucket_name) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/fog/storage/requests/aws/get_bucket_acl.rb', line 51

def get_bucket_acl(bucket_name)
  response = Excon::Response.new
  if acl = @data[:acls][:bucket][bucket_name]
    response.status = 200
    response.body = acl
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_bucket_location(bucket_name) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fog/storage/requests/aws/get_bucket_location.rb', line 37

def get_bucket_location(bucket_name)
  response = Excon::Response.new
  if bucket = @data[:buckets][bucket_name]
    response.status = 200
    response.body = {'LocationConstraint' => bucket['LocationConstraint'] }
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_bucket_logging(bucket_name) ⇒ Object



51
52
53
# File 'lib/fog/storage/requests/aws/get_bucket_logging.rb', line 51

def get_bucket_logging(bucket_name)
  Fog::Mock.not_implemented
end

#get_bucket_object_versions(bucket_name, options = {}) ⇒ Object



76
77
78
# File 'lib/fog/storage/requests/aws/get_bucket_object_versions.rb', line 76

def get_bucket_object_versions(bucket_name, options = {})
  Fog::Mock.not_implemented
end

#get_bucket_versioning(bucket_name) ⇒ Object



41
42
43
# File 'lib/fog/storage/requests/aws/get_bucket_versioning.rb', line 41

def get_bucket_versioning(bucket_name)
  Fog::Mock.not_implemented
end

#get_object(bucket_name, object_name, options = {}, &block) ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/fog/storage/requests/aws/get_object.rb', line 60

def get_object(bucket_name, object_name, options = {}, &block)
  unless bucket_name
    raise ArgumentError.new('bucket_name is required')
  end
  unless object_name
    raise ArgumentError.new('object_name is required')
  end
  response = Excon::Response.new
  if (bucket = @data[:buckets][bucket_name]) && (object = bucket[:objects][object_name])
    if options['If-Match'] && options['If-Match'] != object['ETag']
      response.status = 412
    elsif options['If-Modified-Since'] && options['If-Modified-Since'] > Time.parse(object['LastModified'])
      response.status = 304
    elsif options['If-None-Match'] && options['If-None-Match'] == object['ETag']
      response.status = 304
    elsif options['If-Unmodified-Since'] && options['If-Unmodified-Since'] < Time.parse(object['LastModified'])
      response.status = 412
    else
      response.status = 200
      response.headers = {
        'Content-Length'  => object['Size'],
        'Content-Type'    => object['Content-Type'],
        'ETag'            => object['ETag'],
        'Last-Modified'   => object['LastModified']
      }
      unless block_given?
        response.body = object[:body]
      else
        data = StringIO.new(object[:body])
        remaining = data.length
        while remaining > 0
          chunk = data.read([remaining, Excon::CHUNK_SIZE].min)
          block.call(chunk)
          remaining -= Excon::CHUNK_SIZE
        end
      end
    end
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_object_acl(bucket_name, object_name) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
# File 'lib/fog/storage/requests/aws/get_object_acl.rb', line 62

def get_object_acl(bucket_name, object_name)
  response = Excon::Response.new
  if acl = @data[:acls][:object][bucket_name] && @data[:acls][:object][bucket_name][object_name]
    response.status = 200
    response.body = acl
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_object_object(bucket_name, object_name) ⇒ Object



51
52
53
# File 'lib/fog/storage/requests/aws/get_object_torrent.rb', line 51

def get_object_object(bucket_name, object_name)
  Fog::Mock.not_implemented
end

#get_object_url(bucket_name, object_name, expires) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fog/storage/requests/aws/get_object_url.rb', line 39

def get_object_url(bucket_name, object_name, expires)
  unless bucket_name
    raise ArgumentError.new('bucket_name is required')
  end
  unless object_name
    raise ArgumentError.new('object_name is required')
  end
  url({
    :headers  => {},
    :host     => @host,
    :method   => 'GET',
    :path     => "#{bucket_name}/#{object_name}"
  }, expires)
end

#get_request_payment(bucket_name) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fog/storage/requests/aws/get_request_payment.rb', line 37

def get_request_payment(bucket_name)
  response = Excon::Response.new
  if bucket = @data[:buckets][bucket_name]
    response.status = 200
    response.body = { 'Payer' => bucket['Payer'] }
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#get_serviceObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fog/storage/requests/aws/get_service.rb', line 39

def get_service
  response = Excon::Response.new
  response.headers['Status'] = 200
  buckets = @data[:buckets].values.map do |bucket|
    bucket.reject do |key, value|
      !['CreationDate', 'Name'].include?(key)
    end
  end
  response.body = {
    'Buckets' => buckets,
    'Owner'   => { 'DisplayName' => 'owner', 'ID' => 'some_id'}
  }
  response
end

#head_object(bucket_name, object_name, options = {}) ⇒ Object



59
60
61
62
63
# File 'lib/fog/storage/requests/aws/head_object.rb', line 59

def head_object(bucket_name, object_name, options = {})
  response = get_object(bucket_name, object_name, options)
  response.body = nil
  response
end

#initiate_multipart_upload(bucket_name, object_name, options = {}) ⇒ Object

:nodoc:all



48
49
50
# File 'lib/fog/storage/requests/aws/initiate_multipart_upload.rb', line 48

def initiate_multipart_upload(bucket_name, object_name, options = {})
  Fog::Mock.not_implemented
end

#list_multipart_uploads(bucket_name, options = {}) ⇒ Object



61
62
63
# File 'lib/fog/storage/requests/aws/list_multipart_uploads.rb', line 61

def list_multipart_uploads(bucket_name, options = {})
  Fog::Mock.not_implemented
end

#list_parts(bucket_name, object_name, upload_id, options = {}) ⇒ Object



60
61
62
# File 'lib/fog/storage/requests/aws/list_parts.rb', line 60

def list_parts(bucket_name, object_name, upload_id, options = {})
  Fog::Mock.not_implemented
end

#post_object_hidden_fields(options = {}) ⇒ Object



43
44
45
# File 'lib/fog/storage/requests/aws/post_object_hidden_fields.rb', line 43

def post_object_hidden_fields(options = {})
  Fog::Mock.not_implemented
end

#put_bucket(bucket_name, options = {}) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/fog/storage/requests/aws/put_bucket.rb', line 46

def put_bucket(bucket_name, options = {})
  acl = options['x-amz-acl'] || 'private'
  if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
    raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
  else
    @data[:acls][:bucket][bucket_name] = self.class.acls(acl)
  end

  response = Excon::Response.new
  response.status = 200
  bucket = {
    :objects        => {},
    'Name'          => bucket_name,
    'CreationDate'  => Time.now,
    'Owner'         => { 'DisplayName' => 'owner', 'ID' => 'some_id'},
    'Payer'         => 'BucketOwner'
  }
  if options['LocationConstraint']
    bucket['LocationConstraint'] = options['LocationConstraint']
  else
    bucket['LocationConstraint'] = nil
  end
  unless @data[:buckets][bucket_name]
    @data[:buckets][bucket_name] = bucket
  end
  response
end

#put_bucket_acl(bucket_name, acl) ⇒ Object



77
78
79
# File 'lib/fog/storage/requests/aws/put_bucket_acl.rb', line 77

def put_bucket_acl(bucket_name, acl)
  Fog::Mock.not_implemented
end

#put_bucket_logging(bucket_name, logging_status) ⇒ Object



84
85
86
# File 'lib/fog/storage/requests/aws/put_bucket_logging.rb', line 84

def put_bucket_logging(bucket_name, logging_status)
  Fog::Mock.not_implemented
end

#put_bucket_versioning(bucket_name, status) ⇒ Object



37
38
39
# File 'lib/fog/storage/requests/aws/put_bucket_versioning.rb', line 37

def put_bucket_versioning(bucket_name, status)
  Fog::Mock.not_implemented
end

#put_object(bucket_name, object_name, data, options = {}) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/fog/storage/requests/aws/put_object.rb', line 49

def put_object(bucket_name, object_name, data, options = {})
  acl = options['x-amz-acl'] || 'private'
  if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
    raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
  else
    @data[:acls][:object][bucket_name] ||= {}
    @data[:acls][:object][bucket_name][object_name] = self.class.acls(acl)
  end

  data = parse_data(data)
  unless data[:body].is_a?(String)
    data[:body] = data[:body].read
  end
  response = Excon::Response.new
  if (bucket = @data[:buckets][bucket_name])
    response.status = 200
    object = {
      :body           => data[:body],
      'Content-Type'  => data[:headers]['Content-Type'],
      'ETag'          => Fog::AWS::Mock.etag,
      'Key'           => object_name,
      'LastModified'  => Fog::Time.now.to_date_header,
      'Size'          => data[:headers]['Content-Length'],
      'StorageClass'  => 'STANDARD'
    }
    bucket[:objects][object_name] = object
    response.headers = {
      'Content-Length'  => object['Size'],
      'Content-Type'    => object['Content-Type'],
      'ETag'            => object['ETag'],
      'Last-Modified'   => object['LastModified']
    }
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#put_object_acl(bucket_name, object_name, options, acl) ⇒ Object



86
87
88
# File 'lib/fog/storage/requests/aws/put_object_acl.rb', line 86

def put_object_acl(bucket_name, object_name, options, acl)
  Fog::Mock.not_implemented
end

#put_object_url(bucket_name, object_name, expires) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fog/storage/requests/aws/put_object_url.rb', line 39

def put_object_url(bucket_name, object_name, expires)
  unless bucket_name
    raise ArgumentError.new('bucket_name is required')
  end
  unless object_name
    raise ArgumentError.new('object_name is required')
  end
  url({
    :headers  => {},
    :host     => @host,
    :method   => 'PUT',
    :path     => "#{bucket_name}/#{object_name}"
  }, expires)
end

#put_request_payment(bucket_name, payer) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fog/storage/requests/aws/put_request_payment.rb', line 36

def put_request_payment(bucket_name, payer)
  response = Excon::Response.new
  if bucket = @data[:buckets][bucket_name]
    response.status = 200
    bucket['Payer'] = payer
  else
    response.status = 404
    raise(Excon::Errors.status_error({:expects => 200}, response))
  end
  response
end

#signature(params) ⇒ Object



219
220
221
# File 'lib/fog/storage/aws.rb', line 219

def signature(params)
  "foo"
end

#sync_clockObject

:nodoc:all



21
22
23
# File 'lib/fog/storage/requests/aws/sync_clock.rb', line 21

def sync_clock
  true
end

#upload_part(bucket_name, object_name, upload_id, part_number, data, options = {}) ⇒ Object

:nodoc:all



44
45
46
# File 'lib/fog/storage/requests/aws/upload_part.rb', line 44

def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {})
  Fog::Mock.not_implemented
end