trackler 2.1.0.46 → 2.1.0.47

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99aa3467314af74f350baacb1ffb1152c8975bf4
4
- data.tar.gz: 5bdea88b725cba0d5e725efe8c775c49e8384805
3
+ metadata.gz: abacbba140846c7009970e81e498b44890347f87
4
+ data.tar.gz: 5e654ab7a1f5089d53b4b3b43769045ad5670417
5
5
  SHA512:
6
- metadata.gz: 418d4afa86ee86fdfaa7bea540cb02ad939990c57aabbe74ca81341e6a94dc6229380d38010ef17f940c9e4f95f97156b862f7da3413ccd2a971f4e8b67886ab
7
- data.tar.gz: 1247e2b9b602cf579781bc1d3b10eda8d9e3272896e142e880feb3b9bbc915c2e9096d92115665380cf0dfef54e2139b002664f4f32fca99b657fb5daed377f0
6
+ metadata.gz: 8e4ffd2d17ebe5674921d9aa886e492a749f6abd2d50c5d2918ec0188c8f4bf6144adb85391400fedfcb8424ad7e9edf374ff06da2ce5acb4c15d2251532e6cb
7
+ data.tar.gz: 0647a113a9dc3e90ba82beacb0c8b6696ea20c01d7f38234ace4513230b2ae711034e18d6ea555b2af2c712470e34f3d321f18852006095755455fa2805c0462
data/.gitmodules CHANGED
@@ -181,3 +181,6 @@
181
181
  [submodule "tracks/fortran"]
182
182
  path = tracks/fortran
183
183
  url = https://github.com/exercism/xfortran
184
+ [submodule "tracks/dartlang"]
185
+ path = tracks/dartlang
186
+ url = https://github.com/exercism/dartlang
@@ -0,0 +1 @@
1
+ ![](/docs/img/test.jpg)
@@ -0,0 +1,75 @@
1
+ class DocFile
2
+ DEFAULT_IMAGE_PATH = "/docs/img"
3
+
4
+ def self.find(basename:, track_dir:)
5
+ dir = File.join(track_dir, "docs")
6
+
7
+ [
8
+ MarkdownFile.new(basename: basename, docs_dir: dir),
9
+ OrgmodeFile.new(basename: basename, docs_dir: dir),
10
+ ].detect(&:exist?) || NullFile.new(basename: basename, docs_dir: dir)
11
+ end
12
+
13
+ attr_reader :basename, :dir
14
+ def initialize(basename:, docs_dir:)
15
+ @basename = basename
16
+ @dir = docs_dir
17
+ end
18
+
19
+ def render(image_path: DEFAULT_IMAGE_PATH)
20
+ body.gsub(img_src, img_dst(image_path))
21
+ end
22
+
23
+ def name
24
+ "%s.%s" % [basename, extension]
25
+ end
26
+
27
+ def extension
28
+ "md"
29
+ end
30
+
31
+ def exist?
32
+ File.exist?(path)
33
+ end
34
+
35
+ private
36
+
37
+ def body
38
+ File.read(path)
39
+ end
40
+
41
+ def path
42
+ File.join(dir, name)
43
+ end
44
+
45
+ def img_src
46
+ Regexp.new("]\\(%s" % DEFAULT_IMAGE_PATH)
47
+ end
48
+
49
+ def img_dst(image_path)
50
+ "](%s" % image_path.gsub(Regexp.new("/$"), "")
51
+ end
52
+ end
53
+
54
+ class OrgmodeFile < DocFile
55
+ def body
56
+ Orgmode::Parser.new(File.read(path)).to_markdown
57
+ end
58
+
59
+ def extension
60
+ "org"
61
+ end
62
+ end
63
+
64
+ class MarkdownFile < DocFile
65
+ end
66
+
67
+ class NullFile < DocFile
68
+ def render(image_path:"")
69
+ ""
70
+ end
71
+
72
+ def exist?
73
+ false
74
+ end
75
+ end
@@ -8,7 +8,6 @@ module Trackler
8
8
  # Track is a collection of exercises in a given language.
9
9
  class Track
10
10
  TOPICS = %w(about installation tests learning resources)
11
- DEFAULT_IMAGE_PATH = "/docs/img"
12
11
 
13
12
  Image = Struct.new(:path) do
14
13
  def exists?
@@ -88,7 +87,7 @@ module Trackler
88
87
  config.fetch('ignore_pattern', 'example')
89
88
  end
90
89
 
91
- def docs(image_path: DEFAULT_IMAGE_PATH)
90
+ def docs(image_path: DocFile::DEFAULT_IMAGE_PATH)
92
91
  OpenStruct.new(docs_by_topic(image_path))
93
92
  end
94
93
 
@@ -116,19 +115,11 @@ module Trackler
116
115
  end
117
116
 
118
117
  def hints
119
- if File.exist?(track_hints_filename)
120
- File.read(track_hints_filename)
121
- else
122
- ""
123
- end
118
+ docfile = DocFile.find(basename: 'EXERCISE_README_INSERT', track_dir: dir).render
124
119
  end
125
120
 
126
121
  private
127
122
 
128
- def track_hints_filename
129
- File.join(dir, 'docs', 'EXERCISE_README_INSERT.md')
130
- end
131
-
132
123
  def active_slugs
133
124
  (config["exercises"] || []).map { |ex| ex["slug"] }
134
125
  end
@@ -156,35 +147,16 @@ module Trackler
156
147
  File.join(dir, "config.json")
157
148
  end
158
149
 
159
- def document_contents(topic)
160
- filename = document_filename(topic)
161
- case filename
162
- when /\.md$/
163
- File.read(filename)
164
- when /\.org$/
165
- Orgmode::Parser.new(File.read(filename)).to_markdown
166
- else
167
- ''
168
- end
169
- end
170
-
171
150
  def docs_by_topic(image_path)
172
- src = Regexp.new("]\\(%s" % DEFAULT_IMAGE_PATH)
173
- dst = "](%s" % image_path.gsub(Regexp.new("/$"), "")
174
151
  Hash[
175
152
  TOPICS.zip(
176
153
  TOPICS.map { |topic|
177
- document_contents(topic).gsub(src, dst)
154
+ DocFile.find(basename: topic.upcase, track_dir: dir).render(image_path: image_path)
178
155
  }
179
156
  )
180
157
  ]
181
158
  end
182
159
 
183
- def document_filename(topic)
184
- path = File.join(dir, "docs", topic.upcase)
185
- Dir.glob("%s.*" % path).sort.first
186
- end
187
-
188
160
  def svg_icon
189
161
  @svg_icon ||= Image.new(File.join(dir, "img/icon.svg"))
190
162
  end
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.1.0.46"
2
+ VERSION = "2.1.0.47"
3
3
  end
@@ -0,0 +1 @@
1
+ gitdir: ../../.git/modules/tracks/dartlang
@@ -0,0 +1,23 @@
1
+ Thank you for this PR! :tada:
2
+
3
+ When we review your submission we will check the following:
4
+
5
+ - [ ] TODO: Update this list based on the appropriate checks for this specific track
6
+ - [ ] No trailing whitespace nor extraneous blank lines
7
+ - [ ] Proper indentation and consistent code formatting
8
+ - [ ] Free from spelling and grammatical errors
9
+ - [ ] Readable code style
10
+ - [ ] Exemplifies the idioms of {{LANGUAGE}}
11
+ - [ ] Absence of non-standard libraries
12
+ - [ ] No extraneous configuration files
13
+ - [ ] Free of development/debug artifacts such as `puts`, `console.log`, or `debugger` calls
14
+
15
+ If you are submitting a new exercise, we will compare your submission to the common guidelines set out for the exercise in [exercism/problem-specifications](https://github.com/exercism/problem-specifications/tree/master/exercises).
16
+
17
+ Your submission will be run through a series of automated tests and checks. The outcome will be displayed below. In addition to the test suite, the following issues are automatically checked:
18
+
19
+ - TODO: Update this list based on the linting available for this specific track
20
+ - No trailing whitespace nor extraneous blank lines
21
+ - Proper indentation and consistent code formatting
22
+ - Spelling and grammatical errors
23
+ - Compiler and deprecation warnings
@@ -0,0 +1,4 @@
1
+ *.swp
2
+ .DS_Store
3
+ bin/configlet
4
+ bin/configlet.exe
@@ -0,0 +1,5 @@
1
+ language: bash
2
+
3
+ script:
4
+ - bin/fetch-configlet
5
+ - bin/configlet .
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Exercism, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,72 @@
1
+ # Exercism Dart Track
2
+
3
+ ![build status](https://travis-ci.org/exercism/{{SLUG}}.svg?branch=master)
4
+
5
+ Exercism exercises in Dart.
6
+
7
+ ## Setup
8
+
9
+ The simplest way to install Dart is ...
10
+
11
+ ## Contributing
12
+
13
+ Thank you so much for contributing! :tada:
14
+
15
+ Please read about how to [get involved in a track](https://github.com/exercism/docs/tree/master/contributing-to-language-tracks). Be sure to read the Exercism [Code of Conduct](https://github.com/exercism/exercism.io/blob/master/CODE_OF_CONDUCT.md).
16
+
17
+ We welcome pull requests of all kinds. No contribution is too small.
18
+
19
+ We encourage contributions that provide fixes and improvements to existing exercises. Please note that this track's exercises must conform to the standards determined in the [exercism/problem-specifications](https://github.com/exercism/problem-specifications) repo. Changes to the tests or documentation of a common exercise will often warrant a PR in that repo before it can be incorporated into this track's exercises. If you're unsure, then go ahead and open a GitHub issue, and we'll discuss the change.
20
+
21
+ ## Exercise Tests ##
22
+
23
+ At the most basic level, Exercism is all about the tests. They drive the user's implementation forward and tell them when the exercise is complete.
24
+
25
+ The utmost care and attention should be used when adding or making changes to the tests for an exercise. When implementing an exercise test suite, we want to provide a good user experience for the people writing a solution to the exercise. People should not be confused or overwhelmed.
26
+
27
+ We simulate Test-Driven Development (TDD) by implementing the tests in order of increasing complexity. We try to ensure that each test either
28
+
29
+ - helps triangulate a solution to be more generic, or
30
+ - requires new functionality incrementally.
31
+
32
+ Test files should use the following format:
33
+
34
+ ```
35
+ # include the body of an example test
36
+ ```
37
+
38
+ ## Submitting a Pull Request ##
39
+
40
+ Please keep the following in mind:
41
+
42
+ - Pull requests should be focused on a single exercise, issue, or change.
43
+
44
+ - We welcome changes to code style, and wording. Please open a separate PR for these changes if possible.
45
+
46
+ - Please open an issue before creating a PR that makes significant (breaking) changes to an existing exercise or makes changes across many exercises. It is best to discuss these changes before doing the work. Discussions related to exercises that are not track specific can be found in [exercism/discussions](https://github.com/exercism/discussions/issues).
47
+
48
+ - Follow the coding standards for Dart. (If there is a formatter for the track's language, add instructions for using it here.)
49
+
50
+ - Watch out for trailing spaces, extra blank lines, and spaces in blank lines.
51
+
52
+ - All the tests for Dart exercises can be run from the top level of the repo with ... Please run this command before submitting your PR.
53
+
54
+ ## Contributing a New Exercise ##
55
+
56
+ - All Exercism exercises must be defined in [problem-specifications](https://github.com/exercism/problem-specifications/tree/master/exercises) before they are implemented for a specific track. Please submit a PR there if your exercise is new to Exercism.
57
+
58
+ - Please make sure the new exercise conforms to specifications in the [exercism/problem-specifications](https://github.com/exercism/problem-specifications) repo.
59
+
60
+ - Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.
61
+
62
+ - Exercises should use only the Dart core libraries.
63
+
64
+ - Please do not add a README or README.md file to the exercise directory. The READMEs are constructed using shared metadata, which lives in the
65
+ [exercism/problem-specifications](https://github.com/exercism/problem-specifications) repository. Further explanation can be found in [fixing-exercise-readmes](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/exercise-readmes.md)
66
+
67
+ - Each exercise should have a test suite, an example solution, a template file for the real implementation and ... (anything else that needs to go with each exercise for this track). The CI build expects files to be named using the following convention: (describe the Dart convention for naming the various files that make up an exercise).
68
+
69
+ - Please do not commit any configuration files or directories inside the exercise other than ...
70
+
71
+ - Be sure to add it to the appropriate place in the `config.json` file. Also, please run `bin/fetch-configlet && bin/configlet` to ensure the exercise is configured correctly.
72
+
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+
3
+ LATEST=https://github.com/exercism/configlet/releases/latest
4
+
5
+ OS=$(
6
+ case $(uname) in
7
+ (Darwin*)
8
+ echo "mac";;
9
+ (Linux*)
10
+ echo "linux";;
11
+ (Windows*)
12
+ echo "windows";;
13
+ (*)
14
+ echo "linux";;
15
+ esac)
16
+
17
+ ARCH=$(
18
+ case $(uname -m) in
19
+ (*64*)
20
+ echo 64bit;;
21
+ (*686*)
22
+ echo 32bit;;
23
+ (*386*)
24
+ echo 32bit;;
25
+ (*)
26
+ echo 64bit;;
27
+ esac)
28
+
29
+ VERSION="$(curl --head --silent $LATEST | awk -v FS=/ '/Location:/{print $NF}' | tr -d '\r')"
30
+ URL=https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.tgz
31
+
32
+ curl -s --location $URL | tar xz -C bin/
@@ -0,0 +1,16 @@
1
+ {
2
+ "slug": "dartlang",
3
+ "language": "Dart",
4
+ "repository": "https://github.com/exercism/xdartlang",
5
+ "active": false,
6
+ "test_pattern": "TODO",
7
+ "exercises": [
8
+
9
+ ],
10
+ "deprecated": [
11
+
12
+ ],
13
+ "foregone": [
14
+
15
+ ]
16
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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.46
4
+ version: 2.1.0.47
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-30 00:00:00.000000000 Z
11
+ date: 2017-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -480,6 +480,7 @@ files:
480
480
  - fixtures/tracks/fake/docs/INSTALLATION.org
481
481
  - fixtures/tracks/fake/docs/LEARNING.org
482
482
  - fixtures/tracks/fake/docs/RESOURCES.org
483
+ - fixtures/tracks/fake/docs/STRAY.md
483
484
  - fixtures/tracks/fake/docs/TESTS.md
484
485
  - fixtures/tracks/fake/docs/img/test.jpg
485
486
  - fixtures/tracks/fake/docs/img/test.png
@@ -528,6 +529,7 @@ files:
528
529
  - fixtures/tracks/vehicles/config.json
529
530
  - lib/trackler.rb
530
531
  - lib/trackler/description.rb
532
+ - lib/trackler/doc_file.rb
531
533
  - lib/trackler/file_bundle.rb
532
534
  - lib/trackler/guaranteed_file.rb
533
535
  - lib/trackler/implementation.rb
@@ -1983,6 +1985,21 @@ files:
1983
1985
  - tracks/csharp/generators/generate.ps1
1984
1986
  - tracks/csharp/generators/generate.sh
1985
1987
  - tracks/csharp/img/icon.png
1988
+ - tracks/dartlang/.git
1989
+ - tracks/dartlang/.github/PULL_REQUEST_TEMPLATE.md
1990
+ - tracks/dartlang/.gitignore
1991
+ - tracks/dartlang/.travis.yml
1992
+ - tracks/dartlang/LICENSE
1993
+ - tracks/dartlang/README.md
1994
+ - tracks/dartlang/bin/fetch-configlet
1995
+ - tracks/dartlang/config.json
1996
+ - tracks/dartlang/docs/ABOUT.md
1997
+ - tracks/dartlang/docs/EXERCISE_README_INSERT.md
1998
+ - tracks/dartlang/docs/INSTALLATION.md
1999
+ - tracks/dartlang/docs/LEARNING.md
2000
+ - tracks/dartlang/docs/RESOURCES.md
2001
+ - tracks/dartlang/docs/TESTS.md
2002
+ - tracks/dartlang/img/.keep
1986
2003
  - tracks/delphi/.git
1987
2004
  - tracks/delphi/.github/stale.yml
1988
2005
  - tracks/delphi/.gitignore