Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

Commit 68805ee

Browse files
Merge branch 'master' into improve_coverage_ngx
2 parents d59fe7d + 877957a commit 68805ee

16 files changed

+550
-197
lines changed

.github/CONTRIBUTING.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,28 @@ git checkout -b your-branch-name
6868

6969
- If your checks have passed, your PR will be assigned a reviewer who will review your code and provide comments. Please address each review comment by pushing new commits to the same branch (the PR will automatically update, so you don’t need to submit a new one). Once you are done, comment below each review comment marking it as “Done”. Feel free to use the thread to have a discussion about comments that you don’t understand completely or don’t agree with.
7070

71-
- Once all comments are addressed, the reviewer will give an LGTM (‘looks good to me’) and merge the PR.
72-
4. Rules for great commit messages:
71+
- Once all comments are addressed, the maintainer will approve the PR.
72+
73+
4. Once you get reviewed by a mentor and done with all the required changes, squash all the commits:
74+
75+
```
76+
git checkout <branch_name>
77+
git rebase -i HEAD~N (N is the number of commits to be squashed)
78+
```
79+
80+
Then a screen will appear with all N commits having "pick" written in front of every commit.Change pick to s for the last N-1 commits and let it be pick for the first one.
81+
82+
Press esc button and type ":wq" to save the change and close the screen. Now a new screen will appear asking you to change commit message. Change it accordingly and save it.
83+
84+
```
85+
git push origin <branch_name> --force
86+
```
87+
88+
For further query regarding rebasing, visit https://github.com/todotxt/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit
89+
90+
Once rebasing is done, the reviewer will approve and merge the PR.
91+
92+
5. Rules for great commit messages:
7393

7494
- Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug."
7595

@@ -85,7 +105,7 @@ git checkout -b your-branch-name
85105

86106
- Describe why a change is being made.
87107

88-
5. Commit message is important as it should answers/should do the following:
108+
6. Commit message is important as it should answers/should do the following:
89109

90110
- How does it address the issue?
91111

@@ -95,7 +115,7 @@ git checkout -b your-branch-name
95115

96116
- Provide concise explaination to the user about limitations of the current code, like a bug or an issue
97117

98-
6. Examples of a great commit message:
118+
7. Examples of a great commit message:
99119

100120
- Add CPU arch filter scheduler support
101121

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ sudo: required
22
dist: trusty
33
language: node_js
44
addons:
5+
apt:
6+
packages:
7+
- dpkg
58
chrome: stable
69

710
node_js:

src/app/app-routing.module.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,19 @@
11
import { NgModule } from '@angular/core';
2-
import { CommonModule } from '@angular/common';
32
import { RouterModule, Routes } from '@angular/router';
43
import { HomeComponent } from './components/home/home.component';
5-
import { AuthComponent } from './components/auth/auth.component';
6-
import { LoginComponent } from './components/auth/login/login.component';
7-
import { SignupComponent } from './components/auth/signup/signup.component';
8-
import { VerifyEmailComponent } from './components/auth/verify-email/verify-email.component';
94
import { PubliclistsComponent } from './components/publiclists/publiclists.component';
10-
import { ChallengelistComponent } from './components/publiclists/challengelist/challengelist.component';
115
import { TeamlistComponent } from './components/publiclists/teamlist/teamlist.component';
126
import { ContactComponent } from './components/contact/contact.component';
137
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
148
import { GetInvolvedComponent } from './components/get-involved/get-involved.component';
159
import { AboutComponent } from './components/about/about.component';
16-
import { ChallengeComponent } from './components/challenge/challenge.component';
17-
import { ChallengesettingsComponent } from './components/challenge/challengesettings/challengesettings.component';
18-
import { ChallengeoverviewComponent} from './components/challenge/challengeoverview/challengeoverview.component';
19-
import { ChallengeevaluationComponent } from './components/challenge/challengeevaluation/challengeevaluation.component';
20-
import { ChallengephasesComponent} from './components/challenge/challengephases/challengephases.component';
21-
import { ChallengeparticipateComponent } from './components/challenge/challengeparticipate/challengeparticipate.component';
22-
import { ChallengeleaderboardComponent } from './components/challenge/challengeleaderboard/challengeleaderboard.component';
23-
import { ChallengesubmitComponent } from './components/challenge/challengesubmit/challengesubmit.component';
24-
import { ChallengesubmissionsComponent } from './components/challenge/challengesubmissions/challengesubmissions.component';
25-
import {
26-
ChallengeviewallsubmissionsComponent
27-
} from './components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component';
2810
import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component';
2911
import { DashboardComponent } from './components/dashboard/dashboard.component';
3012
import { ProfileComponent } from './components/profile/profile.component';
3113
import { OurTeamComponent } from './components/our-team/our-team.component';
3214
import { NotFoundComponent } from './components/not-found/not-found.component';
3315
import {AnalyticsComponent} from './components/analytics/analytics.component';
3416
import {HostAnalyticsComponent} from './components/analytics/host-analytics/host-analytics.component';
35-
import {ResetPasswordComponent} from './components/auth/reset-password/reset-password.component';
36-
import {ResetPasswordConfirmComponent} from './components/auth/reset-password-confirm/reset-password-confirm.component';
3717

3818
const routes: Routes = [
3919
{
@@ -47,52 +27,6 @@ const routes: Routes = [
4727
path: 'about',
4828
component: AboutComponent
4929
},
50-
{
51-
path: 'auth',
52-
component: AuthComponent,
53-
children: [
54-
{path: '', redirectTo: 'login', pathMatch: 'full'},
55-
{path: 'login', component: LoginComponent},
56-
{path: 'reset-password', component: ResetPasswordComponent},
57-
{path: 'reset-password/confirm/:user_id/:reset_token', component: ResetPasswordConfirmComponent},
58-
{path: 'signup', component: SignupComponent},
59-
{path: 'verify-email/:token', component: VerifyEmailComponent},
60-
{path: '**', redirectTo: 'login'}
61-
]
62-
},
63-
{
64-
path: 'challenge',
65-
redirectTo: 'challenges'
66-
},
67-
{
68-
path: 'challenge/:id',
69-
component: ChallengeComponent,
70-
children: [
71-
{path: '', redirectTo: 'overview', pathMatch: 'full'},
72-
{path: 'overview', component: ChallengeoverviewComponent},
73-
{path: 'evaluation', component: ChallengeevaluationComponent},
74-
{path: 'phases', component: ChallengephasesComponent},
75-
{path: 'participate', component: ChallengeparticipateComponent},
76-
{path: 'submit', component: ChallengesubmitComponent},
77-
{path: 'my-submissions', component: ChallengesubmissionsComponent},
78-
{path: 'my-submissions/:phase', component: ChallengesubmissionsComponent},
79-
{path: 'mysubmissions/:phase/:submission', component: ChallengesubmissionsComponent},
80-
{path: 'view-all-submissions', component: ChallengeviewallsubmissionsComponent},
81-
{path: 'leaderboard', component: ChallengeleaderboardComponent},
82-
{path: 'leaderboard/:split', component: ChallengeleaderboardComponent},
83-
{path: 'leaderboard/:split/:entry', component: ChallengeleaderboardComponent},
84-
{path: 'settings', component: ChallengesettingsComponent}
85-
]
86-
},
87-
{
88-
path: 'challenges',
89-
component: PubliclistsComponent,
90-
children: [
91-
{path: '', redirectTo: 'all', pathMatch: 'full'},
92-
{path: 'all', component: ChallengelistComponent},
93-
{path: 'me', component: ChallengelistComponent}
94-
]
95-
},
9630
{
9731
path: 'challenge-create',
9832
component: ChallengeCreateComponent

src/app/app.module.ts

Lines changed: 16 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,8 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
33
import { NgModule } from '@angular/core';
44
import { HttpClientModule } from '@angular/common/http';
55
import { EmailValidator, FormsModule } from '@angular/forms';
6-
import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
7-
import { TextareaAutosizeModule } from 'ngx-textarea-autosize';
8-
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
9-
import { MatSelectModule } from '@angular/material/select';
10-
import { MatChipsModule } from '@angular/material/chips';
11-
import { MatMenuModule } from '@angular/material/menu';
12-
import { MatIconModule } from '@angular/material/icon';
13-
import { MatCheckboxModule } from '@angular/material';
146

15-
// Import serivces
16-
import { AuthService } from './services/auth.service';
7+
// Import services
178
import { WindowService } from './services/window.service';
189
import { ApiService } from './services/api.service';
1910
import { GlobalService } from './services/global.service';
@@ -23,159 +14,59 @@ import { EndpointsService } from './services/endpoints.service';
2314

2415
// Import Components
2516
import { AppComponent } from './app.component';
26-
import { HomeComponent } from './components/home/home.component';
2717
import { AppRoutingModule } from './app-routing.module';
28-
import { HeaderStaticComponent } from './components/nav/header-static/header-static.component';
2918
import { ContactComponent } from './components/contact/contact.component';
30-
import { FooterComponent } from './components/nav/footer/footer.component';
3119
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
32-
import { InputComponent } from './components/utility/input/input.component';
33-
import { AuthComponent } from './components/auth/auth.component';
34-
import { LoginComponent } from './components/auth/login/login.component';
35-
import { SignupComponent } from './components/auth/signup/signup.component';
36-
import { ToastComponent } from './components/utility/toast/toast.component';
3720
import { GetInvolvedComponent } from './components/get-involved/get-involved.component';
3821
import { AboutComponent } from './components/about/about.component';
39-
import { CardlistComponent } from './components/utility/cardlist/cardlist.component';
40-
import { ChallengecardComponent } from './components/publiclists/challengelist/challengecard/challengecard.component';
41-
import { ChallengelistComponent } from './components/publiclists/challengelist/challengelist.component';
42-
import { TeamcardComponent } from './components/publiclists/teamlist/teamcard/teamcard.component';
43-
import { TeamlistComponent } from './components/publiclists/teamlist/teamlist.component';
44-
import { PubliclistsComponent } from './components/publiclists/publiclists.component';
45-
import { ForceloginComponent } from './components/utility/forcelogin/forcelogin.component';
46-
import { ChallengeComponent } from './components/challenge/challenge.component';
47-
import { ChallengeoverviewComponent } from './components/challenge/challengeoverview/challengeoverview.component';
48-
import { ChallengeevaluationComponent } from './components/challenge/challengeevaluation/challengeevaluation.component';
49-
import { ChallengephasesComponent } from './components/challenge/challengephases/challengephases.component';
50-
import { ChallengeparticipateComponent } from './components/challenge/challengeparticipate/challengeparticipate.component';
51-
import { ChallengeleaderboardComponent } from './components/challenge/challengeleaderboard/challengeleaderboard.component';
52-
import { ChallengesubmitComponent } from './components/challenge/challengesubmit/challengesubmit.component';
53-
import { ChallengesubmissionsComponent } from './components/challenge/challengesubmissions/challengesubmissions.component';
54-
import { PhasecardComponent } from './components/challenge/challengephases/phasecard/phasecard.component';
55-
import { ConfirmComponent } from './components/utility/confirm/confirm.component';
56-
import { LoadingComponent } from './components/utility/loading/loading.component';
57-
import { SelectphaseComponent } from './components/utility/selectphase/selectphase.component';
58-
import { HomemainComponent } from './components/home/homemain/homemain.component';
5922
import { ChallengeCreateComponent } from './components/challenge-create/challenge-create.component';
60-
import { VerifyEmailComponent } from './components/auth/verify-email/verify-email.component';
61-
import { ModalComponent } from './components/utility/modal/modal.component';
62-
import { DashboardComponent } from './components/dashboard/dashboard.component';
6323
import { ProfileComponent } from './components/profile/profile.component';
6424
import { NotFoundComponent } from './components/not-found/not-found.component';
6525
import { OurTeamComponent } from './components/our-team/our-team.component';
66-
import { TwitterFeedComponent } from './components/home/twitter-feed/twitter-feed.component';
6726
import { NgxTwitterTimelineModule } from 'ngx-twitter-timeline';
68-
import { PartnersComponent } from './components/home/partners/partners.component';
69-
import { RulesComponent } from './components/home/rules/rules.component';
70-
import { TestimonialsComponent } from './components/home/testimonials/testimonials.component';
71-
import { FeaturedChallengesComponent } from './components/home/featured-challenges/featured-challenges.component';
72-
import { ChallengesettingsComponent } from './components/challenge/challengesettings/challengesettings.component';
7327
import { AnalyticsComponent } from './components/analytics/analytics.component';
7428
import { HostAnalyticsComponent } from './components/analytics/host-analytics/host-analytics.component';
75-
import { EditphasemodalComponent } from './components/challenge/challengephases/editphasemodal/editphasemodal.component';
76-
import {
77-
TermsAndConditionsModalComponent
78-
} from './components/challenge/challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.component';
79-
import {
80-
ChallengeviewallsubmissionsComponent
81-
} from './components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component';
82-
import { SideBarComponent } from './components/utility/side-bar/side-bar.component';
29+
import { AuthModule } from './components/auth/auth.module';
30+
import { PubliclistModule } from './components/publiclists/publiclist.module';
31+
import { HomeModule } from './components/home/home.module';
32+
import { AuthService } from './services/auth.service';
33+
import { ChallengeModule } from './components/challenge/challenge.module';
34+
import { DashboardModule } from './components/dashboard/dashboard.module';
8335

84-
import { MatTableModule } from '@angular/material/table';
85-
import { MatDividerModule } from '@angular/material/divider';
86-
import { DashboardContentComponent } from './components/dashboard/dashboard-content/dashboard-content.component';
87-
import {PasswordMismatchValidatorDirective} from './Directives/password.validator';
88-
import { ResetPasswordComponent } from './components/auth/reset-password/reset-password.component';
89-
import { EmailValidatorDirective } from './Directives/email.validator';
90-
import { ResetPasswordConfirmComponent } from './components/auth/reset-password-confirm/reset-password-confirm.component';
9136
@NgModule({
9237
declarations: [
9338
AppComponent,
94-
HomeComponent,
95-
HeaderStaticComponent,
96-
FooterComponent,
9739
PrivacyPolicyComponent,
98-
InputComponent,
99-
AuthComponent,
100-
LoginComponent,
101-
SignupComponent,
10240
ContactComponent,
103-
ToastComponent,
10441
GetInvolvedComponent,
10542
AboutComponent,
106-
CardlistComponent,
107-
ChallengecardComponent,
108-
ChallengelistComponent,
109-
TeamcardComponent,
110-
TeamlistComponent,
111-
PubliclistsComponent,
112-
ForceloginComponent,
113-
ChallengeComponent,
114-
ChallengeoverviewComponent,
115-
ChallengeevaluationComponent,
116-
ChallengephasesComponent,
117-
ChallengeparticipateComponent,
118-
ChallengeleaderboardComponent,
119-
ChallengesubmitComponent,
120-
ChallengesubmissionsComponent,
121-
PhasecardComponent,
122-
ConfirmComponent,
123-
LoadingComponent,
124-
SelectphaseComponent,
125-
HomemainComponent,
12643
ChallengeCreateComponent,
127-
VerifyEmailComponent,
128-
ModalComponent,
129-
DashboardComponent,
13044
ProfileComponent,
13145
NotFoundComponent,
13246
OurTeamComponent,
133-
TwitterFeedComponent,
134-
PartnersComponent,
135-
RulesComponent,
136-
TestimonialsComponent,
137-
ChallengesettingsComponent,
138-
SideBarComponent,
13947
AnalyticsComponent,
140-
FeaturedChallengesComponent,
141-
DashboardContentComponent,
142-
HostAnalyticsComponent,
143-
PasswordMismatchValidatorDirective,
144-
EmailValidatorDirective,
145-
ResetPasswordComponent,
146-
EditphasemodalComponent,
147-
ResetPasswordConfirmComponent,
148-
ChallengeviewallsubmissionsComponent,
149-
TermsAndConditionsModalComponent
48+
HostAnalyticsComponent
15049
],
15150
imports: [
51+
AuthModule,
52+
HomeModule,
53+
PubliclistModule,
54+
ChallengeModule,
55+
DashboardModule,
15256
BrowserModule,
15357
BrowserAnimationsModule,
15458
AppRoutingModule,
15559
HttpClientModule,
156-
FormsModule,
157-
NgxTwitterTimelineModule,
158-
FroalaEditorModule.forRoot(),
159-
FroalaViewModule.forRoot(),
160-
TextareaAutosizeModule,
161-
OwlDateTimeModule,
162-
OwlNativeDateTimeModule,
163-
MatSelectModule,
164-
MatChipsModule,
165-
MatMenuModule,
166-
MatIconModule,
167-
MatTableModule,
168-
MatDividerModule,
169-
MatCheckboxModule
60+
FormsModule
17061
],
17162
providers: [
172-
AuthService,
17363
WindowService,
64+
AuthService,
17465
ApiService,
17566
GlobalService,
17667
ChallengeService,
17768
EndpointsService
17869
],
179-
bootstrap: [AppComponent]
70+
bootstrap: [AppComponent],
18071
})
18172
export class AppModule { }
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule, Routes } from '@angular/router';
3+
import { AuthComponent } from './auth.component';
4+
import { LoginComponent } from './login/login.component';
5+
import { ResetPasswordComponent } from './reset-password/reset-password.component';
6+
import { ResetPasswordConfirmComponent } from './reset-password-confirm/reset-password-confirm.component';
7+
import { SignupComponent } from './signup/signup.component';
8+
import { VerifyEmailComponent } from './verify-email/verify-email.component';
9+
10+
const routes: Routes = [
11+
{
12+
path: 'auth',
13+
component: AuthComponent,
14+
children: [
15+
{path: '', redirectTo: 'login', pathMatch: 'full'},
16+
{path: 'login', component: LoginComponent},
17+
{path: 'reset-password', component: ResetPasswordComponent},
18+
{path: 'reset-password/confirm/:user_id/:reset_token', component: ResetPasswordConfirmComponent},
19+
{path: 'signup', component: SignupComponent},
20+
{path: 'verify-email/:token', component: VerifyEmailComponent},
21+
{path: '**', redirectTo: 'login'}
22+
]
23+
},
24+
];
25+
@NgModule({
26+
imports: [ RouterModule.forChild(routes)],
27+
exports: [RouterModule]
28+
})
29+
export class AuthRoutingModule {}

0 commit comments

Comments
 (0)