diff options
author | Roque Pinel <repinel@gmail.com> | 2015-06-05 15:28:11 -0500 |
---|---|---|
committer | Roque Pinel <repinel@gmail.com> | 2015-06-05 15:29:48 -0500 |
commit | 89550bc1a06d3fda27f03b19ec8af6531372e0e9 (patch) | |
tree | 172822c2e2b2261d771a6c56288c3cac9c763c0b /ci/travis.rb | |
parent | 423f14183f31565cc68d0674733b7b9edf3814a6 (diff) | |
download | rails-89550bc1a06d3fda27f03b19ec8af6531372e0e9.tar.gz rails-89550bc1a06d3fda27f03b19ec8af6531372e0e9.tar.bz2 rails-89550bc1a06d3fda27f03b19ec8af6531372e0e9.zip |
Add the bug report templates to the Travis CI build
The bug report templates are now executed from the `ci/travis.rb` when
`GEM` contains `guides`.
I started by creating a `test` task in `guides/Rakefile` to handle this,
but since inline `gemfile` must not be executed with `bundle exec`, that
rake task would not be consistent with others. So I went back by
executing them directly from `Build`.
Use inline Gemfile dependency when reporting gem bugs
Diffstat (limited to 'ci/travis.rb')
-rwxr-xr-x | ci/travis.rb | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/ci/travis.rb b/ci/travis.rb index b62f90a59e..52fef05fbf 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -16,13 +16,14 @@ end class Build MAP = { 'railties' => 'railties', - 'ap' => 'actionpack', - 'am' => 'actionmailer', - 'amo' => 'activemodel', - 'as' => 'activesupport', - 'ar' => 'activerecord', - 'av' => 'actionview', - 'aj' => 'activejob' + 'ap' => 'actionpack', + 'am' => 'actionmailer', + 'amo' => 'activemodel', + 'as' => 'activesupport', + 'ar' => 'activerecord', + 'av' => 'actionview', + 'aj' => 'activejob', + 'guides' => 'guides' } attr_reader :component, :options @@ -36,7 +37,11 @@ class Build self.options.update(options) Dir.chdir(dir) do announce(heading) - rake(*tasks) + if guides? + run_bug_report_templates + else + rake(*tasks) + end end end @@ -71,6 +76,10 @@ class Build gem == 'activerecord' end + def guides? + gem == 'guides' + end + def isolated? options[:isolated] end @@ -96,6 +105,12 @@ class Build end true end + + def run_bug_report_templates + Dir.glob('bug_report_templates/*.rb').all? do |file| + system(Gem.ruby, '-w', file) + end + end end if ENV['GEM']=='aj:integration' @@ -110,6 +125,7 @@ ENV['GEM'].split(',').each do |gem| next if ENV['TRAVIS_PULL_REQUEST'] && ENV['TRAVIS_PULL_REQUEST'] != 'false' && isolated next if gem == 'railties' && isolated next if gem == 'aj:integration' && isolated + next if gem == 'guides' && isolated build = Build.new(gem, :isolated => isolated) results[build.key] = build.run! |