Skip to content

Commit

Permalink
switch website
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhei committed Aug 7, 2018
1 parent 2bcc4ba commit 7754ed3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CITATION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Please open

https://aspect.geodynamics.org/cite.html
https://aspect.geodynamics.org/citing.html&src=citation

for information on how to cite ASPECT.
6 changes: 3 additions & 3 deletions include/aspect/citation_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
namespace CitationInfo
{
/**
* Get the URL in the format "cite.html?(parameters)" that describes how to
* Get the URL in the format "citing.html?(parameters)" that describes how to
* cite ASPECT based on the current model you are running.
*/
const std::string get_url_part ();

/**
* Add the paper identified by the given id to the currently used list of
* papers. See cite.html for the list of ids. For specific features inside
* papers. See citing.html for the list of ids. For specific features inside
* ASPECT that have associated publications, call this function if the
* feature is used in the current computation. For example, if the
* computation requires melt migration, call <tt>add("melt")</tt>.
Expand All @@ -53,7 +53,7 @@ namespace CitationInfo
{
stream << "-----------------------------------------------------------------------------\n"
<< "-- For information on how to cite ASPECT, see:\n"
<< "-- https://geodynamics.github.io/aspect/" << get_url_part() << "\n"
<< "-- https://aspect.geodynamics.org/" << get_url_part() << "\n"
<< "-----------------------------------------------------------------------------"
<< std::endl;
}
Expand Down
11 changes: 7 additions & 4 deletions source/citation_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ namespace CitationInfo
const std::string get_url_part ()
{
// version:
std::string url = "cite.html?ver=";
std::string url = "citing.html?ver=";
url += ASPECT_PACKAGE_VERSION;

// all ids:
for (const auto &id : citation_ids)
url += "&" + id + "=1";

// sha1:
url += "&sha=";
url += ASPECT_GIT_SHORTREV;

// all ids:
for (const auto &id : citation_ids)
url += "&" + id + "=1";
// src:
url += "&src=code";

return url;
}
Expand Down
4 changes: 2 additions & 2 deletions unit_tests/first.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ TEST_CASE("function parser if() and division by zero")
TEST_CASE("citation test")
{
using namespace aspect;
REQUIRE_THAT(CitationInfo::get_url_part(), StartsWith("cite.html?ver="));
REQUIRE_THAT(CitationInfo::get_url_part(), StartsWith("citing.html?ver="));
CitationInfo::add("bla");
REQUIRE_THAT(CitationInfo::get_url_part(), StartsWith("cite.html?ver="));
REQUIRE_THAT(CitationInfo::get_url_part(), StartsWith("citing.html?ver="));
REQUIRE_THAT(CitationInfo::get_url_part(), Contains("bla=1"));
REQUIRE_THAT(CitationInfo::get_url_part(), !Contains("blub"));
CitationInfo::add("blub");
Expand Down

0 comments on commit 7754ed3

Please sign in to comment.