Skip to content

Commit c04a3d5

Browse files
committed
Merge branch 'hotfix/19.0.1'
2 parents c962b82 + 6ae5e26 commit c04a3d5

File tree

4 files changed

+6
-34
lines changed

4 files changed

+6
-34
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [19.0.1] - 2019-01-04
8+
### Fixed
9+
- Routes:
10+
- `resolve-guid` - remove guid regex test because we have old guids that violate it
11+
712
## [19.0.0] - 2019-01-03
813
### Added
914
- Addons:

app/resolve-guid/route.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import DS from 'ember-data';
88
import Features from 'ember-feature-flags/services/features';
99
import config from 'ember-get-config';
1010

11-
import { GUID_REGEX } from 'ember-osf-web/const/guid-alphabet';
1211
import param from 'ember-osf-web/utils/param';
1312
import transitionTargetURL from 'ember-osf-web/utils/transition-target-url';
1413

@@ -46,10 +45,6 @@ export default class ResolveGuid extends Route {
4645
return Boolean(this._router._engineInfoByRoute && route in this._router._engineInfoByRoute);
4746
}
4847

49-
looksLikeGUID(guid: string): boolean {
50-
return GUID_REGEX.test(guid);
51-
}
52-
5348
generateURL(route: string, ...args: any[]): string {
5449
// NOTE: The router's urlFor is skipped over here as it passes the result of generate into the location
5550
// implementation, which would rip out the "--PATH" which is used for routing here.
@@ -62,10 +57,6 @@ export default class ResolveGuid extends Route {
6257
...Object.values(transition.params),
6358
);
6459

65-
if (!this.isEngineRoute(params.guid) && !this.looksLikeGUID(params.guid)) {
66-
throw new Error(`Invalid GUID and no matching engine: ${params.guid}`);
67-
}
68-
6960
let expanded: string;
7061

7162
// If guid is an engine route, transition into it

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-osf-web",
3-
"version": "19.0.0",
3+
"version": "19.0.1",
44
"description": "Ember front-end for the Open Science Framework",
55
"license": "Apache-2.0",
66
"author": "Center for Open Science <support@cos.io>",

tests/acceptance/resolve-guid-test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -170,30 +170,6 @@ module('Acceptance | resolve-guid', hooks => {
170170
});
171171
});
172172

173-
test('Invalid GUIDs', async assert => {
174-
server.create('root', { currentUser: null });
175-
176-
const testCases = [
177-
{ url: '/decof', guid: 'decof', test: 'Invalid GUID' },
178-
{ url: '/dec1f/foo', guid: 'dec1f', test: 'Invalid GUID with sub route' },
179-
];
180-
181-
for (const testCase of testCases) {
182-
try {
183-
await visit(testCase.url);
184-
} catch (e) {
185-
assert.equal(e.message, `Invalid GUID and no matching engine: ${testCase.guid}`);
186-
}
187-
188-
await settled();
189-
190-
assert.ok(true, testCase.test);
191-
assert.equal(currentURL(), testCase.url, 'The URL has not changed');
192-
assert.equal(currentLocationURL(), testCase.url, 'The URL has not changed');
193-
assert.equal(currentRouteName(), 'not-found', 'The correct route was reached');
194-
}
195-
});
196-
197173
test('Not found', async assert => {
198174
server.create('root', { currentUser: null });
199175

0 commit comments

Comments
 (0)