Skip to content

Commit

Permalink
addons.coverty_scan.project: accept a string directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Mar 22, 2014
1 parent 428fd24 commit 1be2905
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Note that stricitly speaking Travis CI might not have the same understanding of
**Expected format:** String or encrypted string.

#### `addons.coverty_scan.project`
**Expected format:** Key value mapping.
**Expected format:** Key value mapping, or strings or encrypted strings.

#### `addons.coverty_scan.project.name`
**This setting is required!**
Expand Down
1 change: 1 addition & 0 deletions lib/travis/yaml/nodes/addons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def visit_scalar(visitor, type, value, implicit = true)
class CovertyScan < Addon
class Project < Mapping
map :name, to: Scalar[:str, :secure], required: true
auto_prefix :name
end

map :project, to: Project
Expand Down
5 changes: 5 additions & 0 deletions spec/nodes/addons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def addons(input)
config = addons(coverty_scan: { project: { name: :foo } })
expect(config.coverty_scan.project.name).to be == "foo"
end

example do
config = addons(coverty_scan: { project: :foo })
expect(config.coverty_scan.project.name).to be == "foo"
end
end

context 'firefox' do
Expand Down

0 comments on commit 1be2905

Please sign in to comment.