fog 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fog (0.3.5)
4
+ fog (0.3.6)
5
5
  builder
6
6
  excon (>= 0.2.1)
7
7
  formatador (>= 0.0.15)
@@ -108,13 +108,12 @@ There are also the basics of these providers (that could use your love):
108
108
 
109
109
  Enjoy, and let me know what I can do to continue improving fog!
110
110
 
111
- * See what already uses fog and add your own stuff to {the list}[http://wiki.github.com/geemus/fog/in-the-wild].
112
- * Work for {twitter}[http://twitter.com]? I'd love to reclaim the unused {@fog}[http://twitter.com/fog] account!
113
- * Follow {@geemus}[http://twitter.com/geemus] on Twitter.
114
- * Discuss in irc on the {#ruby-fog}[irc://irc.freenode.net/ruby-fog]#ruby-fog channel on Freenode or via email on the {mailing list}[http://groups.google.com/group/ruby-fog].
115
- * See upcoming work in the {tracker}[http://www.pivotaltracker.com/projects/54635].
116
- * Report bugs in {issues}[http://github.com/geemus/fog/issues].
117
- * Learn about {contributing}[http://wiki.github.com/geemus/fog/contributors-guide].
111
+ * Follow {@fog}[http://twitter.com/fog] and/or {@geemus}[http://twitter.com/geemus] on Twitter
112
+ * Discuss in irc on the {#ruby-fog}[irc://irc.freenode.net/ruby-fog] channel on Freenode or via email on the {mailing list}[http://groups.google.com/group/ruby-fog]
113
+ * See upcoming work in the {tracker}[http://www.pivotaltracker.com/projects/54635]
114
+ * Report bugs in {issues}[http://github.com/geemus/fog/issues]
115
+ * Learn about {contributing}[http://wiki.github.com/geemus/fog/contributors-guide]
116
+ * See what already uses fog and add your own stuff to {the list}[http://wiki.github.com/geemus/fog/in-the-wild]
118
117
 
119
118
  == Copyright
120
119
 
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.3.5'
11
- s.date = '2010-09-24'
10
+ s.version = '0.3.6'
11
+ s.date = '2010-09-27'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
@@ -549,18 +549,6 @@ Gem::Specification.new do |s|
549
549
  spec/aws/models/storage/file_spec.rb
550
550
  spec/aws/models/storage/files_spec.rb
551
551
  spec/aws/requests/compute/describe_images_spec.rb
552
- spec/aws/requests/s3/copy_object_spec.rb
553
- spec/aws/requests/s3/delete_bucket_spec.rb
554
- spec/aws/requests/s3/delete_object_spec.rb
555
- spec/aws/requests/s3/get_bucket_location_spec.rb
556
- spec/aws/requests/s3/get_bucket_spec.rb
557
- spec/aws/requests/s3/get_object_spec.rb
558
- spec/aws/requests/s3/get_request_payment_spec.rb
559
- spec/aws/requests/s3/get_service_spec.rb
560
- spec/aws/requests/s3/head_object_spec.rb
561
- spec/aws/requests/s3/put_bucket_spec.rb
562
- spec/aws/requests/s3/put_object_spec.rb
563
- spec/aws/requests/s3/put_request_payment_spec.rb
564
552
  spec/aws/requests/simpledb/batch_put_attributes_spec.rb
565
553
  spec/aws/requests/simpledb/create_domain_spec.rb
566
554
  spec/aws/requests/simpledb/delete_attributes_spec.rb
@@ -570,6 +558,18 @@ Gem::Specification.new do |s|
570
558
  spec/aws/requests/simpledb/list_domains_spec.rb
571
559
  spec/aws/requests/simpledb/put_attributes_spec.rb
572
560
  spec/aws/requests/simpledb/select_spec.rb
561
+ spec/aws/requests/storage/copy_object_spec.rb
562
+ spec/aws/requests/storage/delete_bucket_spec.rb
563
+ spec/aws/requests/storage/delete_object_spec.rb
564
+ spec/aws/requests/storage/get_bucket_location_spec.rb
565
+ spec/aws/requests/storage/get_bucket_spec.rb
566
+ spec/aws/requests/storage/get_object_spec.rb
567
+ spec/aws/requests/storage/get_request_payment_spec.rb
568
+ spec/aws/requests/storage/get_service_spec.rb
569
+ spec/aws/requests/storage/head_object_spec.rb
570
+ spec/aws/requests/storage/put_bucket_spec.rb
571
+ spec/aws/requests/storage/put_object_spec.rb
572
+ spec/aws/requests/storage/put_request_payment_spec.rb
573
573
  spec/bluebox/models/compute/flavors_spec.rb
574
574
  spec/bluebox/models/compute/server_spec.rb
575
575
  spec/bluebox/models/compute/servers_spec.rb
data/lib/fog.rb CHANGED
@@ -32,7 +32,7 @@ require 'fog/ssh'
32
32
  module Fog
33
33
 
34
34
  unless const_defined?(:VERSION)
35
- VERSION = '0.3.5'
35
+ VERSION = '0.3.6'
36
36
  end
37
37
 
38
38
  module Mock
@@ -120,7 +120,7 @@ module Fog
120
120
  # Initialize connection to S3
121
121
  #
122
122
  # ==== Notes
123
- # options parameter must include values for :aws_access_key_id and
123
+ # options parameter must include values for :aws_access_key_id and
124
124
  # :aws_secret_access_key in order to create a connection
125
125
  #
126
126
  # ==== Examples
@@ -165,9 +165,17 @@ module Fog
165
165
  def request(params, &block)
166
166
  params[:headers]['Date'] = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000")
167
167
  params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
168
+ params[:expects] = [307, *params[:expects]].flatten
169
+ # FIXME: ToHashParser should make this not needed
170
+ original_params = params.dup
168
171
 
169
172
  response = @connection.request(params, &block)
170
173
 
174
+ if response.status == 307
175
+ uri = URI.parse(response.headers['Location'])
176
+ response = Fog::Connection.new("#{@scheme}://#{uri.host}:#{@port}", false).request(original_params, &block)
177
+ end
178
+
171
179
  response
172
180
  end
173
181
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 5
9
- version: 0.3.5
8
+ - 6
9
+ version: 0.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-24 00:00:00 -07:00
17
+ date: 2010-09-27 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -656,18 +656,6 @@ files:
656
656
  - spec/aws/models/storage/file_spec.rb
657
657
  - spec/aws/models/storage/files_spec.rb
658
658
  - spec/aws/requests/compute/describe_images_spec.rb
659
- - spec/aws/requests/s3/copy_object_spec.rb
660
- - spec/aws/requests/s3/delete_bucket_spec.rb
661
- - spec/aws/requests/s3/delete_object_spec.rb
662
- - spec/aws/requests/s3/get_bucket_location_spec.rb
663
- - spec/aws/requests/s3/get_bucket_spec.rb
664
- - spec/aws/requests/s3/get_object_spec.rb
665
- - spec/aws/requests/s3/get_request_payment_spec.rb
666
- - spec/aws/requests/s3/get_service_spec.rb
667
- - spec/aws/requests/s3/head_object_spec.rb
668
- - spec/aws/requests/s3/put_bucket_spec.rb
669
- - spec/aws/requests/s3/put_object_spec.rb
670
- - spec/aws/requests/s3/put_request_payment_spec.rb
671
659
  - spec/aws/requests/simpledb/batch_put_attributes_spec.rb
672
660
  - spec/aws/requests/simpledb/create_domain_spec.rb
673
661
  - spec/aws/requests/simpledb/delete_attributes_spec.rb
@@ -677,6 +665,18 @@ files:
677
665
  - spec/aws/requests/simpledb/list_domains_spec.rb
678
666
  - spec/aws/requests/simpledb/put_attributes_spec.rb
679
667
  - spec/aws/requests/simpledb/select_spec.rb
668
+ - spec/aws/requests/storage/copy_object_spec.rb
669
+ - spec/aws/requests/storage/delete_bucket_spec.rb
670
+ - spec/aws/requests/storage/delete_object_spec.rb
671
+ - spec/aws/requests/storage/get_bucket_location_spec.rb
672
+ - spec/aws/requests/storage/get_bucket_spec.rb
673
+ - spec/aws/requests/storage/get_object_spec.rb
674
+ - spec/aws/requests/storage/get_request_payment_spec.rb
675
+ - spec/aws/requests/storage/get_service_spec.rb
676
+ - spec/aws/requests/storage/head_object_spec.rb
677
+ - spec/aws/requests/storage/put_bucket_spec.rb
678
+ - spec/aws/requests/storage/put_object_spec.rb
679
+ - spec/aws/requests/storage/put_request_payment_spec.rb
680
680
  - spec/bluebox/models/compute/flavors_spec.rb
681
681
  - spec/bluebox/models/compute/server_spec.rb
682
682
  - spec/bluebox/models/compute/servers_spec.rb