Skip to content

Commit

Permalink
Cleaning commander and sns.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryant Chou committed Dec 13, 2011
1 parent e852272 commit 1e0bc4b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ node_modules
.pid
*.swp
*.tmproj
simpleSnsCommander.js
7 changes: 1 addition & 6 deletions lib/sns.js
Expand Up @@ -24,12 +24,7 @@ var Request = module.exports.Request = function(args, action) {
var query = self._query;
query.SignatureMethod = 'Hmac' + self.getSignatureAlgorithm().toUpperCase();
query.SignatureVersion = 2;
query.Timestamp = self._date.toISOString().replace(/\.[0-9]{0,3}Z$/, 'Z');


console.log('sns Request: ' + JSON.stringify(query));


query.Timestamp = self._date.toISOString().replace(/\.[0-9]{0,3}Z$/, 'Z');
}

util.inherits(Request, aws.QueryRequest);
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,12 +1,12 @@
{
"name": "node-aws",
"description": "A client interface to various AWS services.",
"description": "A client interface to various AWS services",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "git://github.com/raincloud/node-aws.git"
"url": "git://github.com/sansMischevia/node-aws.git"
},
"author": "Jordan Ryan Moore <jordanryanmoore@rainclouddev.com>",
"author": "Jordan Ryan Moore <jordanryanmoore@rainclouddev.com>, with changes by Bryant Chou <chou.bryant@gmail.com>",
"main": "lib/aws.js",
"directories": {
"lib": "lib"
Expand Down
6 changes: 3 additions & 3 deletions simpleSnsCommander.js
Expand Up @@ -14,17 +14,17 @@ program
.version('0.0.1')
.parse(process.argv);

var topicArn = program.signingKey || process.env.NDOE_ERR_ARN;
var topicArn = program.signingKey || process.env.NODE_ERR_ARN;

program.prompt('subject: ', function(subject) {
program.prompt('message: ', function(message) {
client.request('sns', 'publish', {
'TopicArn': 'arn:aws:sns:us-east-1:443824109149:vungle-errors',
'TopicArn': topicArn,
'Subject': subject,
'Message': message,
'Action': 'Publish'
}, function(response) {
console.log('Response: --- ' + JSON.stringify(response, null, ' '));
console.log('Response: ' + JSON.stringify(response, null, ' '));
if (response instanceof Error) {
// uh oh
console.log(response.code, response.message);
Expand Down

0 comments on commit 1e0bc4b

Please sign in to comment.