Skip to content

generator: refactor implementation, part 2 - extract Repository#678

Merged
Insti merged 6 commits intoexercism:masterfrom
Insti:Repository_extraction
Jun 30, 2017
Merged

generator: refactor implementation, part 2 - extract Repository#678
Insti merged 6 commits intoexercism:masterfrom
Insti:Repository_extraction

Conversation

@Insti
Copy link
Copy Markdown
Contributor

@Insti Insti commented Jun 13, 2017

Extract a Repository class that takes paths and slug as constructor arguments.

Repository in this case is an implementation of the Repository pattern which acts as an interface to all the data that an Implementation needs rather than anything related to Git repositories.

Continues the work done in #677,
Supersedes #643

@Insti
Copy link
Copy Markdown
Contributor Author

Insti commented Jun 13, 2017

Build failed due to Rubocop check for SpaceAfterComma.

Why is Rubocop complaining, I thought it was disabled. :/

Hmm, I enabled this one: #542 - ok seems sensible.

Fixed and force-pushed the updated version.

Insti added 6 commits June 13, 2017 22:04
Since we're using `slug` to identify a problem we can remove some now
unnecessary references to `Exercise`
Implementation should get everything it needs to know about from
a Repostiory.

There are some knock-on effects on source_filepath
@Insti Insti force-pushed the Repository_extraction branch from b3b0f44 to f43b807 Compare June 13, 2017 21:11
def initialize
@paths = FixturePaths
@exercise = Exercise.new(slug: 'notemplate')
@slug = 'no-template'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a hyphen so we don't need to worry about whether it's an emplate or not.

@Insti Insti merged commit 533673a into exercism:master Jun 30, 2017
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.

2 participants