Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Really fix classes name containing GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Lancelot committed Feb 11, 2016
1 parent 1337e77 commit 3daec15
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.pluginClass>org.sonarsource.auth.github.AuthGithubPlugin2</sonar.pluginClass>
<sonar.pluginClass>org.sonarsource.auth.github.AuthGitHubPlugin</sonar.pluginClass>

<!-- used for deployment to SonarSource Artifactory -->
<gitRepositoryName>sonar-auth-github</gitRepositoryName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import java.util.List;
import org.sonar.api.SonarPlugin;

public class AuthGithubPlugin2 extends SonarPlugin {
public class AuthGitHubPlugin extends SonarPlugin {
@Override
public List getExtensions() {
List extensions = new ArrayList();
extensions.add(GithubIdentityProvider2.class);
extensions.add(GithubSettings2.class);
extensions.addAll(GithubSettings2.definitions());
extensions.add(GitHubIdentityProvider.class);
extensions.add(GitHubSettings.class);
extensions.addAll(GitHubSettings.definitions());
return extensions;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
import org.sonar.api.utils.log.Loggers;

import static java.lang.String.format;
import static org.sonarsource.auth.github.GithubSettings2.LOGIN_STRATEGY_PROVIDER_ID;
import static org.sonarsource.auth.github.GithubSettings2.LOGIN_STRATEGY_UNIQUE;
import static org.sonarsource.auth.github.GitHubSettings.LOGIN_STRATEGY_PROVIDER_ID;
import static org.sonarsource.auth.github.GitHubSettings.LOGIN_STRATEGY_UNIQUE;

@ServerSide
public class GithubIdentityProvider2 implements OAuth2IdentityProvider {
public class GitHubIdentityProvider implements OAuth2IdentityProvider {

private static final Logger LOGGER = Loggers.get(GithubIdentityProvider2.class);
private static final Logger LOGGER = Loggers.get(GitHubIdentityProvider.class);

private static final Token EMPTY_TOKEN = null;

private final GithubSettings2 settings;
private final GitHubSettings settings;

public GithubIdentityProvider2(GithubSettings2 settings) {
public GitHubIdentityProvider(GitHubSettings settings) {
this.settings = settings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import static org.sonar.api.PropertyType.SINGLE_SELECT_LIST;

@ServerSide
public class GithubSettings2 {
public class GitHubSettings {

public static final String CLIENT_ID = "sonar.auth.github.clientId";
public static final String CLIENT_SECRET = "sonar.auth.github.clientSecret";
Expand All @@ -49,7 +49,7 @@ public class GithubSettings2 {

private final Settings settings;

public GithubSettings2(Settings settings) {
public GitHubSettings(Settings settings) {
this.settings = settings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import org.sonar.api.config.Settings;

import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarsource.auth.github.GithubSettings2.LOGIN_STRATEGY_DEFAULT_VALUE;
import static org.sonarsource.auth.github.GithubSettings2.LOGIN_STRATEGY_PROVIDER_ID;
import static org.sonarsource.auth.github.GitHubSettings.LOGIN_STRATEGY_DEFAULT_VALUE;
import static org.sonarsource.auth.github.GitHubSettings.LOGIN_STRATEGY_PROVIDER_ID;

public class GithubSettingsTest {

Settings settings = new Settings();

GithubSettings2 underTest = new GithubSettings2(settings);
GitHubSettings underTest = new GitHubSettings(settings);

@Test
public void is_enabled() throws Exception {
Expand Down Expand Up @@ -87,6 +87,6 @@ public void allow_users_to_sign_up() throws Exception {

@Test
public void definitions() throws Exception {
assertThat(GithubSettings2.definitions()).hasSize(5);
assertThat(GitHubSettings.definitions()).hasSize(5);
}
}

0 comments on commit 3daec15

Please sign in to comment.