Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more forgiving normalization #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 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 Expand Up @@ -188,6 +188,11 @@ Value has to be `gcc` (default) or `clang`; or one of the known aliases: `g++` f

**Expected format:** String.

#### `deploy[].on.node_js`
**This setting is only relevant if [`language`](#language) is set to `node_js`.**

Alias for [`deploy[].on.node`](#deployonnode).

#### `deploy[].on.perl`
**This setting is only relevant if [`language`](#language) is set to `perl`.**

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
1 change: 1 addition & 0 deletions lib/travis/yaml/nodes/deploy_conditions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class DeployConditions < Mapping
include LanguageSpecific
map :jdk, :node, :perl, :php, :python, :ruby, :scala, :node, to: Version
map :rvm, to: :ruby
map :node_js, to: :node
map :repo, :branch, :condition, to: Scalar[:str]
map :all_branches, :tags, to: Scalar[:bool]
prefix_scalar :branch
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