Skip to content

Commit

Permalink
reverting string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Hiller committed May 18, 2014
1 parent b8df7b1 commit 2d7e489
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ Sets the current Filter. I'm not sure what this does exactly.

fogbugz.search(query, \[cols\], \[max\])
----------------------------------------
Performs a search against FogBugz's cases. If given custom column `sFooBar`,
will massage key into `fooBar`. Promise resolves to a `Case` object.
Performs a search against FogBugz's cases. Promise resolves to a `Case` object or an array of `Case` objects.

**Parameters**

Expand Down
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@ var fogbugz = {
var token = cache.get('token'),
cases, fields,
dfrd = Q.defer(),
formatKey = function formatKey(key) {
return key.substring(1).charAt(0).toLowerCase() + key.substring(2);
},
extractCases = function extractCases(xml) {
var r = _parse(xml);
if (!r || !r.response || !r.response.cases.length ||
Expand Down Expand Up @@ -421,7 +418,6 @@ var fogbugz = {
'sEmailAssignedTo'))
.each(function (key) {
var value = kase[key];
key = formatKey(key);
bug[key] = _.isArray(value) && value.length === 1 ?
bug[key] = value[0].trim() : // dereference
value;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fogbugz",
"version": "0.1.12",
"version": "0.2.0",
"description": "FogBugz integration module",
"license": "MIT",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions spec/fogbugz.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('fogbugz module', function () {
}).module.exports;

fogbugz.setToken('capybara');
fogbugz.search('16227', ['sFoo'])
fogbugz.search('16227', ['sFooBar'])
.then(function (res) {
expect(res).toEqual(
new fogbugz.Case({
Expand All @@ -191,7 +191,7 @@ describe('fogbugz module', function () {
id: "16006",
url: "https://zzz.fogbugz.com/default.asp?16006",
fixFor: "whenever",
fooBar: 'FOO FOO FOO',
sFooBar: 'FOO FOO FOO',
_raw: { '$': { ixBug: '16006',
operations: 'edit,assign,resolve,email,remind' },
sTitle: ['AQ toolkit API: bar chart shown and selected for text'],
Expand Down

0 comments on commit 2d7e489

Please sign in to comment.