Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Commit 319c1a7

Browse files
committed
Make project dully compatible to FB opensource standards
1 parent 2756455 commit 319c1a7

File tree

8 files changed

+106
-0
lines changed

8 files changed

+106
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
4+
Please read the [full text](https://code.fb.com/codeofconduct/)
5+
so that you can understand what actions will and will not be tolerated.

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to Nailgun
2+
3+
We encourage the reporting of issues and bugs, along with pull requests to help make Nailgun codebase better. The following are some information and guidelines to help you contribute to Nailgun.
4+
5+
## Tour of the Codebase
6+
7+
This is a high-level overview of how the Nailgun repository is organized.
8+
9+
### `nailgun-server/`
10+
11+
That is where server side code lives, written in Java. It contains both core code under `src/main` and test code under `src/tests`.
12+
13+
### `nailgun-client/`
14+
15+
Client part of Nailgun, both C and Python versions in appropriate folders.
16+
17+
### `nailgun-examples/`
18+
19+
Some simple implementations of a Nail, helpful to understand how to write server-side code. One can also execute one of those nails for debugging or integration testing.
20+
21+
### `scripts/`
22+
23+
Automation scripts, mostly for continuous integration (i.e. Travis CI).
24+
25+
### `tools/`
26+
27+
Third-party dependencies used in tooling, like linter or code formatter.
28+
29+
## Development Workflow
30+
31+
### Building Nailgun
32+
33+
As simple as running `mvn clean package`.
34+
35+
### Running Tests
36+
37+
Unit tests and integration tests are JUnit and they are run by Maven when you say 'mvn package'. To run E2E test, just execute `./scripts/travis_ci.sh`. It will also run `mvn package` first with all unit tests.
38+
39+
### Using the IntelliJ IDE
40+
41+
Just open project from Nailgun's root folder
42+
43+
### Code Style
44+
45+
Code is autoformatted with Maven plugin and Google code style is used. Be ready to have some changed files after building the project with Maven, so you may have to amend the change to git.

nailgun-client/py/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# Copyright 2004-2015, Martian Software, Inc.
2+
# Copyright 2017-Present Facebook, Inc.
3+
14
from ng import NailgunConnection, NailgunException

nailgun-examples/src/main/java/com/facebook/nailgun/examples/Heartbeat.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Copyright 2004-2012, Jim Purbrick.
3+
Copyright 2017-Present Facebook, Inc.
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.

nailgun-server/src/main/java/com/facebook/nailgun/NGExitException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/*
2+
* Copyright 2004-2012, Martian Software, Inc.
3+
* Copyright 2017-Present Facebook, Inc
4+
*
25
* This class is based upon org.apache.tools.ant.ExitException and is
36
* subject to the following:
47
*

nailgun-server/src/main/java/com/facebook/nailgun/builtins/NGVersion.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
Copyright 2004-2012, Martian Software, Inc.
3+
Copyright 2017-Present Facebook, Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
118
package com.facebook.nailgun.builtins;
219

320
import com.facebook.nailgun.NGConstants;

nailgun-server/src/main/resources/com/facebook/nailgun/builtins/builtins.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
#
2+
# Copyright 2004-2015, Martian Software, Inc.
3+
# Copyright 2017-Present Facebook, Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
117
ng-alias=com.facebook.nailgun.builtins.NGAlias
218
ng-alias.desc=Displays and manages command aliases
319

scripts/travis_run.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#!/bin/sh
2+
#
3+
# Copyright 2004-2015, Martian Software, Inc.
4+
# Copyright 2017-Present Facebook, Inc.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
218
set -eux
319

420
mvn package

0 commit comments

Comments
 (0)