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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a91f7979567f492ab8b002b66d7fcf8cd716625
4
- data.tar.gz: 840ec796d75143f63a21446537e2c4e22f496cbd
3
+ metadata.gz: c41a24d19bfecac524ba828d1742f5dd81a78d48
4
+ data.tar.gz: 2526b87b89c6e65c6ffc8266540816990fbfc07d
5
5
  SHA512:
6
- metadata.gz: cda059d0a0316df945dc469f2900a469475254447508e10b91fdf51b07633a83e5c9f931fc4b2441be111168e03ef48bd5af8c79c3f7ce91e3f0504c121021ed
7
- data.tar.gz: 952113e3d6b6b64e8a345fcb867dbe37a215f93e452b76f8d02ec93494d8cb622bbab4e7dbbacc7a532b2cf279f9611b10b2e21c8ddbdc58a1a65bae40bbd77a
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
@@ -1 +1,2 @@
1
1
  Installing
2
+ ![](/docs/img/test.jpg)
@@ -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( Hash[TOPICS.zip(TOPICS.map { |topic| document_contents(topic) })] )
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
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.3.9"
2
+ VERSION = "2.0.4.0"
3
3
  end
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.3.9
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-15 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip