Преглед изворни кода

Move contributing information from README file to CONTRIBUTING file

Smarticles101 пре 9 година
родитељ
комит
cd8387ff44
No account linked to committer's email
2 измењених фајлова са 116 додато и 111 уклоњено
  1. 115
    0
      CONTRIBUTING.md
  2. 1
    111
      README.md

+ 115
- 0
CONTRIBUTING.md Прегледај датотеку

@@ -1,3 +1,23 @@
1
+## Table of Contents
2
+
3
+* [Overview](#overview)
4
+* [Before Making Your Pull Request](#before-making-your-pull-request)
5
+* [Contributing With Minimal Setup](#contributing-with-minimal-setup)
6
+* [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase)
7
+  * [The `exercises` Module](#the-exercises-module)
8
+  * [The Problem Submodules](#the-problem-submodules)
9
+* [Advanced: Complete Local Setup](#advanced-complete-local-setup)
10
+  * [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)
11
+
12
+## Overview
13
+
14
+This guide covers contributing to the Java track.  If you are new, this guide is for you.
15
+
16
+If, at any point, you're having any trouble, pop in the [Gitter exercism/java room](https://gitter.im/exercism/java) or the [Gitter exercism/dev room](https://gitter.im/exercism/dev) for help.
17
+
18
+
19
+## Before Making Your Pull Request
20
+
1 21
 Hi! Thanks for contributing to the Exercism Java track!
2 22
 
3 23
 Before opening your pull request, please review the track policies linked below and make sure your changes comply with them all. This helps us focus our review time on the more important aspects of your changes.
@@ -6,3 +26,98 @@ Before opening your pull request, please review the track policies linked below
6 26
 - [Starter implementations](https://github.com/exercism/java/blob/master/POLICIES.md#starter-implementations)
7 27
 - [Ignore noninitial tests](https://github.com/exercism/java/blob/master/POLICIES.md#ignore-noninitial-tests)
8 28
 - [Multiple file submissions](https://github.com/exercism/java/blob/master/POLICIES.md#multiple-file-submissions)
29
+
30
+## Contributing With Minimal Setup
31
+
32
+First things first: by contributing to Exercism, you are making this learning tool that much better and improving our industry as a whole... thank you!!!
33
+
34
+To submit a fix for an existing exercise or port an exercise to Java with the least amount of setup:
35
+
36
+1. **Ensure you have the basic Java tooling installed:**  JDK 1.8+, an editor and Gradle 2.x.
37
+
38
+   (see [exercism.io: Installing Java](http://exercism.io/languages/java/installing))
39
+-  **Setup a branch on a fork of [exercism/java](https://github.com/exercism/java) on your computer.**
40
+
41
+   See [GitHub Help: Forking](https://help.github.com/articles/fork-a-repo/).  Use those instructions (in conjunction with the [Git Basics doc](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/git-basics.md)) to:
42
+   * "fork" a repository on GitHub;
43
+   - install `git`;
44
+   - "clone" a copy of your fork;
45
+   - configure an "upstream remote" (in this case, `exercism/java`);
46
+   - create a branch to house your work
47
+-  **Write the codes.**  Do your work on that branch you just created.
48
+
49
+   The [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase) section, below, is an orientation.
50
+-  **Commit, push and create a pull request.**
51
+
52
+   Something like:
53
+   ```
54
+   $ git add .
55
+   $ git commit -m "(An intention-revealing commit message)"
56
+   $ git push
57
+   ```
58
+
59
+   The Git Basics doc has a section on [commit messages](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/git-basics.md#commit-messages) that provides practical advice on crafting meaningful commit messages.
60
+-  **Verify that your work passes all tests.**  When you create a pull request (PR), GitHub triggers a build on Travis CI.  Your PR will not be merged unless those tests pass.
61
+
62
+## Getting Familiar With the Codebase
63
+
64
+There are two objectives to the design of this build:
65
+
66
+1. when a problem is built from within the `exercism/java` repo (i.e. when you, the contributor, are developing the exercise), the tests run against the "example" code;
67
+2. when a problem is built outside the `exercism/java` repo (when a participant is solving the exercise), the tests run against the "main" code.
68
+
69
+This repo is a multi-project gradle build.
70
+
71
+### The `exercises` Module
72
+
73
+This is the top-level module, contained in the `exercises` directory.  It is a container for the problem sub-modules.
74
+
75
+  * its `build.gradle` points the "main" sourceset to the example code.
76
+  * its `settings.gradle` names each of the subprojects, one for each problem in the set.
77
+
78
+### The Problem Submodules
79
+
80
+The `exercises` subdirectory contains all of the problem submodules.
81
+Each problem/submodule is a subdirectory of the same name as its slug.
82
+
83
+  * its `build.gradle` names dependencies required to work that problem.
84
+
85
+Each problem/submodule has three source sets:
86
+
87
+* `src/test/java/` — a test suite defining the edges of the problem
88
+* `src/example/java/` — an example solution that passes all the tests
89
+* `src/main/java/` — starter source files, if required/desired *(this directory usually only has a `.keep` file in it)*.
90
+
91
+----
92
+
93
+## Advanced: Complete Local Setup
94
+
95
+If you are going to make significant contribution(s) to the track, you might find it handy to have a complete local install of exercism on your computer.  This way, you can run the full suite of tests without having to create/update a PR.
96
+
97
+The easiest way to achieve this is simply use the `bin/journey-test.sh` script.  However, you may want to perform other tests, depending on what you are doing.  You can do so by duplicating the setup performed by the `bin/journey-test.sh` script.
98
+
99
+### Tip: `gradle clean` before `exercism fetch`
100
+
101
+If you `exercism fetch` after doing a build, the CLI will fail with the following error message:
102
+
103
+```
104
+$ exercism fetch java bob
105
+2015/09/06 15:03:21 an internal server error was received.
106
+Please file a bug report with the contents of 'exercism debug' at: https://github.com/exercism/exercism.io/issues
107
+```
108
+
109
+and if you review the logs of your x-api, you'll find:
110
+
111
+```
112
+127.0.0.1 - - [06/Sep/2015:15:20:56 -0700] "GET /v2/exercises/java/bob HTTP/1.1" 500 514949 0.2138
113
+2015-09-06 15:21:01 - JSON::GeneratorError - source sequence is illegal/malformed utf-8:
114
+```
115
+
116
+This is because some files generated by the build can't be served from the x-api.  This is by design: the CLI does not serve binaries.  To fix this, simply make sure you do a clean in your `exercism/java` repo before you fetch:
117
+
118
+```
119
+cd ~/workspace/exercism/java/exercises
120
+gradle clean
121
+cd ~/workspace/exercism/exercises
122
+exercism fetch java bob
123
+```

+ 1
- 111
README.md Прегледај датотеку

@@ -6,114 +6,4 @@ Source for Exercism Exercises in Java.
6 6
 
7 7
 For general information about how to contribute to Exercism, please refer to the [Contributing Guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks).
8 8
 
9
-## Table of Contents
10
-
11
-* [Overview](#overview)
12
-* [Contributing With Minimal Setup](#contributing-with-minimal-setup)
13
-* [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase)
14
-  * [The `exercises` Module](#the-exercises-module)
15
-  * [The Problem Submodules](#the-problem-submodules)
16
-* [Advanced: Complete Local Setup](#advanced-complete-local-setup)
17
-  * [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)
18
-
19
-
20
-## Overview
21
-
22
-This guide covers contributing to the Java track.  If you are new, this guide is for you.
23
-
24
-If, at any point, you're having any trouble, pop in the [Gitter exercism/java room](https://gitter.im/exercism/java) or the [Gitter exercism/dev room](https://gitter.im/exercism/dev) for help.
25
-
26
-## Contributing With Minimal Setup
27
-
28
-First things first: by contributing to Exercism, you are making this learning tool that much better and improving our industry as a whole... thank you!!!
29
-
30
-To submit a fix for an existing exercise or port an exercise to Java with the least amount of setup:
31
-
32
-1. **Ensure you have the basic Java tooling installed:**  JDK 1.8+, an editor and Gradle 2.x.
33
-
34
-   (see [exercism.io: Installing Java](http://exercism.io/languages/java/installing))
35
--  **Setup a branch on a fork of [exercism/java](https://github.com/exercism/java) on your computer.**
36
-
37
-   See [GitHub Help: Forking](https://help.github.com/articles/fork-a-repo/).  Use those instructions (in conjunction with the [Git Basics doc](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/git-basics.md)) to:
38
-   * "fork" a repository on GitHub;
39
-   - install `git`;
40
-   - "clone" a copy of your fork;
41
-   - configure an "upstream remote" (in this case, `exercism/java`);
42
-   - create a branch to house your work
43
--  **Write the codes.**  Do your work on that branch you just created.
44
-
45
-   The [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase) section, below, is an orientation.
46
--  **Commit, push and create a pull request.**
47
-
48
-   Something like:
49
-   ```
50
-   $ git add .
51
-   $ git commit -m "(An intention-revealing commit message)"
52
-   $ git push
53
-   ```
54
-
55
-   The Git Basics doc has a section on [commit messages](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/git-basics.md#commit-messages) that provides practical advice on crafting meaningful commit messages.
56
--  **Verify that your work passes all tests.**  When you create a pull request (PR), GitHub triggers a build on Travis CI.  Your PR will not be merged unless those tests pass.
57
-
58
-## Getting Familiar With the Codebase
59
-
60
-There are two objectives to the design of this build:
61
-
62
-1. when a problem is built from within the `exercism/java` repo (i.e. when you, the contributor, are developing the exercise), the tests run against the "example" code;
63
-2. when a problem is built outside the `exercism/java` repo (when a participant is solving the exercise), the tests run against the "main" code.
64
-
65
-This repo is a multi-project gradle build.
66
-
67
-### The `exercises` Module
68
-
69
-This is the top-level module, contained in the `exercises` directory.  It is a container for the problem sub-modules.
70
-
71
-  * its `build.gradle` points the "main" sourceset to the example code.
72
-  * its `settings.gradle` names each of the subprojects, one for each problem in the set.
73
-
74
-### The Problem Submodules
75
-
76
-The `exercises` subdirectory contains all of the problem submodules.
77
-Each problem/submodule is a subdirectory of the same name as its slug.
78
-
79
-  * its `build.gradle` names dependencies required to work that problem.
80
-
81
-Each problem/submodule has three source sets:
82
-
83
-* `src/test/java/` — a test suite defining the edges of the problem
84
-* `src/example/java/` — an example solution that passes all the tests
85
-* `src/main/java/` — starter source files, if required/desired *(this directory usually only has a `.keep` file in it)*.
86
-
87
-----
88
-
89
-## Advanced: Complete Local Setup
90
-
91
-If you are going to make significant contribution(s) to the track, you might find it handy to have a complete local install of exercism on your computer.  This way, you can run the full suite of tests without having to create/update a PR.
92
-
93
-The easiest way to achieve this is simply use the `bin/journey-test.sh` script.  However, you may want to perform other tests, depending on what you are doing.  You can do so by duplicating the setup performed by the `bin/journey-test.sh` script.
94
-
95
-### Tip: `gradle clean` before `exercism fetch`
96
-
97
-If you `exercism fetch` after doing a build, the CLI will fail with the following error message:
98
-
99
-```
100
-$ exercism fetch java bob
101
-2015/09/06 15:03:21 an internal server error was received.
102
-Please file a bug report with the contents of 'exercism debug' at: https://github.com/exercism/exercism.io/issues
103
-```
104
-
105
-and if you review the logs of your x-api, you'll find:
106
-
107
-```
108
-127.0.0.1 - - [06/Sep/2015:15:20:56 -0700] "GET /v2/exercises/java/bob HTTP/1.1" 500 514949 0.2138
109
-2015-09-06 15:21:01 - JSON::GeneratorError - source sequence is illegal/malformed utf-8:
110
-```
111
-
112
-This is because some files generated by the build can't be served from the x-api.  This is by design: the CLI does not serve binaries.  To fix this, simply make sure you do a clean in your `exercism/java` repo before you fetch:
113
-
114
-```
115
-cd ~/workspace/exercism/java/exercises
116
-gradle clean
117
-cd ~/workspace/exercism/exercises
118
-exercism fetch java bob
119
-```
9
+For information on contributing to this track, refer to the [CONTRIBUTING.md](https://github.com/exercism/java/blob/main/CONTRIBUTING.md) file.