Skip to content

Commit 1be2905

Browse files
committed
addons.coverty_scan.project: accept a string directly
1 parent 428fd24 commit 1be2905

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Note that stricitly speaking Travis CI might not have the same understanding of
3232
**Expected format:** String or encrypted string.
3333

3434
#### `addons.coverty_scan.project`
35-
**Expected format:** Key value mapping.
35+
**Expected format:** Key value mapping, or strings or encrypted strings.
3636

3737
#### `addons.coverty_scan.project.name`
3838
**This setting is required!**

lib/travis/yaml/nodes/addons.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def visit_scalar(visitor, type, value, implicit = true)
1414
class CovertyScan < Addon
1515
class Project < Mapping
1616
map :name, to: Scalar[:str, :secure], required: true
17+
auto_prefix :name
1718
end
1819

1920
map :project, to: Project

spec/nodes/addons_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ def addons(input)
1414
config = addons(coverty_scan: { project: { name: :foo } })
1515
expect(config.coverty_scan.project.name).to be == "foo"
1616
end
17+
18+
example do
19+
config = addons(coverty_scan: { project: :foo })
20+
expect(config.coverty_scan.project.name).to be == "foo"
21+
end
1722
end
1823

1924
context 'firefox' do

0 commit comments

Comments
 (0)