trackler 2.0.6.34 → 2.0.6.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/change/canonical-data.json +6 -0
  3. data/common/exercises/luhn/canonical-data.json +35 -0
  4. data/common/exercises/rotational-cipher/cannonical-data.json +70 -0
  5. data/common/exercises/rotational-cipher/description.md +30 -0
  6. data/common/exercises/rotational-cipher/metadata.yml +4 -0
  7. data/common/exercises/run-length-encoding/description.md +7 -1
  8. data/lib/trackler/version.rb +1 -1
  9. data/tracks/elixir/exercises/run-length-encoding/example.exs +15 -4
  10. data/tracks/elixir/exercises/run-length-encoding/rle.exs +2 -2
  11. data/tracks/elixir/exercises/run-length-encoding/rle_test.exs +28 -11
  12. data/tracks/go/exercises/bob/bob_test.go +4 -1
  13. data/tracks/go/exercises/bracket-push/bracket_push_test.go +5 -2
  14. data/tracks/go/exercises/circular-buffer/circular_buffer_test.go +6 -6
  15. data/tracks/go/exercises/clock/clock_test.go +4 -1
  16. data/tracks/go/exercises/connect/connect_test.go +4 -1
  17. data/tracks/go/exercises/crypto-square/crypto_square_test.go +5 -2
  18. data/tracks/go/exercises/luhn/luhn_test.go +1 -1
  19. data/tracks/javascript/exercises/leap/leap.js +1 -1
  20. data/tracks/julia/.travis.yml +0 -2
  21. data/tracks/julia/config.json +41 -0
  22. data/tracks/julia/exercises/custom-set/HINTS.md +1 -0
  23. data/tracks/julia/exercises/custom-set/custom-set.jl +0 -0
  24. data/tracks/julia/exercises/custom-set/example.jl +51 -0
  25. data/tracks/julia/exercises/custom-set/runtests.jl +200 -0
  26. data/tracks/julia/exercises/isogram/example.jl +11 -0
  27. data/tracks/julia/exercises/isogram/isogram.jl +3 -0
  28. data/tracks/julia/exercises/isogram/runtests.jl +35 -0
  29. data/tracks/julia/exercises/luhn/example.jl +16 -0
  30. data/tracks/julia/exercises/luhn/luhn.jl +0 -0
  31. data/tracks/julia/exercises/luhn/runtests.jl +31 -0
  32. data/tracks/julia/exercises/nucleotide-count/example.jl +8 -0
  33. data/tracks/julia/exercises/nucleotide-count/nucleotide-count.jl +3 -0
  34. data/tracks/julia/exercises/nucleotide-count/runtests.jl +19 -0
  35. data/tracks/kotlin/.travis.yml +9 -1
  36. data/tracks/kotlin/README.md +117 -11
  37. data/tracks/kotlin/bin/journey-test.sh +279 -0
  38. data/tracks/kotlin/docs/INSTALLATION.md +193 -97
  39. data/tracks/kotlin/docs/TESTS.md +72 -137
  40. data/tracks/kotlin/exercises/hello-world/GETTING_STARTED.md +50 -0
  41. data/tracks/kotlin/exercises/hello-world/TUTORIAL.md +693 -0
  42. data/tracks/kotlin/exercises/hello-world/src/example/kotlin/HelloWorld.kt +2 -30
  43. data/tracks/kotlin/exercises/hello-world/src/main/kotlin/HelloWorld.kt +2 -30
  44. data/tracks/kotlin/exercises/hello-world/src/test/kotlin/HelloWorldTest.kt +11 -19
  45. data/tracks/objective-c/circle.yml +1 -1
  46. data/tracks/perl6/exercises/atbash-cipher/{cipher.t → atbash-cipher.t} +0 -0
  47. data/tracks/perl6/exercises/linked-list/linked-list.t +0 -0
  48. data/tracks/perl6/exercises/phone-number/{phone.t → phone-number.t} +0 -0
  49. data/tracks/perl6/exercises/rna-transcription/{rna_transcription.t → rna-transcription.t} +0 -0
  50. data/tracks/perl6/exercises/robot-name/{robot.t → robot-name.t} +0 -0
  51. data/tracks/perl6/exercises/scrabble-score/{scrabble_score.t → scrabble-score.t} +0 -0
  52. data/tracks/perl6/exercises/word-count/{word_count.t → word-count.t} +0 -0
  53. data/tracks/pony/config.json +9 -0
  54. data/tracks/pony/exercises/pascals-triangle/example.pony +18 -0
  55. data/tracks/pony/exercises/pascals-triangle/test.pony +31 -0
  56. data/tracks/r/config.json +20 -0
  57. data/tracks/r/exercises/grains/example.R +16 -0
  58. data/tracks/r/exercises/grains/grains.R +7 -0
  59. data/tracks/r/exercises/grains/test_grains.R +49 -0
  60. data/tracks/r/exercises/phone-number/example.R +30 -0
  61. data/tracks/r/exercises/phone-number/phone-number.R +3 -0
  62. data/tracks/r/exercises/phone-number/test_phone-number.R +44 -0
  63. data/tracks/r/exercises/secret-handshake/example.R +26 -0
  64. data/tracks/r/exercises/secret-handshake/secret-handshake.R +3 -0
  65. data/tracks/r/exercises/secret-handshake/test_secret-handshake.R +52 -0
  66. data/tracks/r/exercises/sieve/example.R +16 -0
  67. data/tracks/r/exercises/sieve/sieve.R +3 -0
  68. data/tracks/r/exercises/sieve/test_sieve.R +37 -0
  69. data/tracks/rust/config.json +11 -0
  70. data/tracks/rust/exercises/rotational-cipher/Cargo.lock +4 -0
  71. data/tracks/rust/exercises/rotational-cipher/Cargo.toml +4 -0
  72. data/tracks/rust/exercises/rotational-cipher/example.rs +16 -0
  73. data/tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs +61 -0
  74. data/tracks/swift/circle.yml +6 -0
  75. metadata +46 -8
@@ -1,154 +1,250 @@
1
- ## Windows
1
+ # Installing Kotlin
2
2
 
3
- If you are new-ish to programming in Java, these instructions are for you. This is a step-by-step opinionated guide to getting from zero to submitting your first exercise.
3
+ In addition to the exercism CLI and your favorite text editor, practicing with Exercism exercises in Kotlin requires
4
4
 
5
+ * the **Java Development Kit** (JDK) — Kotlin compiles to Java bytecodes; you need to install the JDK which includes both a Java Runtime *and* development tools (most notably, the Java compiler); and
6
+ * **Gradle** — a build tool specifically for JVM-based projects and supports Kotlin.
5
7
 
6
- ### Install Java Development Kit 1.8
8
+ Choose your operating system:
7
9
 
10
+ * [Windows](#windows)
11
+ * [Mac OS X](#mac-os-x)
12
+ * [Linux](#linux)
8
13
 
9
- First determine if you have Java installed already.
14
+ ... or ...
15
+ * if you prefer to not use a package maanger, you can [install manually](#install-manually).
10
16
 
11
- In a Command Prompt window (Start -> Command Prompt)...
17
+ Optionally, you can also use a [Java IDE](#java-ides).
12
18
 
13
- ```
14
- C:\Users\johndoe> java -version
15
- ```
19
+ ----
16
20
 
17
- if you see:
21
+ # Windows
18
22
 
19
- ```
20
- 'java' is not recognized as an internal or external command,
21
- operable program or batch file.
22
- ```
23
+ Open an administrative command prompt. (If you need assistance opening an administrative prompt, see [open an elevated prompt in Windows 8+](http://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/) (or [Windows 7](http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/)).
23
24
 
24
- You'll need to install the JDK it contains both a Java Runtime and development tools.
25
+ 1. If you have not installed Chocolatey, do so now:
25
26
 
26
- 1. Go to [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and download the latest version of the JDK (at the time of writing, [JDK 8u91](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
27
- 2. Run the installer, using all the defaults.
27
+ ```batchfile
28
+ C:\Windows\system32> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
29
+ ```
30
+ 2. Install the JDK:
28
31
 
29
- Verify that the install worked.
32
+ ```batchfile
33
+ C:\Windows\system32> choco install jdk8
34
+ ...
35
+ C:\Windows\system32> refreshenv
36
+ ...
37
+ ```
38
+ 3. Install Gradle:
30
39
 
31
- Close any open Command Prompt windows and in a *new* Command Prompt window...
40
+ ```batchfile
41
+ C:\Windows\system32>choco install gradle
42
+ ...
43
+ ```
32
44
 
33
- ```
34
- C:\Users\johndoe> java -version
35
- ```
45
+ We recommend closing the administrative command prompt and opening a new command prompt -- you do not require administrator priviledges to practice Exercism exercises.
36
46
 
37
- You should see something like this:
47
+ You now are ready to get started with the Kotlin track of Exercism!
38
48
 
39
- ```
40
- java version "1.8.0_45"
41
- Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
42
- Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
43
- ```
49
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
44
50
 
45
- The exact version number is not important, just that version 1.8 or better is installed. Circa 2004, Sun Microsystem, in their inifinite wisdom, decided that it would be "better" to have dual numbering conventions. Java 1.8 == Java 8.0.
51
+ ----
46
52
 
47
- ### Install IntelliJ IDEA Community Edition
53
+ # Mac OS X
48
54
 
49
- Download, install and configure IntelliJ with the JDK you have installed:
55
+ Below are instructions for install using the most common method - using Homebrew. If you'd rather, you can also [install on OS X without Homebrew](#installing-on-mac-os-x-without-homebrew).
50
56
 
51
- 1. Download [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/) and run the installer; accept all the defaults.
57
+ ## Installing
52
58
 
53
- 2. Run IntelliJ (Start -> All Programs -> JetBrains -> IntelliJ IDEA Community Edition).
54
- * The first time you do, IntelliJ walks you through some initial setup. We recommend selecting a UI Theme and then just clicking "Skip All and Set Defaults".
59
+ 1. If you haven't installed [Homebrew](http://brew.sh), yet, do so now:
55
60
 
56
- 3. In the "Welcome to IntelliJ IDEA" window, open the "Configure" pull-down and select "Project Defaults", then "Project Structure".
61
+ ```sh
62
+ $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
63
+ ```
64
+ 2. Tap the [Homebrew Cask](https://caskroom.github.io/) — this allows us to install pre-built binaries like the JDK.
57
65
 
58
- 3. In the "Default Project Structure" dialog, find the "Project SDK:" section in the right panel. Click the "New..." button and select "JDK".
66
+ ```
67
+ $ brew tap caskroom/cask
68
+ ```
69
+ 3. Install the JDK:
59
70
 
60
- 4. In the "Select Home Directory for JDK" file open dialog, navigate to "`C:\Program Files\Java\jdk1.8...`". Be sure to select the JDK, not the JRE. Click "OK".
71
+ ```
72
+ $ brew cask install java
73
+ ```
74
+ 4. Install Gradle:
61
75
 
62
- 5. Back in the "Default Project Structure" dialog, in the "Project language level:" section, select "8 - Lambdas, type annotations etc.". Click "OK".
76
+ ```
77
+ $ brew install gradle
78
+ ```
63
79
 
64
- ## Mac OS X
80
+ You now are ready to get started with the Kotlin track of Exercism!
65
81
 
66
- If you are new-ish to programming in Java on Mac OS X, these instructions are for you.
67
- This is a step-by-step opinionated guide to getting from zero to submitting your first exercise.
82
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
68
83
 
69
- ### Step 1 — Install Java Development Kit 1.8
84
+ ----
70
85
 
71
- First, determine if the JDK 1.8 is installed:
86
+ # Linux
72
87
 
73
- ```bash
74
- $ java -version
75
- ```
88
+ Below are instructions for install using the package manager of your distro. If you'd rather, you can also [install on Linux without a package manager](#installing-on-linux-without-a-package-manager).
76
89
 
77
- What you do next depends on the output of that command.
90
+ * [Debian](#debian)
91
+ * [Fedora](#fedora)
78
92
 
79
- #### No JDKs Installed
93
+ ## Debian
80
94
 
81
- If you have no JDKs installed at all (e.g. you have a fresh install of Mac OS X 10.10 [Yosemite]),
82
- the OS presents a dialog:
95
+ If you are using Debian or its derivatives (like Ubuntu or Linux Mint), use APT:
83
96
 
84
- ![To use the "java," command-line tool you need to install a JDK. Click "More Info..." to visit the Java Developer Kit download website.](http://x.exercism.io/v3/tracks/java/docs/img/mac-osx--install-java-dialog.png)
97
+ *(verified on: Linux Mint 18, Ubuntu 14)*
85
98
 
86
- Clicking on the "More Info..." button takes you to the [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
99
+ 1. Install the JDK:
87
100
 
88
- Download the latest version of the JDK (at the time of writing,
89
- [JDK 8u71](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
90
- and run the installer, using all the defaults.
101
+ ```sh
102
+ $ sudo apt-get update
103
+ $ sudo apt-get install python-software-properties
104
+ $ sudo add-apt-repository ppa:webupd8team/java
105
+ $ sudo apt-get update
106
+ $ sudo apt-get install oracle-java8-installer
107
+ $ sudo apt install oracle-java8-set-default
108
+ ```
109
+ 2. Install Gradle:
91
110
 
92
- Skip down to [Verify JDK Install](#verify-jdk-install)
111
+ ```sh
112
+ $ sudo add-apt-repository ppa:cwchien/gradle
113
+ $ sudo apt-get update
114
+ $ sudo apt-get install gradle
115
+ ```
93
116
 
94
- #### Older JDKs Installed
117
+ You now are ready to get started with the Kotlin track of Exercism!
95
118
 
96
- If you see something like...
119
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
97
120
 
98
- ```bash
99
- java version "1.6.0_65"
100
- Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
101
- Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
102
- ```
121
+ ----
103
122
 
104
- Or any version that is prior to 1.8, you need to install the 1.8 JDK...
123
+ ## Fedora
105
124
 
106
- 1. Go to [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
107
- and download the latest version of the JDK (at the time of writing,
108
- [JDK 8u91](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
109
- 2. Run the installer, using all the defaults.
125
+ If you are using Fedora or its derivatives, use DNF:
110
126
 
111
- #### Verify JDK Install
127
+ *(verified on: Fedora 24)*
112
128
 
113
- Let's verify that the installation worked...
129
+ 1. Install the JDK:
114
130
 
115
- ```bash
116
- $ java -version
117
- ```
131
+ ```sh
132
+ $ sudo dnf install java-1.8.0-openjdk-devel
133
+ ```
134
+ 2. Install Gradle:
118
135
 
119
- You should see something like this:
136
+ ```sh
137
+ $ sudo dnf install gradle
138
+ ```
120
139
 
121
- ```bash
122
- java version "1.8.0_45"
123
- Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
124
- Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
125
- ```
126
140
 
127
- The exact version number is not important, just that version 1.8 or better is installed.
128
- Circa 2004, Sun Microsystem, in their inifinite wisdom, decided that it would be "better" to
129
- have dual numbering conventions. Java 1.8 == Java 8.0.
141
+ You now are ready to get started with the Kotlin track of Exercism!
130
142
 
131
- Congratulations, you've ensured you have the proper version of Java, itself, installed!
143
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
132
144
 
133
- ### Step 2 — Install IntelliJ IDEA Community Edition
145
+ ----
134
146
 
135
- Download, install and configure IntelliJ with the JDK you have installed:
147
+ # Install Manually
136
148
 
137
- 1. Download [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/) and
138
- run the installer; accept all the defaults.
149
+ * [Installing on Windows manually](#installing-on-windows-manually)
150
+ * [Installing on Mac OS X without Homebrew](#installing-on-mac-os-x-without-homebrew)
151
+ * [Installing on Linux without a package manager](#installing-on-linux-without-a-package-manager)
139
152
 
140
- 2. Run IntelliJ (`/Applications/IntelliJ IDEA CE.app`)
141
- * The first time you do, IntelliJ walks you through some initial setup. We recommend
142
- selecting a UI Theme and then just clicking "Skip All and Set Defaults".
153
+ ----
143
154
 
144
- 3. In the "Welcome to IntelliJ IDEA" window, open the "Configure" pull-down and select
145
- "Project Defaults", then "Project Structure".
155
+ ## Installing on Windows manually
146
156
 
147
- 6. In the "Default Project Structure" dialog, find the "Project SDK:" section in the right panel.
148
- Click the "New..." button and select "JDK".
157
+ *NOTE: these instructions are intended for experienced Windows users. If you don't already know how to set environment variables or feel comfortable managing the directory structure, we highly recommend you use the Chocolatey-based install, [above](#windows).*
149
158
 
150
- 5. In the "Select Home Directory for JDK" file open dialog, navigate to
151
- `/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home`. Click "OK".
159
+ 1. Install the JDK:
160
+ 1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
161
+ - Run the installer, using all the defaults.
162
+ 2. Install Gradle:
163
+ - Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
164
+ - Unzip the archive. We recommend a place like `C:\Users\JohnDoe\Tools`.
165
+ - Add a new system environment variable named `GRADLE_HOME` and set it to the path you just created (e.g. `C:\Users\JohnDoe\Tools\gradle-x.y`).
166
+ - Update the system `Path` to include the `bin` directory from Gradle's home (e.g. `Path`=`...;%GRADLE_HOME%\bin`).
167
+
168
+
169
+ You now are ready to get started with the Kotlin track of Exercism!
170
+
171
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
172
+
173
+ ----
174
+
175
+ ## Installing on Mac OS X without Homebrew
176
+
177
+ *NOTE: these instructions are intended for experienced Mac OS X users. Unless you specifically do not want to use a package manager, we highly recommend using the Homebrew-based installation instructions, [above](#mac-os-x).*
178
+
179
+ 1. Install the JDK:
180
+ 1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
181
+ 2. Run the installer, using all the defaults.
182
+ 2. Install Gradle:
183
+ 1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
184
+ 2. Unpack Gradle:
185
+
186
+ ```sh
187
+ $ mkdir ~/tools
188
+ $ cd ~/tools
189
+ $ unzip ~/Downloads/gradle-*-bin.zip
190
+ $ cd gradle*
191
+ ```
192
+ 3. Configure Gradle and add it to the path:
193
+
194
+ ```sh
195
+ $ cat << DONE >> ~/.bashrc
196
+ export GRADLE_HOME=`pwd`
197
+ export PATH=\$PATH:\$GRADLE_HOME/bin
198
+ DONE
199
+ ```
200
+
201
+
202
+ You now are ready to get started with the Kotlin track of Exercism!
203
+
204
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
205
+
206
+ ----
207
+
208
+ ## Installing on Linux without a package manager
209
+
210
+ *NOTE: these instructions are intended for experienced Linux users. Unless you specifically do not want to use a package manager, we highly recommend using the the installation instructions, [above](#linux).*
211
+
212
+ 1. Install the JDK:
213
+ 1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
214
+ 2. Run the installer, using all the defaults.
215
+ 2. Install Gradle:
216
+ 1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
217
+ 2. Unpack Gradle:
218
+
219
+ ```sh
220
+ $ mkdir ~/tools
221
+ $ cd ~/tools
222
+ $ unzip ~/Downloads/gradle-*-bin.zip
223
+ $ cd gradle*
224
+ ```
225
+ 3. Configure Gradle and add it to the path:
226
+
227
+ ```sh
228
+ $ cat << DONE >> ~/.bashrc
229
+ export GRADLE_HOME=`pwd`
230
+ export PATH=\$PATH:\$GRADLE_HOME/bin
231
+ DONE
232
+ ```
233
+
234
+ You now are ready to get started with the Kotlin track of Exercism!
235
+
236
+ To get started, see "[Running the Tests](http://exercism.io/languages/kotlin/tests)".
237
+
238
+ ----
239
+
240
+ # Java IDEs
241
+
242
+ There are many Java IDEs available. The three most popular are:
243
+
244
+ * [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) (download the "Community" edition)
245
+ - from the authors of Kotlin, this IDE provides the best support for the language.
246
+ - [Eclipse](https://www.eclipse.org/downloads/)
247
+ - [NetBeans](https://netbeans.org/downloads/) (download the "Java SE" bundle)
248
+
249
+ and there are [others](https://en.wikibooks.org/wiki/Java_Programming/Java_IDEs).
152
250
 
153
- 6. Back in the "Default Project Structure" dialog, in the "Project language level:" section,
154
- select "8 - Lambdas, type annotations etc.". Click "OK".
@@ -1,175 +1,110 @@
1
- ## Windows
1
+ # Running the Tests
2
2
 
3
- 1) In the Command Prompt window, get the first exercise...
3
+ Choose your operating system:
4
4
 
5
- ```
6
- C:\Users\johndoe> exercism fetch kotlin
5
+ * [Windows](#windows)
6
+ * [Mac OS X](#mac-os-x)
7
+ * [Linux](#linux)
7
8
 
8
- New:
9
- Kotlin (Etl) C:\Users\johndoe\exercism\kotlin\etl
9
+ ----
10
10
 
11
- unchanged: 0, updated: 0, new: 1
12
- ```
11
+ # Windows
13
12
 
14
- 2) In the "Welcome to IntelliJ IDEA" window, click the "Open" option.
13
+ 1. Open a Command Prompt.
14
+ 2. Get the first exercise:
15
15
 
16
- 3) Navigate to the "C:\Users\johndoe\exercism\kotlin\etl" folder. Make sure you've selected the "etl" folder. Click "OK".
16
+ ```batchfile
17
+ C:\Users\JohnDoe>exercism fetch kotlin
18
+ 
19
+ Not Submitted: 1 problem
20
+ Kotlin (Hello World) C:\Users\JohnDoe\exercism\kotlin\hello-world
17
21
 
18
- 4) In the "Import Project from Gradle" dialog, check the "auto-import" and "create directories" checkboxes and select "Use customizable gradle wrapper".
22
+ New: 1 problem
23
+ Kotlin (Hello World) C:\Users\JohnDoe\exercism\kotlin\hello-world
19
24
 
20
- ```
21
- Gradle project: [C:\Users\johndoe\exercism\kotlin\etl\build.gradle ](...)
25
+ unchanged: 0, updated: 0, new: 1
22
26
 
23
- [X] Use auto-import
24
- [X] Create directories for empty content roots automatically
27
+ ```
28
+ 3. Change directory into the exercism:
25
29
 
26
- ( ) Use default gradle wrapper (not configured for the current project)
27
- (o) Use customizable gradle wrapper
28
- ( ) Use local gradle distribution
30
+ ```batchfile
31
+ C:\Users\JohnDoe>cd C:\Users\JohnDoe\exercism\kotlin\hello-world
32
+ ```
29
33
 
30
- ...
31
- ```
34
+ 4. Run the tests:
32
35
 
33
- 5) Click "OK". IntelliJ will automatically create its project artifacts based on the Gradle project file.
36
+ ```batchfile
37
+ C:\Users\JohnDoe>gradle test
38
+ ```
39
+ *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
40
+ 5. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
34
41
 
35
- * After the project has loaded and you've dismissed the "Tip of the Day" dialog, you may see a notice (in the top-right-hand corner), saying, "Unindex remote maven repositories found." you can safely dismiss this notice.
36
42
 
37
- 6) Open the `README.md` file and carefully read the background for the assignment.
43
+ Good luck! Have fun!
38
44
 
39
- 7) Start by running the test suite: In the "Project" view, right-click on the test file (`etl\src\test\kotlin\EtlTest`), select "Run", then pick the "EtlTest" that has a JUnit icon to the left of it (red and green arrows), NOT the Gradle icon (circular green).
45
+ If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/kotlin/help).
40
46
 
41
- * When you first start an exercise, you should expect compilation errors because the test is setting expectations on a class that you need to write. By trying to run the tests, you get a nice list of what needs to be fixed in the "Messages Make" view.
47
+ ----
42
48
 
43
- ... and away you go!!!
49
+ # Mac OS X
44
50
 
45
- ## Mac OS X
51
+ 1. In the terminal window, get the first exercise:
46
52
 
47
- ### Get started with the first exercise
53
+ ```
54
+ $ exercism fetch kotlin
48
55
 
49
- In the terminal window, get the first exercise:
56
+ New: 1 problem
57
+ Kotlin (Etl) /Users/johndoe/exercism/kotlin/hello-world
50
58
 
51
- $ exercism fetch kotlin
59
+ unchanged: 0, updated: 0, new: 1
52
60
 
53
- Not Submitted: 1 problem
54
- Kotlin (Etl) /Users/johndoe/exercism/kotlin/etl
61
+ ```
62
+ 2. Change directory into the exercise:
55
63
 
56
- New: 1 problem
57
- Kotlin (Etl) /Users/johndoe/exercism/kotlin/etl
64
+ ```
65
+ $ cd /Users/johndoe/exercism/kotlin/hello-world
66
+ ```
67
+ 3. Run the tests:
58
68
 
59
- unchanged: 0, updated: 0, new: 1
69
+ ```
70
+ $ gradle test
71
+ ```
72
+ *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
73
+ 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
60
74
 
61
- ### Running the Tests
75
+ Good luck! Have fun!
62
76
 
63
- #### Option 1: IntelliJ
77
+ If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/kotlin/help).
64
78
 
65
- 1. In the "Welcome to IntelliJ IDEA" window, click the "Open" option.
79
+ ----
66
80
 
67
- 2. Navigate to the `/Users/johndoe/exercism/kotlin/etl` folder. Make sure you've selected the
68
- "etl" folder. Click "OK".
81
+ # Linux
69
82
 
70
- 3. In the "Import Project from Gradle" dialog, check the "auto-import" and "create directories"
71
- checkboxes and select "Use customizable gradle wrapper".
83
+ 1. In the terminal window, get the first exercise:
72
84
 
73
- ![IntelliJ 14 CE -- Gradle import dialog](http://x.exercism.io/v3/tracks/kotlin/docs/img/mac-osx--idea-ce-gradle-import-dialog.png)
85
+ ```
86
+ $ exercism fetch kotlin
74
87
 
75
- 4. Click "OK". IntelliJ will automatically create its project artifacts based on the Gradle project file.
88
+ New: 1 problem
89
+ Kotlin (Etl) /home/johndoe/exercism/kotlin/hello-world
76
90
 
77
- * After the project has loaded and you've dismissed the "Tip of the Day" dialog, you may see a
78
- notice (in the top-right-hand corner), saying, "Unindex remote maven repositories found." you can
79
- safely dismiss this notice.
91
+ unchanged: 0, updated: 0, new: 1
80
92
 
81
- 5. Open the `README.md` file and carefully read the background for the assignment.
93
+ ```
94
+ 2. Change directory into the exercise:
82
95
 
83
- 6. Start by running the test suite: In the "Project" view, right-click on the test file
84
- (`etl\src\test\kotlin\EtlTest`), select "Run", then pick the "EtlTest" that has a JUnit icon to the
85
- left of it (red and green arrows), NOT the Gradle icon (circular green).
86
- ![Run tests through IDEA JUnit Runner, NOT Gradle](http://x.exercism.io/v3/tracks/kotlin/docs/img/mac-osx--idea-ce-run-unit-tests.png)
96
+ ```
97
+ $ cd /home/johndoe/exercism/kotlin/hello-world
98
+ ```
99
+ 3. Run the tests:
87
100
 
88
- * If these menu options don't appear at first, wait for a few seconds and try again; IntelliJ is still
89
- configuring the project with a Kotlin nature.
101
+ ```
102
+ $ gradle test
103
+ ```
104
+ *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
105
+ 4. Solve the exercise. Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xkotlin/blob/master/exercises/hello-world/GETTING_STARTED.md)).
90
106
 
91
- * When you first start an exercise, you should expect compilation errors because the test is
92
- setting expectations on a class that you need to write. By trying to run the tests, you get a
93
- nice list of what needs to be fixed in the "Messages Make" view.
107
+ Good luck! Have fun!
94
108
 
95
- ... and away you go!!!
109
+ If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/kotlin/help).
96
110
 
97
- #### Option 2: Command Line
98
-
99
- The Exercism exercises for Kotlin can be built and tested from the command line using [Gradle](https://gradle.org).
100
-
101
- After [installing Gradle](https://www.jayway.com/2013/05/12/getting-started-with-gradle), you can run the tests for any exercise by running `gradle test`, as long as you're in the same directory as the `build.gradle` file:
102
-
103
- ```
104
- $ pwd
105
- /Users/johndoe/Code/exercism/kotlin/hello-world
106
-
107
- $ gradle test
108
- ...
109
-
110
- :test
111
-
112
- HelloWorldTest > helloSampleName FAILED
113
- org.junit.ComparisonFailure at HelloWorldTest.kt:25
114
-
115
- HelloWorldTest > helloNullName FAILED
116
- org.junit.ComparisonFailure at HelloWorldTest.kt:20
117
-
118
- HelloWorldTest > helloBlankName FAILED
119
- org.junit.ComparisonFailure at HelloWorldTest.kt:13
120
-
121
- HelloWorldTest > helloNoName FAILED
122
- org.junit.ComparisonFailure at HelloWorldTest.kt:8
123
-
124
- HelloWorldTest > helloAnotherSampleName FAILED
125
- org.junit.ComparisonFailure at HelloWorldTest.kt:30
126
-
127
- 5 tests completed, 5 failed
128
- :test FAILED
129
-
130
- FAILURE: Build failed with an exception.
131
-
132
- * What went wrong:
133
- Execution failed for task ':test'.
134
- > There were failing tests. See the report at: file:///Users/johndoe/Code/exercism/kotlin/hello-world/build/reports/tests/test/index.html
135
-
136
- * Try:
137
- Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
138
-
139
- BUILD FAILED
140
-
141
- Total time: 1.141 secs
142
- ```
143
-
144
- When test cases are failing, you can get more information about the failing tests by including the `test` task's `--info` option:
145
-
146
- ```
147
- $ gradle test --info
148
- ...
149
-
150
- :test
151
-
152
- ...
153
-
154
- HelloWorldTest > helloSampleName FAILED
155
- org.junit.ComparisonFailure: expected:<Hell[o], Alice!> but was:<Hell[ooo], Alice!>
156
- at org.junit.Assert.assertEquals(Assert.java:115)
157
- at kotlin.test.junit.JUnitAsserter.assertEquals(JUnitSupport.kt:23)
158
- at kotlin.test.AssertionsKt__TestAssertionsKt.assertEquals(TestAssertions.kt:29)
159
- at kotlin.test.AssertionsKt.assertEquals(Unknown Source)
160
- at kotlin.test.AssertionsKt__TestAssertionsKt.assertEquals$default(TestAssertions.kt:28)
161
- at kotlin.test.AssertionsKt.assertEquals$default(Unknown Source)
162
- at HelloWorldTest.helloSampleName(HelloWorldTest.kt:25)
163
-
164
- ...
165
-
166
- 5 tests completed, 5 failed
167
-
168
- ...
169
-
170
- BUILD FAILED
171
-
172
- Total time: 1.162 secs
173
-
174
- ...
175
- ```