Skip to content

In a directory listing, adds the media type class when we know it #456

Merged
timbl merged 14 commits into
masterfrom
contentType
Nov 30, 2016
Merged

In a directory listing, adds the media type class when we know it #456
timbl merged 14 commits into
masterfrom
contentType

Conversation

@timbl

@timbl timbl commented Nov 27, 2016

Copy link
Copy Markdown
Contributor

In a directory listing, adds the media type class when we know it for a directory member. Add sdct:modified with an RDF date, which IMHO should deprocate the mtime returned as a unixinteger. (The RDF way is when know the data type and RDF has it, you use it. Note the code is actually shorter, internally node uses s Date() object)

Addresses Issue #446

@dmitrizagidulin

Copy link
Copy Markdown
Contributor

@timbl I fixed the jsStandard formatting errors that were failing the test and pushed to this PR. Now there's some tests failing about container serialization; investigating.

@timbl

timbl commented Nov 29, 2016

Copy link
Copy Markdown
Contributor Author

@dmitrizagidulin it is exactly th container list test which I would expect to fail, as that is what has changed. I need to understand the proper way of running the tests ....

@dmitrizagidulin

Copy link
Copy Markdown
Contributor

@timbl the easiest way to run the tests is to just invoke npm test on the command line. (That also runs the Standard linter).

@dmitrizagidulin dmitrizagidulin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. (Though we should refactor the general structure of the LDP class and container listing, later on.)

Comment thread test/ldp.js
' o:limit 500000.00 .', 'sampleContainer/magicType.ttl')

ldp.listContainer(path.join(__dirname, '/resources/sampleContainer/'), 'https://server.tld', '', 'text/turtle', function (err, data) {
ldp.listContainer(path.join(__dirname, '/resources/sampleContainer/'), 'https://server.tld/resources/sampleContainer/', 'https://server.tld', '', 'text/turtle', function (err, data) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the equivalent of just passing "/resources/sampleContainer/" ?

@timbl timbl merged commit 410ced8 into master Nov 30, 2016
@timbl timbl deleted the contentType branch November 30, 2016 21:39
@bshambaugh

Copy link
Copy Markdown

I just figured out you're using Jasmine in ldp.js :) https://jasmine.github.io/2.0/introduction.html

dmitrizagidulin pushed a commit that referenced this pull request Dec 2, 2016
* Remove unused n3 dependency

* Refactor listContainer() to use absolute file urls

* In a directory listing, add the media type class when we know it of a directory member.   Add dct:modified with an RDF date.

* Fix Standard formatting errors

* Fix rename variable

* Provide base uri to list container serialize

* Fix listContainer contains triples

* WIP fix

* Pass through the baseUri to serialize

* Fix listContainer tests

* Add the new test from previous work which had been failing due to arbitrary serialization choice

* Fix test formatting

* Bump rdflib dep version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants