trackler 2.1.0.37 → 2.1.0.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/all-your-base/canonical-data.json +24 -24
- data/lib/trackler/version.rb +1 -1
- data/tracks/erlang/config.json +7 -0
- data/tracks/erlang/exercises/collatz-conjecture/include/exercism.hrl +11 -0
- data/tracks/erlang/exercises/collatz-conjecture/rebar.config +30 -0
- data/tracks/erlang/exercises/collatz-conjecture/src/collatz_conjecture.app.src +9 -0
- data/tracks/erlang/exercises/collatz-conjecture/src/example.erl +17 -0
- data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +24 -0
- data/tracks/typescript/.github/stale.yaml +0 -0
- data/tracks/typescript/docs/RESOURCES.md +23 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2578a7c088929fbaf69394d527e6e4be16651705
|
4
|
+
data.tar.gz: b392d1c52bf99983cf6a7c949e8af6c6419ca822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e2e3152ed5bcd9234c992de10aac828c69d6358a1a2d5f9ff8d9cd6a6d56dbebb62c6156a5a1c89915d5aa63ece237c9d5d7e5ac008811b18a3bdbff46f672
|
7
|
+
data.tar.gz: 4968a23a463b7fc7bbb3ce934fabeabe87dc0f4640f1744c6736af74d58e6827a4c3a984a3c4c1f079970c3599178292349ce6d4092655695bd559e48e55076b
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "all-your-base",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.0",
|
4
4
|
"comments": [
|
5
5
|
"It's up to each track do decide:",
|
6
6
|
"",
|
@@ -119,59 +119,59 @@
|
|
119
119
|
"expected": null
|
120
120
|
},
|
121
121
|
{
|
122
|
-
"description": "
|
122
|
+
"description": "first base is one",
|
123
123
|
"property": "rebase",
|
124
|
-
"input_base":
|
125
|
-
"input_digits": [
|
124
|
+
"input_base": 1,
|
125
|
+
"input_digits": [],
|
126
126
|
"output_base": 10,
|
127
127
|
"expected": null
|
128
128
|
},
|
129
129
|
{
|
130
|
-
"description": "
|
130
|
+
"description": "first base is zero",
|
131
131
|
"property": "rebase",
|
132
|
-
"input_base":
|
133
|
-
"input_digits": [
|
132
|
+
"input_base": 0,
|
133
|
+
"input_digits": [],
|
134
134
|
"output_base": 10,
|
135
135
|
"expected": null
|
136
136
|
},
|
137
137
|
{
|
138
|
-
"description": "first base is
|
138
|
+
"description": "first base is negative",
|
139
139
|
"property": "rebase",
|
140
|
-
"input_base":
|
141
|
-
"input_digits": [],
|
140
|
+
"input_base": -2,
|
141
|
+
"input_digits": [1],
|
142
142
|
"output_base": 10,
|
143
143
|
"expected": null
|
144
144
|
},
|
145
145
|
{
|
146
|
-
"description": "
|
146
|
+
"description": "negative digit",
|
147
147
|
"property": "rebase",
|
148
148
|
"input_base": 2,
|
149
|
-
"input_digits": [1,
|
150
|
-
"output_base":
|
149
|
+
"input_digits": [1, -1, 1, 0, 1, 0],
|
150
|
+
"output_base": 10,
|
151
151
|
"expected": null
|
152
152
|
},
|
153
153
|
{
|
154
|
-
"description": "
|
154
|
+
"description": "invalid positive digit",
|
155
155
|
"property": "rebase",
|
156
|
-
"input_base":
|
157
|
-
"input_digits": [],
|
156
|
+
"input_base": 2,
|
157
|
+
"input_digits": [1, 2, 1, 0, 1, 0],
|
158
158
|
"output_base": 10,
|
159
159
|
"expected": null
|
160
160
|
},
|
161
161
|
{
|
162
|
-
"description": "second base is
|
162
|
+
"description": "second base is one",
|
163
163
|
"property": "rebase",
|
164
|
-
"input_base":
|
165
|
-
"input_digits": [
|
166
|
-
"output_base":
|
164
|
+
"input_base": 2,
|
165
|
+
"input_digits": [1, 0, 1, 0, 1, 0],
|
166
|
+
"output_base": 1,
|
167
167
|
"expected": null
|
168
168
|
},
|
169
169
|
{
|
170
|
-
"description": "
|
170
|
+
"description": "second base is zero",
|
171
171
|
"property": "rebase",
|
172
|
-
"input_base":
|
173
|
-
"input_digits": [
|
174
|
-
"output_base":
|
172
|
+
"input_base": 10,
|
173
|
+
"input_digits": [7],
|
174
|
+
"output_base": 0,
|
175
175
|
"expected": null
|
176
176
|
},
|
177
177
|
{
|
data/lib/trackler/version.rb
CHANGED
data/tracks/erlang/config.json
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
-include_lib("eunit/include/eunit.hrl").
|
2
|
+
|
3
|
+
sut(Module) ->
|
4
|
+
{ok, Files} = file:list_dir("./src"),
|
5
|
+
case lists:member(atom_to_list(Module) ++ ".erl", Files) of
|
6
|
+
true -> Module;
|
7
|
+
false -> example
|
8
|
+
end.
|
9
|
+
|
10
|
+
version_test() ->
|
11
|
+
?assertMatch(?TEST_VERSION, ?TESTED_MODULE:test_version()).
|
@@ -0,0 +1,30 @@
|
|
1
|
+
%% Erlang compiler options
|
2
|
+
{erl_opts, [debug_info]}.
|
3
|
+
|
4
|
+
{deps, []}.
|
5
|
+
|
6
|
+
{dialyzer, [
|
7
|
+
{warnings, [underspecs, no_return]},
|
8
|
+
{get_warnings, true},
|
9
|
+
{plt_apps, top_level_deps}, % top_level_deps | all_deps
|
10
|
+
{plt_extra_apps, []},
|
11
|
+
{plt_location, local}, % local | "/my/file/name"
|
12
|
+
{plt_prefix, "rebar3"},
|
13
|
+
{base_plt_apps, [stdlib, kernel, crypto]},
|
14
|
+
{base_plt_location, global}, % global | "/my/file/name"
|
15
|
+
{base_plt_prefix, "rebar3"}
|
16
|
+
]}.
|
17
|
+
|
18
|
+
%% eunit:test(Tests)
|
19
|
+
{eunit_tests, []}.
|
20
|
+
%% Options for eunit:test(Tests, Opts)
|
21
|
+
{eunit_opts, [verbose]}.
|
22
|
+
|
23
|
+
%% == xref ==
|
24
|
+
|
25
|
+
{xref_warnings, true}.
|
26
|
+
|
27
|
+
%% xref checks to run
|
28
|
+
{xref_checks, [undefined_function_calls, undefined_functions,
|
29
|
+
locals_not_used, exports_not_used,
|
30
|
+
deprecated_function_calls, deprecated_functions]}.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
-module(example).
|
2
|
+
|
3
|
+
-export([steps/1,
|
4
|
+
test_version/0]).
|
5
|
+
|
6
|
+
steps(N) when N =< 0 -> {error, "Only strictly positive numbers are allowed"};
|
7
|
+
steps(N) ->
|
8
|
+
steps(N, 0).
|
9
|
+
|
10
|
+
test_version() ->
|
11
|
+
1.
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
steps(1, Acc) -> Acc;
|
16
|
+
steps(N, Acc) when N rem 2 =:= 0 -> steps(N div 2, Acc + 1);
|
17
|
+
steps(N, Acc) -> steps(3 * N + 1, Acc + 1).
|
@@ -0,0 +1,24 @@
|
|
1
|
+
-module('collatz_conjecture_tests').
|
2
|
+
|
3
|
+
-define(TESTED_MODULE, (sut(collatz_conjecture))).
|
4
|
+
-define(TEST_VERSION, 1).
|
5
|
+
-include("exercism.hrl").
|
6
|
+
|
7
|
+
|
8
|
+
zero_steps_for_one_test() ->
|
9
|
+
?assertEqual(0, ?TESTED_MODULE:steps(1)).
|
10
|
+
|
11
|
+
divide_if_even_test() ->
|
12
|
+
?assertEqual(4, ?TESTED_MODULE:steps(16)).
|
13
|
+
|
14
|
+
even_and_odd_steps_test() ->
|
15
|
+
?assertEqual(9, ?TESTED_MODULE:steps(12)).
|
16
|
+
|
17
|
+
large_number_of_even_and_odd_steps_test() ->
|
18
|
+
?assertEqual(152, ?TESTED_MODULE:steps(1000000)).
|
19
|
+
|
20
|
+
zero_is_an_error_test() ->
|
21
|
+
?assertEqual({error, "Only strictly positive numbers are allowed"}, ?TESTED_MODULE:steps(0)).
|
22
|
+
|
23
|
+
negative_value_is_an_error_test() ->
|
24
|
+
?assertEqual({error, "Only strictly positive numbers are allowed"}, ?TESTED_MODULE:steps(-15)).
|
File without changes
|
@@ -5,3 +5,26 @@
|
|
5
5
|
* [ECMAScript 2015 Language Specification](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) (pdf)
|
6
6
|
* [Mozilla JavaScript Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference)
|
7
7
|
|
8
|
+
## Editors
|
9
|
+
|
10
|
+
### Free/Open-Source
|
11
|
+
|
12
|
+
* [VS Code](https://code.visualstudio.com)
|
13
|
+
|
14
|
+
VS Code is an open-source code editor. You can find information on how to set up TypeScript [here](https://code.visualstudio.com/docs/languages/typescript). VS Code is a popular editor for TypeScript because Microsoft teams maintain both VS Code and TypeScript, so it works well with the language; VS Code supports TS without any extra configuration. In fact, VS Code was [written using TypeScript](https://github.com/Microsoft/vscode/tree/master/src/vs)!
|
15
|
+
|
16
|
+
A common issue with VS Code and TS is when your editor and project versions are different, which can cause VS Code to display a possibly confusing error message. Instructions on how to handle this error are [here](https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions)
|
17
|
+
|
18
|
+
* [Atom](https://atom.io)
|
19
|
+
|
20
|
+
Atom is an open-source code editor maintained by a team at Github. Atom uses packages to add features, and there is an [atom-typescript](https://atom.io/packages/atom-typescript) package available. To install it, you install Atom from the link above, and when you open Atom you will be prompted on the introduction page to look at popular packages. You can search for atom-typescript there.
|
21
|
+
|
22
|
+
### Licensed
|
23
|
+
|
24
|
+
* [Sublime Text](https://www.sublimetext.com)
|
25
|
+
|
26
|
+
Sublime Text is a popular code editor with support for most languages through installable plugins. It is free to try, but you will be regularly prompted to buy a license, which currently costs $70 USD.
|
27
|
+
|
28
|
+
* [WebStorm](https://www.jetbrains.com/webstorm/buy/#edition=commercial)
|
29
|
+
|
30
|
+
WebStorm is a fully-featured JavaScript/TypeScript IDE (Integrated Development Environment). It supports TypeScript with no extra configuration and has integrated testing, debugging and code analysis. It is free to try for 30 days, then an annual license costs $129 USD.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.
|
4
|
+
version: 2.1.0.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -3010,6 +3010,11 @@ files:
|
|
3010
3010
|
- tracks/erlang/exercises/clock/src/clock.app.src
|
3011
3011
|
- tracks/erlang/exercises/clock/src/example.erl
|
3012
3012
|
- tracks/erlang/exercises/clock/test/clock_tests.erl
|
3013
|
+
- tracks/erlang/exercises/collatz-conjecture/include/exercism.hrl
|
3014
|
+
- tracks/erlang/exercises/collatz-conjecture/rebar.config
|
3015
|
+
- tracks/erlang/exercises/collatz-conjecture/src/collatz_conjecture.app.src
|
3016
|
+
- tracks/erlang/exercises/collatz-conjecture/src/example.erl
|
3017
|
+
- tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl
|
3013
3018
|
- tracks/erlang/exercises/difference-of-squares/include/exercism.hrl
|
3014
3019
|
- tracks/erlang/exercises/difference-of-squares/rebar.config
|
3015
3020
|
- tracks/erlang/exercises/difference-of-squares/src/difference_of_squares.app.src
|
@@ -9123,6 +9128,7 @@ files:
|
|
9123
9128
|
- tracks/teco/docs/TESTS.md
|
9124
9129
|
- tracks/teco/exercises/.keep
|
9125
9130
|
- tracks/typescript/.git
|
9131
|
+
- tracks/typescript/.github/stale.yaml
|
9126
9132
|
- tracks/typescript/.gitignore
|
9127
9133
|
- tracks/typescript/.travis.yml
|
9128
9134
|
- tracks/typescript/Dangerfile
|