brief 1.17.8 → 1.17.9
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/apps/blueprint/models/epic.rb +49 -1
- data/lib/brief/data.rb +8 -1
- data/lib/brief/document.rb +5 -0
- data/lib/brief/document/rendering.rb +9 -0
- 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: faf6fee908cd26f6c56e6b7666a69a54cdd485c4
|
4
|
+
data.tar.gz: 601462587977651e9c5836442448cc18a71030b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b3796eecb3fa04b0368696d0dc83e337af1e9b0c4d037d13bb10e23f228330e9dbc85158eb3f107dff2c3479ab88e7b9c75c0bac3740a69a665f1a9bac2085
|
7
|
+
data.tar.gz: 538b9687ac9dbe8b1a240fee5484ab417347c802b9a7e37c8f0e1886b397eeda94d4eb01a11c10c404c718cc44a090a28195bb38f785dfe735deea308fb9c9e8
|
@@ -55,6 +55,24 @@ class Brief::Apps::Blueprint::Epic
|
|
55
55
|
def publish
|
56
56
|
BlueprintEpicPublisher.publish(self, via: briefcase.settings.try(:tracking_system))
|
57
57
|
end
|
58
|
+
|
59
|
+
# Converts a draft epic which contains inline feature definitions
|
60
|
+
# into individual feature files
|
61
|
+
def featurize
|
62
|
+
puts "== Generating features for #{ title }"
|
63
|
+
|
64
|
+
features_data.each do |feature|
|
65
|
+
puts " -- #{ feature.title }"
|
66
|
+
|
67
|
+
begin
|
68
|
+
generate_feature(feature.title) if feature.title
|
69
|
+
rescue => e
|
70
|
+
puts "Error generating feature: #{ feature.title } #{ e.message }".red
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
nil
|
75
|
+
end
|
58
76
|
end
|
59
77
|
|
60
78
|
helpers do
|
@@ -137,7 +155,7 @@ class Brief::Apps::Blueprint::Epic
|
|
137
155
|
# UGLY
|
138
156
|
# Promotes the h2 heading to an h1 for this document
|
139
157
|
v.gsub! "## #{ feature_heading }", "# #{ feature_heading }"
|
140
|
-
v.gsub! "###{ feature_heading }", "
|
158
|
+
v.gsub! "###{ feature_heading }", "# #{ feature_heading }"
|
141
159
|
end
|
142
160
|
end
|
143
161
|
|
@@ -216,5 +234,35 @@ class Brief::Apps::Blueprint::Epic
|
|
216
234
|
errors.each {|w| puts " -- #{ w }" }
|
217
235
|
end
|
218
236
|
end
|
237
|
+
|
238
|
+
def github_issue_body
|
239
|
+
replace_feature_content_with_issue_links
|
240
|
+
end
|
241
|
+
|
242
|
+
def github_issue_title
|
243
|
+
title
|
244
|
+
end
|
245
|
+
|
246
|
+
def replace_feature_content_with_issue_links
|
247
|
+
content
|
248
|
+
end
|
249
|
+
|
250
|
+
def github_issue_labels
|
251
|
+
[]
|
252
|
+
end
|
253
|
+
|
254
|
+
def github_milestone_number
|
255
|
+
nil
|
256
|
+
end
|
257
|
+
|
258
|
+
def github_issue_attributes
|
259
|
+
{
|
260
|
+
title: github_issue_title,
|
261
|
+
body: github_issue_body,
|
262
|
+
labels: github_issue_labels,
|
263
|
+
milestone: github_milestone_number
|
264
|
+
}
|
265
|
+
end
|
266
|
+
|
219
267
|
end
|
220
268
|
end
|
data/lib/brief/data.rb
CHANGED
@@ -23,7 +23,14 @@ module Brief
|
|
23
23
|
@sources = {}.to_mash
|
24
24
|
|
25
25
|
load_files.each do |source, data|
|
26
|
-
|
26
|
+
if data.is_a?(Hash)
|
27
|
+
@sources[source] = data.keys.inject({}.to_mash) do |memo, key|
|
28
|
+
memo[key] = Queryable.new(data[key])
|
29
|
+
memo
|
30
|
+
end
|
31
|
+
elsif data.is_a?(Array)
|
32
|
+
@sources[source] = Queryable.new(data)
|
33
|
+
end
|
27
34
|
end
|
28
35
|
end
|
29
36
|
|
data/lib/brief/document.rb
CHANGED
@@ -19,6 +19,15 @@ module Brief
|
|
19
19
|
module Rendering
|
20
20
|
extend ActiveSupport::Concern
|
21
21
|
|
22
|
+
module ClassMethods
|
23
|
+
def render_gfm(content)
|
24
|
+
html = Github::Markdown.render_pure_gfm(content)
|
25
|
+
fragment = Nokogiri::HTML.fragment(html)
|
26
|
+
fragment.css("p br").remove
|
27
|
+
fragment.to_html
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
def script_preamble
|
23
32
|
<<-EOF
|
24
33
|
<script type="text/javascript">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brief
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Soeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|