Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
renew catch line and domain
  • Loading branch information
ufuk committed Nov 13, 2017
1 parent 9012e5e commit 4dabb95
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
coding-expercise
================

Learn to code. Code to be legend.
Learn to code. Code to make the dreams come true.

http://coding.expercise.com

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/messages_en.properties
Expand Up @@ -29,7 +29,7 @@ button.startCoding = Start Coding
button.update = Update
button.yes = Yes

catchLine = Learn to code. Code to be legend.
catchLine = Learn to code. Code to make the dreams come true.

challenge.failed = Try again!
challenge.language = Language
Expand Down Expand Up @@ -174,7 +174,7 @@ register.legend = Sign Up
tag.listing.header = Choose a tag to dive in...

title = expercise.com
title.index = Learn to code. Code to be legend.
title.index = Learn to code. Code to make the dreams come true.

userList.header = Manage Users
userList.userCountMessage = There are {0} active users.
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/messages_pt.properties
Expand Up @@ -29,7 +29,7 @@ button.startCoding = Start Coding
button.update = Update
button.yes = Yes

catchLine = Learn to code. Code to be legend.
catchLine = Learn to code. Code to make the dreams come true.

challenge.failed = Try again!
challenge.language = Language
Expand Down Expand Up @@ -173,8 +173,8 @@ register.legend = Sign Up

tag.listing.header = Choose a tag to dive in...

title = expercise.com
title.index = Learn to code. Code to be legend.
title = coding.expercise.com
title.index = Learn to code. Code to make the dreams come true.

userList.header = Manage Users
userList.userCountMessage = There are {0} active users.
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/messages_tr.properties
Expand Up @@ -29,7 +29,7 @@ button.startCoding = Kodlamaya Başla
button.update = Güncelle
button.yes = Evet

catchLine = Kodlamayı öğren. Efsane olmak için kodla.
catchLine = Kodlamayı öğren. Hayalleri gerçekleştirmek için kodla.

challenge.failed = Yeniden dene!
challenge.language = Programlama Dili
Expand Down Expand Up @@ -174,8 +174,8 @@ register.legend = Yeni Üye

tag.listing.header = Devam etmek için bir etiket seçin...

title = expercise.com
title.index = Kodlamayı öğren. Efsane olmak için kodla.
title = coding.expercise.com
title.index = Kodlamayı öğren. Hayalleri gerçekleştirmek için kodla.

userList.header = Kullanıcıları Yönet
userList.userCountMessage = Sistemde {0} aktif kullanıcı var.
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/mainLayout.html
Expand Up @@ -9,9 +9,9 @@

<meta name="viewport" content="width=device-width, initial-scale=1"/>

<meta name="description" content="expercise.com; programming challenges for champion developers!"/>
<meta name="description" content="coding.expercise.com; programming challenges for champion developers!"/>
<meta name="author" content="Ufuk Uzun, Batuhan Bayrakci"/>
<meta name="keywords" content="expercise, exercise, challenge, programming, game, java, javascript, python, development"/>
<meta name="keywords" content="coding, expercise, exercise, challenge, programming, game, java, javascript, python, development"/>

<link rel="canonical" th:href="${canonical}"/>

Expand Down
Expand Up @@ -31,7 +31,7 @@ class ForgotMyPasswordServiceSpec extends Specification {
given:
User user = new User(id: 1L, email: "user@expercise.com", firstName: "Ahmet", lastName: "Mehmet")
1 * tokenService.createTokenFor(user, TokenType.FORGOT_MY_PASSWORD) >> "token_123"
1 * urlService.createUrlFor("/forgotMyPassword/reset?token=token_123") >> "http://www.expercise.com/forgotMyPassword/reset?token=token_123"
1 * urlService.createUrlFor("/forgotMyPassword/reset?token=token_123") >> "http://coding.expercise.com/forgotMyPassword/reset?token=token_123"

when:
service.sendResetEmail(user)
Expand All @@ -45,7 +45,7 @@ class ForgotMyPasswordServiceSpec extends Specification {

and: "verify email parameters"
paramCaptor.user == user
paramCaptor.url == "http://www.expercise.com/forgotMyPassword/reset?token=token_123"
paramCaptor.url == "http://coding.expercise.com/forgotMyPassword/reset?token=token_123"
}

def "should check for valid token"() {
Expand Down
Expand Up @@ -10,21 +10,21 @@ class UrlServiceSpec extends Specification {
MockHttpServletRequest mockHttpServletRequest

def setup() {
service = new UrlService(rootUrl: "http://www.expercise.com")
service = new UrlService(rootUrl: "http://coding.expercise.com")
mockHttpServletRequest = new MockHttpServletRequest()
}

def "should create url for specified path"() {
expect:
"http://expercise.com/mypath" == service.createUrlFor("/mypath")
"http://coding.expercise.com/mypath" == service.createUrlFor("/mypath")
}

def "should create canonical url with request uri and root url, without www"() {
given:
mockHttpServletRequest.setRequestURI("/tags")

expect:
"http://expercise.com/tags" == service.getCanonical(mockHttpServletRequest)
"http://coding.expercise.com/tags" == service.getCanonical(mockHttpServletRequest)
}

}
Expand Up @@ -125,11 +125,11 @@ public void shouldSetFalseAsMobileClientIfDeviceIsNormal() {

@Test
public void shouldAddCanonicalUrlWithoutWWW() {
when(urlService.getCanonical(request)).thenReturn("http://expercise.com/");
when(urlService.getCanonical(request)).thenReturn("http://coding.expercise.com/");

interceptor.postHandle(request, response, null, modelAndView);

assertThat(modelAndView.getModel(), hasEntry("canonical", (Object) "http://expercise.com/"));
assertThat(modelAndView.getModel(), hasEntry("canonical", (Object) "http://coding.expercise.com/"));
}

}
Expand Up @@ -25,7 +25,7 @@ public class EmailTemplateProcessorTest extends BaseSpringIntegrationTest {
public void shouldRenderForgotMyPasswordEmail() {
Map<String, Object> params = new HashMap<>();
params.put("user", new UserBuilder().id(1L).email("user@expercise.com").firstName("Ahmet").lastName("Mehmet").build());
params.put("url", "http://www.expercise.com/resetUrl?token=123qwe");
params.put("url", "http://coding.expercise.com/resetUrl?token=123qwe");

String renderedEmail = processor.createEmail(FORGOT_MY_PASSWORD_EMAIL, params);

Expand Down
Expand Up @@ -5,7 +5,7 @@

<p>Hello Ahmet Mehmet,</p>
<p>Please click link below to reset your password.</p>
<a href="http://www.expercise.com/resetUrl?token=123qwe">Reset Password</a>
<a href="http://coding.expercise.com/resetUrl?token=123qwe">Reset Password</a>

</body>
</html>

0 comments on commit 4dabb95

Please sign in to comment.