|
|
|
|
|
|
42
|
* Ruby 1.9+ (to run the [x-api](https://github.com/exercism/x-api)).
|
42
|
* Ruby 1.9+ (to run the [x-api](https://github.com/exercism/x-api)).
|
|
43
|
* Git 1.x
|
43
|
* Git 1.x
|
|
44
|
|
44
|
|
|
45
|
-If you haven't already, please read our advice on [Git Workflow](http://help.exercism.io/git-workflow.html).
|
|
|
|
|
|
45
|
+If you haven't already, please read our advice on [Git Workflow](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#maintaining-a-track).
|
|
46
|
|
46
|
|
|
47
|
|
47
|
|
|
48
|
Here's one way to get setup:
|
48
|
Here's one way to get setup:
|
|
|
|
|
|
|
60
|
rackup
|
60
|
rackup
|
|
61
|
```
|
61
|
```
|
|
62
|
|
62
|
|
|
63
|
-If you want more details, check out the [x-api README](https://github.com/exercism/x-api).
|
|
|
|
|
|
63
|
+If you want more details, check out the [x-api README](https://github.com/exercism/x-api/blob/master/README.md).
|
|
64
|
|
64
|
|
|
65
|
2. **Configure your exercism CLI to point to that x-api.** Out of the box, the CLI is configured to point to the production instances of the API (for account-specific data) and X-API (for problem data). You need to configure your CLI to point to the X-API instance you stood up in the prior step.
|
65
|
2. **Configure your exercism CLI to point to that x-api.** Out of the box, the CLI is configured to point to the production instances of the API (for account-specific data) and X-API (for problem data). You need to configure your CLI to point to the X-API instance you stood up in the prior step.
|
|
66
|
-
|
|
|
|
67
|
- If you haven't already, you'll need need to [install the CLI](http://help.exercism.io/installing-the-cli.html).
|
|
|
|
|
|
66
|
+
|
|
|
|
67
|
+ If you haven't already, you'll need need to [install the CLI](http://exercism.io/cli).
|
|
68
|
|
68
|
|
|
69
|
```
|
69
|
```
|
|
70
|
cd ~
|
70
|
cd ~
|
|
|
|
|
|
|
80
|
If things are properly setup:
|
80
|
If things are properly setup:
|
|
81
|
* `exercism debug` output will include "`XAPI: http://localhost:9292 [connected]`"
|
81
|
* `exercism debug` output will include "`XAPI: http://localhost:9292 [connected]`"
|
|
82
|
* `tree java` will look something like this:
|
82
|
* `tree java` will look something like this:
|
|
83
|
-
|
|
|
|
|
|
83
|
+
|
|
84
|
```
|
84
|
```
|
|
85
|
java
|
85
|
java
|
|
86
|
└── bob
|
86
|
└── bob
|
|
|
|
|
|
|
101
|
git clone git@github.com:jtigger/xjava.git
|
101
|
git clone git@github.com:jtigger/xjava.git
|
|
102
|
git remote add upstream https://github.com/exercism/xjava.git
|
102
|
git remote add upstream https://github.com/exercism/xjava.git
|
|
103
|
git pull --rebase upstream/master
|
103
|
git pull --rebase upstream/master
|
|
104
|
- cd ~/workspace/exercism/x-api/problems
|
|
|
|
|
|
104
|
+ cd ~/workspace/exercism/x-api/tracks
|
|
105
|
rm -rf java
|
105
|
rm -rf java
|
|
106
|
ln -s ../../xjava java
|
106
|
ln -s ../../xjava java
|
|
107
|
```
|
107
|
```
|
|
|
|
|
|
|
169
|
```
|
169
|
```
|
|
170
|
$ exercism fetch java bob
|
170
|
$ exercism fetch java bob
|
|
171
|
2015/09/06 15:03:21 an internal server error was received.
|
171
|
2015/09/06 15:03:21 an internal server error was received.
|
|
172
|
-Please file a bug report with the contents of 'exercism debug' at: https://github.com/exercism/exercism.io/issues
|
|
|
|
|
|
172
|
+Please file a bug report with the contents of 'exercism debug' at: https://github.com/exercism/exercism.io/issues
|
|
173
|
```
|
173
|
```
|
|
174
|
|
174
|
|
|
175
|
and if you review the logs of your x-api, you'll find:
|
175
|
and if you review the logs of your x-api, you'll find:
|
|
|
|
|
|
|
195
|
Before you submit a pull request, please ensure:
|
195
|
Before you submit a pull request, please ensure:
|
|
196
|
|
196
|
|
|
197
|
- the test suite covers the essential parts of the problem and interesting corner cases.
|
197
|
- the test suite covers the essential parts of the problem and interesting corner cases.
|
|
198
|
-- your example solution represents your best attempt at exemplary code.
|
|
|
|
199
|
- the build script (`./bin/build.sh`) compiles and tests your code successfully.
|
198
|
- the build script (`./bin/build.sh`) compiles and tests your code successfully.
|
|
200
|
|
199
|
|
|
201
|
|
200
|
|
|
|
|
|
|
|
203
|
*(These instructions assume you setup your development environment using the instructions above.)*
|
202
|
*(These instructions assume you setup your development environment using the instructions above.)*
|
|
204
|
|
203
|
|
|
205
|
1. **Run the build script, locally.**
|
204
|
1. **Run the build script, locally.**
|
|
206
|
-
|
|
|
|
|
|
205
|
+
|
|
207
|
```
|
206
|
```
|
|
208
|
cd ~/workspace/exercism/xjava
|
207
|
cd ~/workspace/exercism/xjava
|
|
209
|
./bin/build.sh
|
208
|
./bin/build.sh
|
|
210
|
```
|
209
|
```
|
|
211
|
|
210
|
|
|
212
|
verify that the script runs successfully.
|
211
|
verify that the script runs successfully.
|
|
213
|
-
|
|
|
|
|
|
212
|
+
|
|
214
|
2. **Fetch the problem from your local x-api, using the CLI.**
|
213
|
2. **Fetch the problem from your local x-api, using the CLI.**
|
|
215
|
|
214
|
|
|
216
|
```
|
215
|
```
|
|
217
|
cd ~/workspace/exercism/exercises
|
216
|
cd ~/workspace/exercism/exercises
|
|
218
|
exercism fetch java <problem-slug>
|
217
|
exercism fetch java <problem-slug>
|
|
219
|
```
|
218
|
```
|
|
220
|
-
|
|
|
|
|
|
219
|
+
|
|
221
|
verify that the fetched problem does *not* contain any files not needed for the problem.
|
220
|
verify that the fetched problem does *not* contain any files not needed for the problem.
|
|
222
|
-
|
|
|
|
|
|
221
|
+
|
|
223
|
3. **Run the tests against the example source.**
|
222
|
3. **Run the tests against the example source.**
|
|
224
|
|
223
|
|
|
225
|
```
|
224
|
```
|
|
|
|
|
|
|
229
|
```
|
228
|
```
|
|
230
|
|
229
|
|
|
231
|
verify that all tests pass.
|
230
|
verify that all tests pass.
|
|
232
|
-
|
|
|
|
|
|
231
|
+
|
|
233
|
If you've successfully navigated to this point, you're ready to make that pull request!
|
232
|
If you've successfully navigated to this point, you're ready to make that pull request!
|
|
234
|
|
233
|
|
|
235
|
### Making the Pull Request
|
234
|
### Making the Pull Request
|
|
236
|
|
235
|
|
|
237
|
-Hopefully you've read our [Git Workflow](http://help.exercism.io/git-workflow.html) and done your work on a clone of a fork of the exercism xjava repo.
|
|
|
|
|
|
236
|
+Hopefully you've read our [Git Workflow](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#maintaining-a-track) and done your work on a clone of a fork of the exercism xjava repo.
|
|
238
|
|
237
|
|
|
239
|
After you've pushed your changes to your fork (best done on a branch, remember), it's a matter of going to GitHub and submitting a pull request.
|
238
|
After you've pushed your changes to your fork (best done on a branch, remember), it's a matter of going to GitHub and submitting a pull request.
|
|
240
|
|
239
|
|