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

Commit

Permalink
Merge pull request #152 from sbalabanov/master
Browse files Browse the repository at this point in the history
Make project fully compatible to FB opensource standards
  • Loading branch information
ttsugriy committed Oct 17, 2018
2 parents 19e0d9a + 319c1a7 commit dfa8827
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text](https://code.fb.com/codeofconduct/)
so that you can understand what actions will and will not be tolerated.
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to Nailgun

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.

## Tour of the Codebase

This is a high-level overview of how the Nailgun repository is organized.

### `nailgun-server/`

That is where server side code lives, written in Java. It contains both core code under `src/main` and test code under `src/tests`.

### `nailgun-client/`

Client part of Nailgun, both C and Python versions in appropriate folders.

### `nailgun-examples/`

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.

### `scripts/`

Automation scripts, mostly for continuous integration (i.e. Travis CI).

### `tools/`

Third-party dependencies used in tooling, like linter or code formatter.

## Development Workflow

### Building Nailgun

As simple as running `mvn clean package`.

### Running Tests

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.

### Using the IntelliJ IDE

Just open project from Nailgun's root folder

### Code Style

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.
3 changes: 3 additions & 0 deletions nailgun-client/py/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Copyright 2004-2015, Martian Software, Inc.
# Copyright 2017-Present Facebook, Inc.

from ng import NailgunConnection, NailgunException
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2004-2012, Jim Purbrick.
Copyright 2017-Present Facebook, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
* Copyright 2004-2012, Martian Software, Inc.
* Copyright 2017-Present Facebook, Inc
*
* This class is based upon org.apache.tools.ant.ExitException and is
* subject to the following:
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Copyright 2004-2012, Martian Software, Inc.
Copyright 2017-Present Facebook, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package com.facebook.nailgun.builtins;

import com.facebook.nailgun.NGConstants;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2004-2015, Martian Software, Inc.
# Copyright 2017-Present Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ng-alias=com.facebook.nailgun.builtins.NGAlias
ng-alias.desc=Displays and manages command aliases

Expand Down
16 changes: 16 additions & 0 deletions scripts/travis_run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/sh
#
# Copyright 2004-2015, Martian Software, Inc.
# Copyright 2017-Present Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eux

mvn package
Expand Down

0 comments on commit dfa8827

Please sign in to comment.