trackler 1.0.4.1 → 2.0.0.0

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: 666616edfee42aeefbcb127b51ba18fe325933f8
4
- data.tar.gz: 186cd5b3ca66ed36e9cc12f3b183c18f44c2f08d
3
+ metadata.gz: 86fe3d1c913914d40f4165113ee9a0c7a99d9df4
4
+ data.tar.gz: 3a641896c1d89ed920a28d38915590d3301d07b3
5
5
  SHA512:
6
- metadata.gz: a211e0c662bae14dd0c3242238f6f147d1a3d5fc090fecf16a9809fc4a7163c6a7cc665fb4a18eabc78ee43e58b0b35d316ac832e8aa2e8242f0a753d4e17163
7
- data.tar.gz: 4ea81249e8ab5d409d956410792f277c2ca4ed7d8e28eb724d52ad8f8302e1b482028003675e050b4c544ca904a235070f197162b3529be50eb08c12db636969
6
+ metadata.gz: 3db27fe235eccf6eab8d4d4c374e3d760468e95aba0c437255a2b303f9eea44dc9980416171dfa8a8662f8e0d9f8f9f160cad2c2f6a2780f26e03f1aa54b684e
7
+ data.tar.gz: 73b0a528842f91407430543ef748810906113146ac270cb5501ce4e52e88197fa2b948a2053e72cdd82d99880c88a6d7f9ca7bcd29d1aca44e83194c576cca4c
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.0.0 (2016-10-22)
19
+
20
+ * Fix domain concept confusion on Tracks. **Backwards incompatible**
21
+
18
22
  ## v1.0.4.0 (2016-10-21)
19
23
 
20
24
  * Provide a list of unimplemented exercises for a track
@@ -42,7 +42,11 @@ module Trackler
42
42
  end
43
43
 
44
44
  def implementations
45
- @implementations ||= Implementations.new(id, repository, problems, root)
45
+ @implementations ||= Implementations.new(id, repository, active_slugs, root)
46
+ end
47
+
48
+ def problems
49
+ @problems ||= implementations.map(&:problem)
46
50
  end
47
51
 
48
52
  def checklist_issue
@@ -67,20 +71,6 @@ module Trackler
67
71
  end
68
72
  end
69
73
 
70
- %w(exercises deprecated foregone).each do |name|
71
- define_method name do
72
- config[name] || []
73
- end
74
- end
75
-
76
- def problems
77
- exercises.empty? ? exercises_in_deprecated_key : exercises.map { |ex| ex["slug"] }
78
- end
79
-
80
- def exercises_in_deprecated_key
81
- config["problems"] || []
82
- end
83
-
84
74
  def test_pattern
85
75
  if config.key?('test_pattern')
86
76
  Regexp.new(config['test_pattern'])
@@ -97,10 +87,6 @@ module Trackler
97
87
  Image.new(File.join(dir, file_path))
98
88
  end
99
89
 
100
- def slugs
101
- problems + foregone + deprecated
102
- end
103
-
104
90
  def doc_format
105
91
  default_format = 'md'
106
92
  path = File.join(dir, "docs", "*.*")
@@ -111,8 +97,36 @@ module Trackler
111
97
  @zip ||= file_bundle.zip
112
98
  end
113
99
 
100
+ # Every slug mentioned in the configuration.
101
+ def slugs
102
+ active_slugs + foregone_slugs + deprecated_slugs
103
+ end
104
+
114
105
  private
115
106
 
107
+ # The slugs for the problems that are currently in the track.
108
+ # We deprecated the old array of problem slugs in favor of an array
109
+ # containing richer metadata about a given exercise.
110
+ def active_slugs
111
+ __active_slugs__.empty? ? __active_slugs_deprecated_key__ : __active_slugs__
112
+ end
113
+
114
+ def __active_slugs__
115
+ (config["exercises"] || []).map { |ex| ex["slug"] }
116
+ end
117
+
118
+ def __active_slugs_deprecated_key__
119
+ config["problems"] || []
120
+ end
121
+
122
+ def foregone_slugs
123
+ config["foregone"] || []
124
+ end
125
+
126
+ def deprecated_slugs
127
+ config["deprecated"] || []
128
+ end
129
+
116
130
  def most_popular_format(path)
117
131
  formats = Dir.glob(path).map do |filename|
118
132
  File.extname(filename).sub(/^\./, '')
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "1.0.4.1"
2
+ VERSION = "2.0.0.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: 1.0.4.1
4
+ version: 2.0.0.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-10-21 00:00:00.000000000 Z
11
+ date: 2016-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip