spec_views 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spec_views/base_matcher.rb +3 -2
- data/app/models/spec_views/directory.rb +17 -8
- data/lib/spec_views/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af819d4fc2aa2487c81eb455030288533b00153f6fde05a5152211734c1625c1
|
4
|
+
data.tar.gz: c3b653db474cd69198cf0ccdd9be78a9c224be98a8802bcb0d4941553081e20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5e1a78b8fe0cea35ab90985f35eeb512e12c262171a3279c1aead04f754aef40c29adf9e236d58d844a59f36f05fd8fea1f4ec16c6809b97e7f051dc15e978b
|
7
|
+
data.tar.gz: 296860d1ef38ce4136d7a5a61229aa5ece286c9aeaef409d0688eaf801e7e631fe0019bfd91370ebf077a029ecf2d63564d32a08e871ff17f837b2eb5560cb92
|
@@ -14,7 +14,7 @@ module SpecViews
|
|
14
14
|
@directory = SpecViews::Directory.for_description(description, content_type: content_type)
|
15
15
|
@extractor_failure = @extractor.extractor_failure?
|
16
16
|
@match = !extractor_failure? && match_challenger
|
17
|
-
directory.
|
17
|
+
directory.write_last_run(run_time) if champion_html
|
18
18
|
return if match?
|
19
19
|
|
20
20
|
if extractor_failure?
|
@@ -25,7 +25,8 @@ module SpecViews
|
|
25
25
|
@failure_message = "#{subject_name} has changed."
|
26
26
|
@failure_message = "#{subject_name} has been added." if champion_html.nil?
|
27
27
|
|
28
|
-
directory.
|
28
|
+
directory.write_last_run(run_time)
|
29
|
+
directory.write_meta(description, type, content_type)
|
29
30
|
@directory.write_challenger(challenger_body)
|
30
31
|
end
|
31
32
|
|
@@ -69,11 +69,11 @@ module SpecViews
|
|
69
69
|
path.join('meta.txt')
|
70
70
|
end
|
71
71
|
|
72
|
-
def write_meta(description,
|
72
|
+
def write_meta(description, spec_type, content_type)
|
73
73
|
FileUtils.mkdir_p(path)
|
74
74
|
lines = [
|
75
75
|
description.to_s.gsub("\n", ' '),
|
76
|
-
|
76
|
+
'',
|
77
77
|
spec_type.to_s,
|
78
78
|
content_type.to_s
|
79
79
|
]
|
@@ -90,12 +90,6 @@ module SpecViews
|
|
90
90
|
name
|
91
91
|
end
|
92
92
|
|
93
|
-
def last_run
|
94
|
-
Time.zone.parse(meta[1])
|
95
|
-
rescue Errno::ENOENT
|
96
|
-
Time.zone.at(0)
|
97
|
-
end
|
98
|
-
|
99
93
|
def spec_type
|
100
94
|
ActiveSupport::StringInquirer.new(meta[2])
|
101
95
|
rescue Errno::ENOENT
|
@@ -114,6 +108,21 @@ module SpecViews
|
|
114
108
|
content_type.pdf?
|
115
109
|
end
|
116
110
|
|
111
|
+
def last_run_path
|
112
|
+
path.join('last_run.txt')
|
113
|
+
end
|
114
|
+
|
115
|
+
def write_last_run(run_time)
|
116
|
+
FileUtils.mkdir_p(path)
|
117
|
+
File.write(last_run_path, run_time.to_s)
|
118
|
+
end
|
119
|
+
|
120
|
+
def last_run
|
121
|
+
Time.zone.parse(File.read(last_run_path).strip)
|
122
|
+
rescue Errno::ENOENT
|
123
|
+
Time.zone.at(0)
|
124
|
+
end
|
125
|
+
|
117
126
|
private
|
118
127
|
|
119
128
|
def splitted_description
|
data/lib/spec_views/version.rb
CHANGED