Skip to content

Commit 373ae24

Browse files
committed
Auto merge of #2168 - Turbo87:versions, r=locks
mirage/crate: Calculate `max_verison` and `newest_version` properties This PR simplifies our test fixtures a little bit more by dynamically calculating the `max_verison` and `newest_version` properties of the `crate` resources in mirage. This also reduces a few inconsistencies in our test data. r? @locks
2 parents def94b3 + da3a48e commit 373ae24

File tree

9 files changed

+346
-65
lines changed

9 files changed

+346
-65
lines changed

mirage/factories/crate.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export default Factory.extend({
1616
documentation: null,
1717
homepage: null,
1818
repository: null,
19-
max_version: '1.0.0',
20-
newest_version: '1.0.0',
2119

2220
created_at: '2010-06-16T21:30:45Z',
2321
updated_at: '2017-02-24T12:34:56Z',

mirage/fixtures/crates.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export default [
1616
homepage: 'https://icorderi.github.io/icorderi/kinetic-rust',
1717
id: 'kinetic-rust',
1818
keywordIds: [],
19-
max_version: '0.0.16',
20-
newest_version: '0.0.16',
2119
name: 'kinetic-rust',
2220
repository: 'https://github.com/icorderi/kinetic-rust/',
2321
updated_at: '2015-04-21T00:15:49Z',
@@ -41,8 +39,6 @@ export default [
4139
homepage: 'https://github.com/thehydroimpulse/nanomsg.rs',
4240
id: 'nanomsg',
4341
keywordIds: ['network'],
44-
max_version: '0.7.0-alpha',
45-
newest_version: '0.6.1',
4642
name: 'nanomsg',
4743
repository: 'https://github.com/thehydroimpulse/nanomsg.rs',
4844
updated_at: '2016-12-28T08:40:00Z',
@@ -71,8 +67,6 @@ export default [
7167
homepage: 'https://github.com/huonw/external_mixin',
7268
id: 'rust_mixin',
7369
keywordIds: ['rust', 'plugin', 'code-generation'],
74-
max_version: '0.0.1',
75-
newest_version: '0.0.1',
7670
name: 'rust_mixin',
7771
repository: 'https://github.com/huonw/external_mixin',
7872
updated_at: '2015-02-27T11:52:13Z',
@@ -144,8 +138,6 @@ export default [
144138
homepage: 'https://github.com/huonw/external_mixin',
145139
id: 'external_mixin',
146140
keywordIds: ['python', 'ruby', 'shell', 'plugin', 'code-generation'],
147-
max_version: '0.0.1',
148-
newest_version: '0.0.1',
149141
name: 'external_mixin',
150142
repository: 'https://github.com/huonw/external_mixin',
151143
updated_at: '2015-02-27T11:51:58Z',
@@ -160,8 +152,6 @@ export default [
160152
homepage: 'https://github.com/huonw/external_mixin',
161153
id: 'external_mixin_umbrella',
162154
keywordIds: ['plugin', 'code-generation'],
163-
max_version: '0.0.2',
164-
newest_version: '0.0.2',
165155
name: 'external_mixin_umbrella',
166156
repository: 'https://github.com/huonw/external_mixin',
167157
updated_at: '2015-02-27T11:52:30Z',
@@ -177,8 +167,6 @@ export default [
177167
homepage: 'https://github.com/whatisinternet/inflector',
178168
id: 'Inflector',
179169
keywordIds: ['string', 'case', 'camel', 'snake', 'inflection'],
180-
max_version: '0.1.6',
181-
newest_version: '0.1.6',
182170
name: 'Inflector',
183171
repository: 'https://github.com/whatisinternet/inflector',
184172
updated_at: '2015-10-27T01:51:42Z',
@@ -193,8 +181,6 @@ export default [
193181
homepage: null,
194182
id: 'rs-es',
195183
keywordIds: ['elasticsearch', 'elastic'],
196-
max_version: '0.1.17',
197-
newest_version: '0.1.17',
198184
name: 'rs-es',
199185
repository: 'https://github.com/benashford/rs-es',
200186
updated_at: '2015-09-09T15:34:50Z',
@@ -209,8 +195,6 @@ export default [
209195
homepage: 'https://github.com/DaGenix/rust-crypto/',
210196
id: 'rust-crypto',
211197
keywordIds: [],
212-
max_version: '0.2.34',
213-
newest_version: '0.2.34',
214198
name: 'rust-crypto',
215199
repository: 'https://github.com/DaGenix/rust-crypto/',
216200
updated_at: '2015-10-29T01:16:17Z',
@@ -225,8 +209,6 @@ export default [
225209
homepage: null,
226210
id: 'rust-htslib',
227211
keywordIds: [],
228-
max_version: '0.5.2',
229-
newest_version: '0.5.2',
230212
name: 'rust-htslib',
231213
repository: 'https://github.com/rust-bio/rust-htslib.git',
232214
updated_at: '2015-11-11T00:10:43Z',
@@ -241,8 +223,6 @@ export default [
241223
homepage: 'https://github.com/rustless/rustless',
242224
id: 'rustless',
243225
keywordIds: [],
244-
max_version: '0.8.0',
245-
newest_version: '0.8.0',
246226
name: 'rustless',
247227
repository: 'https://crates.io/crates/rustless',
248228
updated_at: '2015-10-31T11:49:29Z',
@@ -257,8 +237,6 @@ export default [
257237
homepage: null,
258238
id: 'serde',
259239
keywordIds: [],
260-
max_version: '0.6.1',
261-
newest_version: '0.6.1',
262240
name: 'serde',
263241
repository: 'https://github.com/serde-rs/serde',
264242
updated_at: '2015-10-18T03:10:21Z',
@@ -273,8 +251,6 @@ export default [
273251
homepage: 'https://github.com/livioribeiro/rusted-cypher',
274252
id: 'rusted_cypher',
275253
keywordIds: [],
276-
max_version: '0.7.1',
277-
newest_version: '0.7.1',
278254
name: 'rusted_cypher',
279255
repository: 'https://github.com/livioribeiro/rusted-cypher',
280256
updated_at: '2015-11-07T17:26:55Z',
@@ -290,8 +266,6 @@ export default [
290266
homepage: null,
291267
id: 'zlib',
292268
keywordIds: [],
293-
max_version: '0.0.1',
294-
newest_version: '0.0.1',
295269
name: 'zlib',
296270
repository: null,
297271
updated_at: '2015-01-02T20:54:04Z',
@@ -307,8 +281,6 @@ export default [
307281
homepage: null,
308282
id: 'rustful',
309283
keywordIds: [],
310-
max_version: '0.5.0',
311-
newest_version: '0.5.0',
312284
name: 'rustful',
313285
repository: 'https://github.com/Ogeon/rustful',
314286
updated_at: '2015-09-19T21:10:27Z',
@@ -323,8 +295,6 @@ export default [
323295
homepage: null,
324296
id: 'postgres',
325297
keywordIds: [],
326-
max_version: '0.10.1',
327-
newest_version: '0.10.1',
328298
name: 'postgres',
329299
repository: 'https://github.com/sfackler/rust-postgres',
330300
updated_at: '2015-11-08T00:48:59Z',
@@ -339,8 +309,6 @@ export default [
339309
homepage: 'https://github.com/BurntSushi/quickcheck',
340310
id: 'quickcheck',
341311
keywordIds: [],
342-
max_version: '0.2.24',
343-
newest_version: '0.2.24',
344312
name: 'quickcheck',
345313
repository: 'https://github.com/BurntSushi/quickcheck',
346314
updated_at: '2015-09-20T21:53:38Z',
@@ -355,8 +323,6 @@ export default [
355323
homepage: 'https://github.com/BurntSushi/quickcheck',
356324
id: 'quickcheck_macros',
357325
keywordIds: [],
358-
max_version: '0.2.24',
359-
newest_version: '0.2.24',
360326
name: 'quickcheck_macros',
361327
repository: 'https://github.com/BurntSushi/quickcheck',
362328
updated_at: '2015-09-20T21:53:57Z',
@@ -372,8 +338,6 @@ export default [
372338
homepage: 'https://github.com/nicolas-cherel/rustlex',
373339
id: 'unicorn-rpc',
374340
keywordIds: [],
375-
max_version: '0.3.1',
376-
newest_version: '0.3.1',
377341
name: 'unicorn-rpc',
378342
repository: 'https://github.com/nicolas-cherel/rustlex',
379343
updated_at: '2015-08-25T19:15:35Z',
@@ -388,8 +352,6 @@ export default [
388352
homepage: null,
389353
id: 'nom',
390354
keywordIds: [],
391-
max_version: '1.0.1',
392-
newest_version: '1.0.1',
393355
name: 'nom',
394356
repository: 'https://github.com/Geal/nom',
395357
updated_at: '2015-11-22T22:00:41Z',
@@ -398,32 +360,24 @@ export default [
398360
{
399361
id: 'libc',
400362
name: 'libc',
401-
max_version: '1.0.1',
402-
newest_version: '1.0.1',
403363
downloads: 5169,
404364
recent_downloads: 69,
405365
},
406366
{
407367
id: 'nanomsg-sys',
408368
name: 'nanomsg-sys',
409-
max_version: '1.0.1',
410-
newest_version: '1.0.1',
411369
downloads: 5169,
412370
recent_downloads: 69,
413371
},
414372
{
415373
id: 'mock-build-deps',
416374
name: 'mock-build-deps',
417-
max_version: '1.0.1',
418-
newest_version: '1.0.1',
419375
downloads: 5169,
420376
recent_downloads: 69,
421377
},
422378
{
423379
id: 'mock-dev-deps',
424380
name: 'mock-dev-deps',
425-
max_version: '1.0.1',
426-
newest_version: '1.0.1',
427381
downloads: 5169,
428382
recent_downloads: 69,
429383
},

0 commit comments

Comments
 (0)