{"action":"created","comment":{"url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/comments/53168633","id":53168633,"diff_hunk":"@@ -1,4 +1,127 @@\n-const passage = Object.freeze([\n+export class Passage {\n+  constructor(verses) {\n+    this._verses = verses;\n+  }\n+\n+  metadata() {\n+    let firstVerse = this._verses[0];\n+    let lastVerse = this._verses[this._verses.length - 1]\n+    let bookChapter = firstVerse.book + ' ' + firstVerse.chapter + ':';\n+    if (this._verses.length > 1) {\n+      if (firstVerse.chapter === lastVerse.chapter) {","path":"js/passage.js","position":12,"original_position":12,"commit_id":"27f01d495c14569813543747c81b6c9fa20fc46e","original_commit_id":"27f01d495c14569813543747c81b6c9fa20fc46e","user":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"body":"Definitely.  I was ignoring that case for now as we don't have multiple books and not sure if that would a case for the app, but could add a test for it.","created_at":"2016-02-17T14:16:31Z","updated_at":"2016-02-17T14:16:31Z","html_url":"https://github.com/calebwoods/memorize_ephesians/pull/9#discussion_r53168633","pull_request_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/comments/53168633"},"html":{"href":"https://github.com/calebwoods/memorize_ephesians/pull/9#discussion_r53168633"},"pull_request":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9","id":59442835,"html_url":"https://github.com/calebwoods/memorize_ephesians/pull/9","diff_url":"https://github.com/calebwoods/memorize_ephesians/pull/9.diff","patch_url":"https://github.com/calebwoods/memorize_ephesians/pull/9.patch","issue_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/9","number":9,"state":"open","locked":false,"title":"Refactor passage","user":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"body":"This branch adds a new concept that didn't previously exist, the `Passage` class.\r\n\r\nMy goal was to create a class that would be easy to test for most of the text manipulation we need to do.  It also gives us a unified interface for interacting with a single verse, segment, or chapter.\r\n\r\nBecause this consolidates a lot of functionality, duplicate tests were removed and I dropped the Verse component for now.  I could see adding the Verse component back as we work on breaking down the PassagePage component.\r\n\r\nIt may also make sense to move the `activePassage` to the reducer so that stay encapsulated there.\r\n\r\nI also entered in all the segment chunks that Eric supplied in the [schedule card](https://trello.com/c/rzDO0un1/15-how-will-the-memorization-schedule-be-broken-down).","created_at":"2016-02-16T04:39:01Z","updated_at":"2016-02-17T14:16:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf8eeac05db15b095b49fa8f4d219029be01fbb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9/commits","review_comments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9/comments","review_comment_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/9/comments","statuses_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/statuses/27f01d495c14569813543747c81b6c9fa20fc46e","head":{"label":"calebwoods:refactor_passage","ref":"refactor_passage","sha":"27f01d495c14569813543747c81b6c9fa20fc46e","user":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"repo":{"id":50746212,"name":"memorize_ephesians","full_name":"calebwoods/memorize_ephesians","owner":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/calebwoods/memorize_ephesians","description":"Single page to aid in memorizing Ephesians 1-3","fork":false,"url":"https://api.github.com/repos/calebwoods/memorize_ephesians","forks_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/forks","keys_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/teams","hooks_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/hooks","issue_events_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/events{/number}","events_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/events","assignees_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/assignees{/user}","branches_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/branches{/branch}","tags_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/tags","blobs_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/refs{/sha}","trees_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/statuses/{sha}","languages_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/languages","stargazers_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/stargazers","contributors_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/contributors","subscribers_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/subscribers","subscription_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/subscription","commits_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/commits{/sha}","git_commits_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/commits{/sha}","comments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/comments{/number}","issue_comment_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/comments{/number}","contents_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/contents/{+path}","compare_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/merges","archive_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/downloads","issues_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues{/number}","pulls_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls{/number}","milestones_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/milestones{/number}","notifications_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/labels{/name}","releases_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/releases{/id}","deployments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/deployments","created_at":"2016-01-30T21:41:41Z","updated_at":"2016-01-30T21:45:29Z","pushed_at":"2016-02-16T04:47:17Z","git_url":"git://github.com/calebwoods/memorize_ephesians.git","ssh_url":"git@github.com:calebwoods/memorize_ephesians.git","clone_url":"https://github.com/calebwoods/memorize_ephesians.git","svn_url":"https://github.com/calebwoods/memorize_ephesians","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"calebwoods:master","ref":"master","sha":"bc8ac3716c2119d6b13a9deabf092ac1b01f3be1","user":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"repo":{"id":50746212,"name":"memorize_ephesians","full_name":"calebwoods/memorize_ephesians","owner":{"login":"calebwoods","id":640501,"avatar_url":"https://avatars.githubusercontent.com/u/640501?v=3","gravatar_id":"","url":"https://api.github.com/users/calebwoods","html_url":"https://github.com/calebwoods","followers_url":"https://api.github.com/users/calebwoods/followers","following_url":"https://api.github.com/users/calebwoods/following{/other_user}","gists_url":"https://api.github.com/users/calebwoods/gists{/gist_id}","starred_url":"https://api.github.com/users/calebwoods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebwoods/subscriptions","organizations_url":"https://api.github.com/users/calebwoods/orgs","repos_url":"https://api.github.com/users/calebwoods/repos","events_url":"https://api.github.com/users/calebwoods/events{/privacy}","received_events_url":"https://api.github.com/users/calebwoods/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/calebwoods/memorize_ephesians","description":"Single page to aid in memorizing Ephesians 1-3","fork":false,"url":"https://api.github.com/repos/calebwoods/memorize_ephesians","forks_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/forks","keys_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/teams","hooks_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/hooks","issue_events_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/events{/number}","events_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/events","assignees_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/assignees{/user}","branches_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/branches{/branch}","tags_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/tags","blobs_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/refs{/sha}","trees_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/statuses/{sha}","languages_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/languages","stargazers_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/stargazers","contributors_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/contributors","subscribers_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/subscribers","subscription_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/subscription","commits_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/commits{/sha}","git_commits_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/git/commits{/sha}","comments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/comments{/number}","issue_comment_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/comments{/number}","contents_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/contents/{+path}","compare_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/merges","archive_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/downloads","issues_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues{/number}","pulls_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls{/number}","milestones_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/milestones{/number}","notifications_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/labels{/name}","releases_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/releases{/id}","deployments_url":"https://api.github.com/repos/calebwoods/memorize_ephesians/deployments","created_at":"2016-01-30T21:41:41Z","updated_at":"2016-01-30T21:45:29Z","pushed_at":"2016-02-16T04:47:17Z","git_url":"git://github.com/calebwoods/memorize_ephesians.git","ssh_url":"git@github.com:calebwoods/memorize_ephesians.git","clone_url":"https://github.com/calebwoods/memorize_ephesians.git","svn_url":"https://github.com/calebwoods/memorize_ephesians","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9"},"html":{"href":"https://github.com/calebwoods/memorize_ephesians/pull/9"},"issue":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/9"},"comments":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/calebwoods/memorize_ephesians/statuses/27f01d495c14569813543747c81b6c9fa20fc46e"}}}}