Created
December 11, 2014 05:21
-
-
Save tkawachi/92e34a87aaae96b4abda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationActor.scala#L135 | |
DocumentationSummary の translations に言語別最新バージョンが格納されてる。 | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationActor.scala#L259-L261 | |
documentation.translations.mapValues(_.defaultVersion) が translations として渡されている。 | |
documentation は | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationActor.scala#L188 | |
var documentation: Documentation = null | |
documentation は UpdateDocumentation メッセージで更新される | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationActor.scala#L196-L197 | |
UpdateDocumentation を送っているのはここ。 | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationPollingActor.scala#L102 | |
Documentation の組み立てはここ。 | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationPollingActor.scala#L86-L100 | |
Translation(versions, t.repo, t.config.gitHubSource) | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/models/documentation/Documentation.scala#L56-L61 | |
defaultVersion は | |
/** | |
* The default version to render | |
*/ | |
lazy val defaultVersion: Option[Version] = { | |
// Find the most recent stable version, and then the latest version that matches that | |
displayVersions.find(_.versionType.isStable).flatMap { stable => | |
displayVersions.find(v => v.sameMajor(stable) && (v.versionType.isLatest || v.versionType.isStable)) | |
}.orElse(displayVersions.headOption) | |
} | |
isStable が真の version を displayVersion から探して、メージャーバージョンが同じ、かつ isLatest で isStable なもの。 | |
なければ displayVersions の先頭。 | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationPollingActor.scala#L95 | |
versions の読み取りはここ。 | |
git の tag や branch 名からの Version parse は Version.parse() | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/actors/DocumentationPollingActor.scala#L105-L109 | |
version の parse | |
https://github.com/playframework/playframework.com/blob/f8d7840e754ead829c7a6b6006e24b91c428faad/app/models/documentation/Documentation.scala#L114-L166 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment