diff --git a/lib/travis/yml.rb b/lib/travis/yml.rb index 28cf795af..5772955aa 100644 --- a/lib/travis/yml.rb +++ b/lib/travis/yml.rb @@ -179,6 +179,7 @@ def r_keys warnings_are_errors remotes repos + use_devtools ) end memoize :r_keys diff --git a/lib/travis/yml/schema/def/lang/r.rb b/lib/travis/yml/schema/def/lang/r.rb index bf481c2c6..685951595 100644 --- a/lib/travis/yml/schema/def/lang/r.rb +++ b/lib/travis/yml/schema/def/lang/r.rb @@ -10,7 +10,7 @@ class R < Type::Lang def define title 'R' summary 'R language support' - see 'Building an R Project': 'https://docs.travis-ci.com/user/languages/clojure/' + see 'Building an R Project': 'https://docs.travis-ci.com/user/languages/r/' matrix :r map :r_packages, to: :seq @@ -35,6 +35,7 @@ def define map :warnings_are_errors, to: :bool map :remotes, to: :str # this does not seem to be used in travis-build? map :repos, to: :map, strict: false + map :use_devtools, to: :bool end end end diff --git a/schema.json b/schema.json index d8659b8ec..c0cd328af 100644 --- a/schema.json +++ b/schema.json @@ -8077,11 +8077,19 @@ "r" ] } + }, + "use_devtools": { + "type": "boolean", + "only": { + "language": [ + "r" + ] + } } }, "summary": "R language support", "see": { - "Building an R Project": "https://docs.travis-ci.com/user/languages/clojure/" + "Building an R Project": "https://docs.travis-ci.com/user/languages/r/" }, "normal": true }, @@ -9178,6 +9186,14 @@ "r" ] } + }, + "use_devtools": { + "type": "object", + "only": { + "language": [ + "r" + ] + } } }, "normal": true diff --git a/spec/travis/yml/accept/lang/r_spec.rb b/spec/travis/yml/accept/lang/r_spec.rb index 8437f67e1..646202e06 100644 --- a/spec/travis/yml/accept/lang/r_spec.rb +++ b/spec/travis/yml/accept/lang/r_spec.rb @@ -293,4 +293,14 @@ it { should_not have_msg } end end + + describe 'use_devtools' do + describe 'given a bool' do + yaml %( + use_devtools: true + ) + it { should serialize_to use_devtools: true } + it { should_not have_msg } + end + end end diff --git a/spec/travis/yml/schema/accept/lang/r_spec.rb b/spec/travis/yml/schema/accept/lang/r_spec.rb index f9b2a0def..c22992655 100644 --- a/spec/travis/yml/schema/accept/lang/r_spec.rb +++ b/spec/travis/yml/schema/accept/lang/r_spec.rb @@ -172,5 +172,13 @@ it { should_not validate language: {:foo=>'foo'} } it { should_not validate language: [{:foo=>'foo'}] } end + describe 'use_devtools' do + it { should validate language: :r } + it { should_not validate language: 1 } + it { should_not validate language: true } + it { should_not validate language: [:r] } + it { should_not validate language: {:foo=>'foo'} } + it { should_not validate language: [{:foo=>'foo'}] } + end end end diff --git a/spec/travis/yml/schema/def/lang/r_spec.rb b/spec/travis/yml/schema/def/lang/r_spec.rb index a10d80afd..833bd053b 100644 --- a/spec/travis/yml/schema/def/lang/r_spec.rb +++ b/spec/travis/yml/schema/def/lang/r_spec.rb @@ -192,6 +192,14 @@ 'r' ] } + }, + use_devtools: { + type: :boolean, + only: { + language: [ + 'r' + ] + } } }, normal: true