From 5270124e51e24dd287fc1c10eb406c68d8e83f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Kr=C3=B3l?= Date: Tue, 29 May 2012 10:26:26 +0200 Subject: [PATCH 1/5] fix: s3 user-defined metadata --- src/erlcloud_s3.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/erlcloud_s3.erl b/src/erlcloud_s3.erl index 28947653..a089232c 100644 --- a/src/erlcloud_s3.erl +++ b/src/erlcloud_s3.erl @@ -545,7 +545,7 @@ put_object(BucketName, Key, Value, Options, HTTPHeaders, Config) when is_list(BucketName), is_list(Key), is_list(Value) orelse is_binary(Value), is_list(Options) -> RequestHeaders = [{"x-amz-acl", encode_acl(proplists:get_value(acl, Options))}|HTTPHeaders] - ++ [{["x-amz-meta-"|string:to_lower(MKey)], MValue} || + ++ [{"x-amz-meta-" ++ string:to_lower(MKey), MValue} || {MKey, MValue} <- proplists:get_value(meta, Options, [])], ContentType = proplists:get_value("content-type", HTTPHeaders, "application/octet_stream"), POSTData = {iolist_to_binary(Value), ContentType}, From f902111dd9ac561c85a751c12cfaa2b711188f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Kr=C3=B3l?= Date: Tue, 29 May 2012 11:08:14 +0200 Subject: [PATCH 2/5] s3 extract user-defined metadata --- src/erlcloud_s3.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/erlcloud_s3.erl b/src/erlcloud_s3.erl index a089232c..59285548 100644 --- a/src/erlcloud_s3.erl +++ b/src/erlcloud_s3.erl @@ -437,7 +437,7 @@ get_object_metadata(BucketName, Key, Options, Config) -> {version_id, proplists:get_value("x-amz-version-id", Headers, "false")}|extract_metadata(Headers)]. extract_metadata(Headers) -> - [{Key, Value} || {["x-amz-meta-"|Key], Value} <- Headers]. + [{Key, Value} || {Key = "x-amz-meta-" ++ _, Value} <- Headers]. -spec get_object_torrent(string(), string()) -> proplist(). From 5ed804ae2c85114a6cf6614fa55e3d133df98556 Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Mon, 4 Jun 2012 16:44:43 +0200 Subject: [PATCH 3/5] Fix the name of the environment variables so they point to the right names. --- README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index a65aaa08..b47e3dda 100644 --- a/README +++ b/README @@ -38,9 +38,10 @@ Hostname defaults to "ec2.amazonaws.com". Then you can simply call, e.g. erlcloud_ec2:describe_images(). You don't need to call erlcloud_ec2:configure() if you provide your credentials -in the AMAZON_ACCESS_KEY_ID and AMAZON_SECRET_ACCESS_KEY environmental -variables. +in the environmental variables +> AWS_ACCESS_KEY_ID +> AWS_SECRET_ACCESS_KEY Configuration object usage: From 9970fd72df4ab6e8ef7bfc7d3de31d9e1ea6d830 Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Mon, 4 Jun 2012 17:09:44 +0200 Subject: [PATCH 4/5] Fix the startup order of public_key --- src/erlcloud.app.src | 2 +- src/erlcloud.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/erlcloud.app.src b/src/erlcloud.app.src index 91678f60..3838924f 100644 --- a/src/erlcloud.app.src +++ b/src/erlcloud.app.src @@ -8,8 +8,8 @@ {applications, [stdlib, kernel, sasl, - public_key, crypto, + public_key, ssl, xmerl, inets]}, diff --git a/src/erlcloud.erl b/src/erlcloud.erl index 884dea45..7fd98d41 100644 --- a/src/erlcloud.erl +++ b/src/erlcloud.erl @@ -6,5 +6,5 @@ start() -> application:load(?APP), {ok, Apps} = application:get_key(?APP, applications), - lists:foreach(fun application:start/1, Apps), + [application:start(App) || App <- Apps], application:start(?APP). From 7a34c25d56139009435afe20074e915ca0df3227 Mon Sep 17 00:00:00 2001 From: Gleb Peregud Date: Wed, 3 Oct 2012 11:03:36 +0200 Subject: [PATCH 5/5] add expm package, mark version 0.8.0 add short roadmap --- README | 9 +++++++++ package.exs | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 package.exs diff --git a/README b/README index b47e3dda..17e38a69 100644 --- a/README +++ b/README @@ -56,3 +56,12 @@ For usage information, consult the source code and refer to the API reference at - http://docs.amazonwebservices.com/AWSEC2/2009-11-30/APIReference/ - http://docs.amazonwebservices.com/AmazonS3/2006-03-01/API/ - http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/ + +Roadmap +------- + +v0.8.0 +* Existing code + +v1.0.0 +* Refactored code for better return values (issue #7) diff --git a/package.exs b/package.exs new file mode 100644 index 00000000..05f6c596 --- /dev/null +++ b/package.exs @@ -0,0 +1,5 @@ +Expm.Package.new(name: "erlcloud", description: "Cloud Computing library for Erlang (Amazon EC2, S3, SQS, SimpleDB, Mechanical Turk, ELB) ", + version: "0.8.0", keywords: ["cloud", "api", "amazon", "ec2", "s3", "sqs"], + maintainers: [[name: "Gleb Peregud", + email: "gleber.p@gmail.com"]], + repositories: [[github: "gleber/erlcloud"]]) \ No newline at end of file