Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_section_information() and add_json_ld_metadata() functions #1594

Merged
merged 2 commits into from Feb 11, 2019

Conversation

greatislander
Copy link
Contributor

@greatislander greatislander commented Feb 11, 2019

\Pressbooks\Book::getBookInformation() returns an array of metadata for a book. The comparable method for retrieving an array of metadata for a section currently exists as a protected method in the section metadata API class. This PR:

  • creates a function in the \Pressbooks\Metadata namespace to retrieve an array of section metadata
  • creates a function in the same namespace to generate a JSON-LD metadata blob for Add JSON-LD book metadata to webbook pressbooks-book#434
  • fixes an issue where a section with author metadata set to an empty string would not inherit the book author metadata

@codecov
Copy link

codecov bot commented Feb 11, 2019

Codecov Report

Merging #1594 into dev will decrease coverage by <.01%.
The diff coverage is 85.71%.

@@             Coverage Diff             @@
##               dev    #1594      +/-   ##
===========================================
- Coverage     64.6%   64.59%   -0.01%     
+ Complexity    4550     4545       -5     
===========================================
  Files          121      121              
  Lines        19877    19883       +6     
===========================================
+ Hits         12842    12844       +2     
- Misses        7035     7039       +4

@greatislander greatislander changed the title Add \Pressbooks\Metadata\get_section_information() function Add get_section_information() function and add_json_ld_metadata() functions Feb 11, 2019
@greatislander greatislander changed the title Add get_section_information() function and add_json_ld_metadata() functions Add get_section_information() and add_json_ld_metadata() functions Feb 11, 2019
Copy link
Contributor

@dac514 dac514 left a comment

Choose a reason for hiding this comment

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

If the tests pass, then OK.

@greatislander greatislander merged commit 2fd6c20 into dev Feb 11, 2019
@greatislander greatislander deleted the get-section-information branch February 11, 2019 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants