From bb11ecf7abf31648b19f61cc438e72d013c850b7 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 19 Aug 2011 03:23:19 +0200 Subject: trying to integrate Travis CI --- .gitignore | 4 +-- .travis.yml | 14 ++++++++++ Gemfile | 1 + README.rdoc | 4 +++ etc/CodeRay.tmproj | 65 ++++++++++++++++++++----------------------- rake_tasks/documentation.rake | 2 +- rake_tasks/test.rake | 2 -- test/functional/basic.rb | 4 --- test/unit/suite.rb | 1 + 9 files changed, 53 insertions(+), 44 deletions(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index f7531e0..b8988f5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ pkg test/executable/source.rb.html test/executable/source.rb.json test/scanners - bench/test.div.html -.rvmrc \ No newline at end of file +.rvmrc +diff.html \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8a6503e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +rvm: + - 1.8.6 + - 1.8.7 # (current default) + - 1.9.2 + - ruby-head + - rbx + - rbx-2.0 + - ree + - jruby +branches: + only: + - master + - stable +# script: "bundle exec rake test test:scanners" diff --git a/Gemfile b/Gemfile index d5ae377..29c842e 100644 --- a/Gemfile +++ b/Gemfile @@ -10,5 +10,6 @@ group :development do gem "shoulda-context", "= 1.0.0.beta1" gem "RedCloth" gem "json" unless RUBY_VERSION >= '1.9.1' + gem "rdoc" gem "bundler", "~> 1.0.0" end diff --git a/README.rdoc b/README.rdoc index 3ae753f..f36859c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,5 +1,7 @@ = CodeRay +https://secure.travis-ci.org/rubychan/coderay.png + Tired of blue'n'gray? Try the original version of this documentation on coderay.rubychan.de[http://coderay.rubychan.de/doc/] :-) @@ -111,6 +113,8 @@ Where would we be without all those people? less useless * Term::ANSIColor[http://term-ansicolor.rubyforge.org/] * PLEAC[http://pleac.sourceforge.net/] code examples +* Github +* Travis CI (http://travis-ci.org/rubychan/github) === Free diff --git a/etc/CodeRay.tmproj b/etc/CodeRay.tmproj index 4ca8548..54d2118 100644 --- a/etc/CodeRay.tmproj +++ b/etc/CodeRay.tmproj @@ -2,13 +2,9 @@ - currentDocument - ../test/functional/for_redcloth.rb documents - expanded - name lib regexFolderFilter @@ -24,11 +20,23 @@ sourceDirectory ../bin + + filename + ../coderay.gemspec + + + filename + ../Changes-1.0.textile + lastUsed + 2011-08-19T01:04:06Z + filename ../Changes.textile lastUsed - 2011-08-16T18:06:14Z + 2011-08-19T01:04:06Z + selected + filename @@ -78,15 +86,23 @@ sourceDirectory ../rake_tasks + + filename + ../Gemfile + lastUsed + 2011-08-19T00:26:29Z + + + filename + ../Gemfile.lock + filename ../Rakefile lastUsed - 2011-08-01T01:19:43Z + 2011-08-19T00:21:31Z - expanded - name executable regexFolderFilter @@ -95,8 +111,6 @@ ../test/executable - expanded - name functional regexFolderFilter @@ -111,21 +125,21 @@ filename ../test/scanners/coderay_suite.rb lastUsed - 2011-08-01T01:19:42Z + 2011-08-19T00:50:30Z filename ../test/scanners/suite.rb lastUsed - 2011-03-01T00:06:06Z + 2011-08-19T00:50:31Z + expanded + name scanners - expanded - name unit regexFolderFilter @@ -137,32 +151,13 @@ filename ../bench/bench.rb lastUsed - 2011-07-11T22:05:29Z + 2011-08-18T23:38:33Z fileHierarchyDrawerWidth 204 metaData - - ../test/functional/for_redcloth.rb - - caret - - column - 0 - line - 2 - - firstVisibleColumn - 0 - firstVisibleLine - 36 - - - openDocuments - - ../test/functional/for_redcloth.rb - + showFileHierarchyDrawer windowFrame diff --git a/rake_tasks/documentation.rake b/rake_tasks/documentation.rake index f83d5d9..0e3907c 100644 --- a/rake_tasks/documentation.rake +++ b/rake_tasks/documentation.rake @@ -6,7 +6,7 @@ begin require 'rake/rdoctask' end rescue LoadError - puts 'Please gem install rdoc.' + warn 'Please gem install rdoc.' end desc 'Generate documentation for CodeRay' diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake index 7078f84..f070ccc 100644 --- a/rake_tasks/test.rake +++ b/rake_tasks/test.rake @@ -7,14 +7,12 @@ namespace :test do desc 'run functional tests' task :functional do - ENV['check_rubygems'] = 'true' ruby './test/functional/suite.rb' ruby './test/functional/for_redcloth.rb' end desc 'run unit tests' task :units do - ENV['check_rubygems'] = 'true' ruby './test/unit/suite.rb' end diff --git a/test/functional/basic.rb b/test/functional/basic.rb index 8200ae4..5d82f5f 100755 --- a/test/functional/basic.rb +++ b/test/functional/basic.rb @@ -129,10 +129,6 @@ more code # and another comment, in-line. assert_equal 4, CodeRay.scan(rHTML, :erb).lines_of_code end - def test_rubygems_not_loaded - assert_equal nil, defined? Gem - end if ENV['check_rubygems'] && RUBY_VERSION < '1.9' - def test_list_of_encoders assert_kind_of(Array, CodeRay::Encoders.list) assert CodeRay::Encoders.list.include?(:count) diff --git a/test/unit/suite.rb b/test/unit/suite.rb index 769b6cc..ee568e7 100755 --- a/test/unit/suite.rb +++ b/test/unit/suite.rb @@ -1,4 +1,5 @@ require 'test/unit' +require 'rubygems' $:.unshift 'lib' mydir = File.dirname(__FILE__) -- cgit v1.2.1