Skip to content

Commit 1ac5e8b

Browse files
committed
chore(release): release v0.2.1. See CHANGELOG.md
1 parent 7ae08bb commit 1ac5e8b

File tree

5 files changed

+34
-26
lines changed

5 files changed

+34
-26
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
<a name="0.2.1"></a>
2+
## [0.2.1](https://github.com/seriema/angular-apimock/compare/v0.2.0...v0.2.1) (2015-09-13)
3+
4+
5+
### Bug Fixes
6+
7+
* **apimock:** correctly detect URL commands ([29874c9](https://github.com/seriema/angular-apimock/commit/29874c9)), closes [#37](https://github.com/seriema/angular-apimock/issues/37)
8+
* **apimock:** correctly detect URL commands ([ccf22f2](https://github.com/seriema/angular-apimock/commit/ccf22f2)), closes [#37](https://github.com/seriema/angular-apimock/issues/37)
9+
* **travis:** don't run SauceLabs on PR's ([b20c786](https://github.com/seriema/angular-apimock/commit/b20c786)), closes [#31](https://github.com/seriema/angular-apimock/issues/31)
10+
* **travis:** don't run SauceLabs tests on PR's ([0e07eb3](https://github.com/seriema/angular-apimock/commit/0e07eb3)), closes [#32](https://github.com/seriema/angular-apimock/issues/32) [#31](https://github.com/seriema/angular-apimock/issues/31)
11+
12+
### Features
13+
14+
* **npm:** Angular ApiMock now available on the npm registry! ([f7d5663](https://github.com/seriema/angular-apimock/commit/f7d5663))
15+
16+
17+
118
<a name="0.2.0"></a>
219
# 0.2.0 (2015-08-09)
320

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-apimock",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"main": "dist/angular-apimock.min.js",
55
"appPath": "app",
66
"ignore": [

dist/angular-apimock.js

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Angular API Mock v0.2.0
1+
/*! Angular API Mock v0.2.1
22
* Licensed with MIT
33
* Made with ♥ from Seriema + Redhorn */
44
/* Create the main module, `apiMock`. It's the one that needs to be included in
@@ -174,27 +174,18 @@ angular.module('apiMock', [])
174174
}
175175

176176
function getCommand(mockValue) {
177-
switch (typeof mockValue) {
178-
case 'number':
179-
if (mockValue !== 0 && !isNaN(mockValue)) {
180-
return { type: 'respond', value: mockValue };
181-
}
182-
break;
183-
184-
case 'string':
185-
switch(mockValue.toLowerCase()) {
186-
case 'auto':
187-
return { type: 'recover' };
188-
case 'true':
189-
return { type: 'reroute' };
190-
}
191-
break;
192-
193-
case 'boolean':
194-
if (mockValue === true) {
195-
return { type: 'reroute' };
196-
}
197-
break;
177+
// Depending how we got mockValue it might've been parsed into a type or not.
178+
switch ((mockValue || '').toString().toLowerCase()) {
179+
case '200':
180+
case '404':
181+
case '500':
182+
return { type: 'respond', value: parseInt(mockValue, 10) };
183+
184+
case 'auto':
185+
return { type: 'recover' };
186+
187+
case 'true':
188+
return { type: 'reroute' };
198189
}
199190

200191
return { type: 'ignore' };

dist/angular-apimock.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-apimock",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"author": "John-Philip Johansson <[email protected]> (http://johansson.jp/)",
55
"homepage": "http://johansson.jp/angular-apimock/",
66
"bugs": "https://github.com/seriema/angular-apimock/issues",

0 commit comments

Comments
 (0)