Skip to content

Commit 29ad725

Browse files
authored
[BC-17787] bmt-ruby add caption and tools to items (#7)
1 parent d30b92b commit 29ad725

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

lib/bmt/item.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
module BMT
22
class Item
3-
attr_reader :key, :title, :description, :vrt_category, :step
3+
attr_reader :key, :title, :caption, :description, :tools, :vrt_category, :step
44

55
def initialize(step:, attributes:)
66
@step = step
77
@key = attributes['key']
88
@title = attributes['title']
9+
@caption = attributes['caption']
910
@description = attributes['description']
11+
@tools = attributes['tools']
1012
@vrt_category = attributes['vrt_category']
1113
end
1214
end

lib/bmt/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Bmt
2-
VERSION = '0.1.1'.freeze
2+
VERSION = '0.2.0'.freeze
33
end

spec/bmt/item_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
expect(subject.key).to eq('marsupial')
2424
expect(subject.title).to be_a(String)
2525
expect(subject.description).to be_a(String)
26+
expect(subject.caption).to be_a(String)
27+
expect(subject.tools).to be_a(String)
2628
expect(subject.vrt_category).to be_a(String)
2729
expect(subject.step).to eq(step)
2830
end

spec/sample/2.1/methodologies/outback-animal-testing.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,24 @@
1515
{
1616
"key": "marsupial",
1717
"title": "Is it a marsupial?",
18-
"description": "Marsupials are obviously mammalian and have a pouch on their underside",
18+
"caption": "Marsupials are obviously mammalian and have a pouch on their underside",
19+
"description": "Check for the pouch",
20+
"tools": "Eyes",
1921
"vrt_category": "insecure_data_storage"
2022
},
2123
{
2224
"key": "diet",
2325
"title": "Make sure it eats eucalyptus",
24-
"description": "Almost no other animal can eat eucaluptus leaves, so this is a good diagnostic"
26+
"caption": "Almost no other animal can eat eucaluptus leaves, so this is a good diagnostic",
27+
"description": "Take some eucalyptus branches, remove some leaves and try to feed the alleged koala",
28+
"tools": "Leaves and Branches"
2529
},
2630
{
2731
"key": "behavior",
2832
"title": "Does it sleep the whole day?",
29-
"description": "Usually sleeps on trees"
33+
"caption": "Usually sleeps on trees",
34+
"description": "The alleged Koala should sleep the whole day if provided a tree.",
35+
"tools": "Trees, Dawn"
3036
}
3137
]
3238
},

0 commit comments

Comments
 (0)