s33r 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/bin/s3cli.rb +25 -16
  2. data/html/classes/MIME.html +120 -0
  3. data/html/classes/MIME/InvalidContentType.html +119 -0
  4. data/html/classes/MIME/Type.html +1173 -0
  5. data/html/classes/MIME/Types.html +566 -0
  6. data/html/classes/Net.html +108 -0
  7. data/html/classes/Net/HTTPGenericRequest.html +233 -0
  8. data/html/classes/Net/HTTPResponse.html +242 -0
  9. data/html/classes/S33r.html +743 -0
  10. data/html/classes/S33r/BucketListing.html +372 -0
  11. data/html/classes/S33r/Client.html +981 -0
  12. data/html/classes/S33r/NamedBucket.html +620 -0
  13. data/html/classes/S33r/S33rException.html +118 -0
  14. data/html/classes/S33r/S33rException/BucketListingMaxKeysError.html +111 -0
  15. data/html/classes/S33r/S33rException/InvalidBucketListing.html +111 -0
  16. data/html/classes/S33r/S33rException/MalformedBucketName.html +111 -0
  17. data/html/classes/S33r/S33rException/MethodNotAvailable.html +111 -0
  18. data/html/classes/S33r/S33rException/MissingRequiredHeaders.html +111 -0
  19. data/html/classes/S33r/S33rException/MissingResource.html +111 -0
  20. data/html/classes/S33r/S33rException/UnsupportedCannedACL.html +111 -0
  21. data/html/classes/S33r/S33rException/UnsupportedHTTPMethod.html +111 -0
  22. data/html/classes/S33r/S3Object.html +307 -0
  23. data/html/classes/S33r/S3User.html +171 -0
  24. data/html/classes/S33r/Sync.html +151 -0
  25. data/html/classes/XML.html +200 -0
  26. data/html/classes/XML/Document.html +125 -0
  27. data/html/classes/XML/Node.html +124 -0
  28. data/html/created.rid +1 -0
  29. data/html/files/CHANGELOG.html +101 -0
  30. data/html/files/MIT-LICENSE.html +129 -0
  31. data/html/files/README_txt.html +209 -0
  32. data/html/files/lib/s33r/bucket_listing_rb.html +116 -0
  33. data/html/files/lib/s33r/client_rb.html +110 -0
  34. data/html/files/lib/s33r/core_rb.html +113 -0
  35. data/html/files/lib/s33r/libxml_extensions_rb.html +107 -0
  36. data/html/files/lib/s33r/mimetypes_rb.html +120 -0
  37. data/html/files/lib/s33r/named_bucket_rb.html +101 -0
  38. data/html/files/lib/s33r/s33r_exception_rb.html +101 -0
  39. data/html/files/lib/s33r/s33r_http_rb.html +108 -0
  40. data/html/files/lib/s33r/sync_rb.html +101 -0
  41. data/html/files/lib/s33r_rb.html +101 -0
  42. data/html/fr_class_index.html +52 -0
  43. data/html/fr_file_index.html +39 -0
  44. data/html/fr_method_index.html +126 -0
  45. data/html/index.html +24 -0
  46. data/html/rdoc-style.css +208 -0
  47. data/lib/s33r/bucket_listing.rb +69 -60
  48. data/lib/s33r/client.rb +150 -73
  49. data/lib/s33r/core.rb +56 -44
  50. data/lib/s33r/libxml_extensions.rb +10 -5
  51. data/lib/s33r/mimetypes.rb +3 -2
  52. data/lib/s33r/named_bucket.rb +89 -24
  53. data/lib/s33r/{s3_exception.rb → s33r_exception.rb} +2 -2
  54. data/lib/s33r/{net_http_overrides.rb → s33r_http.rb} +29 -21
  55. data/lib/s33r/sync.rb +4 -2
  56. data/test/cases/spec_bucket_listing.rb +10 -13
  57. data/test/cases/spec_client.rb +65 -0
  58. data/test/cases/spec_core.rb +16 -11
  59. data/test/cases/spec_namedbucket.rb +32 -0
  60. data/test/cases/spec_sync.rb +6 -5
  61. data/test/cases/spec_xml.rb +1 -1
  62. data/test/files/client_config.yml +6 -0
  63. data/test/files/namedbucket_config.yml +12 -0
  64. data/test/{s3_test_constants.rb → test_setup.rb} +7 -6
  65. metadata +63 -11
  66. data/LICENSE.txt +0 -22
  67. data/MIT-LICENSE +0 -21
  68. data/README.txt +0 -19
  69. data/bin/config.yml +0 -5
  70. data/test/cases/unit_client.rb +0 -40
  71. data/test/cases/unit_named_bucket.rb +0 -12
@@ -1,22 +0,0 @@
1
- This software is distributed under the MIT license (see MIT-LICENSE).
2
-
3
- It incorporates code from the mimetypes library (http://raa.ruby-lang.org/project/mime-types/),
4
- which is under a compatible license (same as Ruby).
5
-
6
- It is also heavily based on the sample Ruby code provided by Amazon
7
- (http://developer.amazonwebservices.com/connect/entry.jspa?externalID=135&categoryID=47). Here's
8
- the Amazon licence:
9
-
10
- ***
11
- This software code is made available "AS IS" without warranties of any
12
- kind. You may copy, display, modify and redistribute the software
13
- code either by itself or as incorporated into your code; provided that
14
- you do not remove any proprietary notices. Your use of this software
15
- code is at your own risk and you waive any claim against Amazon
16
- Digital Services, Inc. or its affiliates with respect to your use of
17
- this software code. (c) 2006 Amazon Digital Services, Inc. or its
18
- affiliates.
19
- ***
20
-
21
- I picked up a couple of ideas from http://rubyforge.org/projects/rsh3ll/ too, e.g.
22
- swopping out the HMAC library for OpenSSL
@@ -1,21 +0,0 @@
1
- Copyright (C) 2006 Elliot Smith
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
data/README.txt DELETED
@@ -1,19 +0,0 @@
1
- This is a first pass at a Ruby library for talking to Amazon's S3 service.
2
-
3
- It is less complete than my previous effort (http://townx.org/blog/elliot/s3_rails), but more solid, more elegant,
4
- and with a test suite (which uses RSpec - see http://rubyforge.org/projects/rspec - I haven't added RSpec as a gem
5
- dependency (you can ignore the tests if you like), but for reference I developed the tests using 0.5.12).
6
-
7
- To use it from inside your Ruby script:
8
-
9
- require 's33r'
10
-
11
- If you want to see an example program which uses the library, have a look at bin/s3cli.rb. This is a simple command
12
- line client which you can use to post a file to S3 and email a link to the file to someone. Useful for sending
13
- big files to people without clogging their email inbox with enormous files. It is also intended as a demonstration
14
- of how to use the library. Full instructions are included at the top of the file.
15
-
16
- By the way, I've tested this on Linux, but not on Windows or Mac.
17
-
18
- Thanks for bug reports to:
19
- Keaka (http://keakaj.com/products.htm)
@@ -1,5 +0,0 @@
1
- access_key: 'youraccesskey'
2
- secret_key: 'yoursecretkey'
3
- bucket: 'name-of-bucket'
4
- from_email: 'you@example.com'
5
- to_email: 'you@example.com'
@@ -1,40 +0,0 @@
1
- require File.dirname(__FILE__) + '/../s3_test_constants'
2
- require_gem 'FakeWeb'
3
-
4
- class TestClient < Test::Unit::TestCase
5
- def setup
6
- @client = Client.new(S3Testing::ACCESS_KEY, S3Testing::SECRET_ACCESS_KEY, :ssl => false)
7
- @client2 = Client.new(S3Testing::ACCESS_KEY, S3Testing::SECRET_ACCESS_KEY)
8
- @bucket = 'testingtesting'
9
- @url = url_join('http://', HOST, @bucket)
10
- FakeWeb.register_uri(@url, :status => 200)
11
- end
12
-
13
- def test_returns_ssl_setting_correctly
14
- assert !(@client.use_ssl?)
15
- assert @client2.use_ssl?
16
- end
17
-
18
- def test_catches_max_keys_too_high_in_bucket_listing_request
19
- assert_raise(S3Exception::BucketListingMaxKeysError) do
20
- @client.list_bucket('duff', :max_keys => (S3::BUCKET_LIST_MAX_MAX_KEYS + 1))
21
- end
22
- end
23
-
24
- def test_fetches_bucket_listing_ok
25
- resp = @client.list_bucket(@bucket)
26
- assert resp.ok?
27
- end
28
-
29
- def test_recursively_put_files_into_bucket_with_paths_as_keys
30
- flunk 'Test conversion of paths to keys'
31
- end
32
-
33
- def test_has_attached_bucket_listing_object_for_get_on_bucket
34
- flunk 'Check that responses to list_bucket have an attached BucketListing instance'
35
- end
36
-
37
- def test_keys_dont_have_leading_slashes_stripped_when_putting_resources
38
- flunk 'Keys with leading slashes should not have the slash stripped'
39
- end
40
- end
@@ -1,12 +0,0 @@
1
- require File.dirname(__FILE__) + '/../s3_test_constants'
2
- require_gem 'FakeWeb'
3
-
4
- class TestNamedBucket < Test::Unit::TestCase
5
- def test_should_wrap_bucket_listing
6
- flunk 'Keep a copy of the current bucket listing inside as a property'
7
- end
8
-
9
- def test_should_enable_easy_updates_on_bucket_listing
10
- flunk 'Enable prefix, marker etc. to be reset from NamedBucket and refresh wrapped bucket listing object'
11
- end
12
- end