Skip to content

Commit

Permalink
Merge branch 'bpneal-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiezane committed Oct 23, 2014
2 parents 142f7a0 + 350063e commit a5042e8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ email.setSubstitutions({keep: ['secret'], other: ['one', 'two']}); // sub = {kee

```javascript
var email = new sendgrid.Email();
email.addSection({'-charge-': 'This ship is useless.'}); // section = {'-charge-': 'This ship is useless.'}
email.addSection('-charge-', 'This ship is useless.'); // section = {'-charge-': 'This ship is useless.'}
```

#### setSections
Expand Down
4 changes: 2 additions & 2 deletions lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Email.prototype.setCategories = function(val) {
this.smtpapi.setCategories(val);
};

Email.prototype.addSection = function(object_literal) {
this.smtpapi.addSection(object_literal);
Email.prototype.addSection = function(key, val) {
this.smtpapi.addSection(key, val);
};

Email.prototype.setSections = function(object_literal) {
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"name": "sendgrid",
"description": "Official SendGrid NodeJS library.",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "http://sendgrid.com",
"repository": {
"type": "git",
Expand All @@ -19,17 +19,17 @@
"node": ">= 0.4.7"
},
"dependencies": {
"mime": "1.2.9",
"request": "2.40.0",
"lodash": "2.0.0",
"smtpapi": "1.0.3"
"mime": "^1.2.9",
"request": "^2.40.0",
"lodash": "^2.0.0",
"smtpapi": "^1.0.3"
},
"devDependencies": {
"dotenv": "0.0.2",
"mocha": ">= 0.9.0",
"chai": ">= 0.1.6",
"nock": "~0.16.0",
"sinon": "~1.6.0"
"nock": "^0.16.0",
"sinon": "^1.6.0"
},
"scripts": {
"test": "./node_modules/.bin/mocha --grep '#skip' --invert",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/sendgrid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ describe('SendGrid #skip', function () {
//mail.addTo(setup.multi_to);
email.addSubstitution('-name-', ['Kyle', 'David']);
email.addSubstitution('-meme-', ['-kyleSection-', '-davidSection-']);
email.addSection({'-kyleSection-': 'I heard you liked batman so I killed your parents'});
email.addSection({'-davidSection-': 'Metal gear?!!?!!!!eleven'});
email.addSection('-kyleSection-', 'I heard you liked batman so I killed your parents');
email.addSection('-davidSection-', 'Metal gear?!!?!!!!eleven');
email.html = "Yo -name-!<br /> Here's a meme for you:<br /> -meme-";
sendgrid.send(email, function(err, json) {
expect(err).to.be.null;
Expand Down
2 changes: 1 addition & 1 deletion test/lib/sendgrid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('SendGrid', function () {
});

it('version should be set', function() {
expect(sendgrid.version).to.equal("1.2.1");
expect(sendgrid.version).to.equal("1.2.2");
});

it('should attach a options object to self', function() {
Expand Down

0 comments on commit a5042e8

Please sign in to comment.