trackler 2.0.3.9 → 2.0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/fixtures/tracks/fake/docs/INSTALLATION.org +1 -0
- data/lib/trackler/track.rb +13 -2
- data/lib/trackler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c41a24d19bfecac524ba828d1742f5dd81a78d48
|
|
4
|
+
data.tar.gz: 2526b87b89c6e65c6ffc8266540816990fbfc07d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd4208e7bf71183edc2811741f14ccab078586a3c9d3ce7936b743bf10ebb5d53801ef88d70587d5de4ed558a75ee53d3e4d1a99089d4b01d1c68791ee4fc736
|
|
7
|
+
data.tar.gz: 9158dfa44e38a44f708e837d90af52ee61acc18ecff1bdcc834998a846268040b4cc0d261fc2ce25d5f13fe67dc64ea75c8160d34ee672ef56ba4743a6f98ff4
|
data/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,10 @@ The changelog will not be updated for content updates.
|
|
|
15
15
|
## Next Release
|
|
16
16
|
* **Your contribution here**
|
|
17
17
|
|
|
18
|
+
## v2.0.4.0 (2016-12-16)
|
|
19
|
+
|
|
20
|
+
* Make documentation image paths configurable
|
|
21
|
+
|
|
18
22
|
## v2.0.3.0 (2016-11-29)
|
|
19
23
|
|
|
20
24
|
* Remove test fixture that breaks x-api
|
data/lib/trackler/track.rb
CHANGED
|
@@ -8,6 +8,7 @@ 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"
|
|
11
12
|
|
|
12
13
|
Image = Struct.new(:path) do
|
|
13
14
|
def exists?
|
|
@@ -80,8 +81,8 @@ module Trackler
|
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
|
|
83
|
-
def docs
|
|
84
|
-
OpenStruct.new(
|
|
84
|
+
def docs(image_path = DEFAULT_IMAGE_PATH)
|
|
85
|
+
OpenStruct.new(docs_by_topic(image_path))
|
|
85
86
|
end
|
|
86
87
|
|
|
87
88
|
def img(file_path)
|
|
@@ -159,6 +160,16 @@ module Trackler
|
|
|
159
160
|
end
|
|
160
161
|
end
|
|
161
162
|
|
|
163
|
+
def docs_by_topic(image_path)
|
|
164
|
+
Hash[
|
|
165
|
+
TOPICS.zip(
|
|
166
|
+
TOPICS.map { |topic|
|
|
167
|
+
document_contents(topic).gsub(DEFAULT_IMAGE_PATH, image_path.gsub(Regexp.new("/$"), ""))
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
]
|
|
171
|
+
end
|
|
172
|
+
|
|
162
173
|
def document_filename(topic)
|
|
163
174
|
path = File.join(dir, "docs", topic.upcase)
|
|
164
175
|
Dir.glob("%s.*" % path).sort.first
|
data/lib/trackler/version.rb
CHANGED
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.0.
|
|
4
|
+
version: 2.0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katrina Owen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubyzip
|