diff --git a/Changelog.md b/Changelog.md index 9bdc9323d..82070323f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -30,8 +30,9 @@ * Re-add hovercards [#3802](https://github.com/diaspora/diaspora/pull/3802) * Add images to notifications [#3821](https://github.com/diaspora/diaspora/pull/3821) * Show pod version in footer and updated the link to the changelog [#3822](https://github.com/diaspora/diaspora/pull/3822) +* Footer links moved to sidebar [#3827](https://github.com/diaspora/diaspora/pull/3827) +* Changelog now points to correct revision if possible [#3921](https://github.com/diaspora/diaspora/pull/3921) * User interface enhancements [#3832](https://github.com/diaspora/diaspora/pull/3832), [#3839](https://github.com/diaspora/diaspora/pull/3839), [#3834](https://github.com/diaspora/diaspora/pull/3834), [#3840](https://github.com/diaspora/diaspora/issues/3840), [#3846](https://github.com/diaspora/diaspora/issues/3846), [#3851](https://github.com/diaspora/diaspora/issues/3851), [#3828](https://github.com/diaspora/diaspora/issues/3828), [#3874](https://github.com/diaspora/diaspora/issues/3874), [#3806](https://github.com/diaspora/diaspora/issues/3806), [#3906](https://github.com/diaspora/diaspora/issues/3906). -* Show links in sidebar [#3827](https://github.com/diaspora/diaspora/pull/3827) * Add settings web mobile. [#3701](https://github.com/diaspora/diaspora/pull/3701) * Stream form on profile page [#3910](https://github.com/diaspora/diaspora/issues/3910). * Add Add Getting_Started page mobile. [#3949](https://github.com/diaspora/diaspora/issues/3949). diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 82c1185f2..985f506f8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -13,7 +13,8 @@ module ApplicationHelper def changelog_url url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md" - url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_available? + url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_revision.present? + url end def how_long_ago(obj) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index e58d1bcc2..249914f5b 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -89,6 +89,23 @@ describe ApplicationHelper do end end + describe '#changelog_url' do + it 'defaults to master branch changleog' do + old_revision = AppConfig.git_revision + AppConfig.git_revision = nil + changelog_url.should == 'https://github.com/diaspora/diaspora/blob/master/Changelog.md' + AppConfig.git_revision = old_revision + end + + it 'displays the changelog for the current git revision if set' do + old_revision = AppConfig.git_revision + AppConfig.git_revision = '123' + changelog_url.should == 'https://github.com/diaspora/diaspora/blob/123/Changelog.md' + AppConfig.git_revision = old_revision + end + + end + describe '#pod_name' do it 'defaults to Diaspora*' do pod_name.should match /DIASPORA/i