Merge pull request #5015 from jekyll/remove-jruby-and-ruby-head
Merge pull request 5015
This commit is contained in:
		
						commit
						325b4c88d5
					
				|  | @ -1,4 +1,3 @@ | |||
| before_script: bundle update | ||||
| bundler_args: --without benchmark:site:development | ||||
| script: script/cibuild | ||||
| cache: bundler | ||||
|  | @ -9,17 +8,13 @@ rvm: | |||
|   - &ruby1 2.3.0 | ||||
|   - &ruby2 2.2.4 | ||||
|   - &ruby3 2.1.8 | ||||
|   - &jruby jruby-9.0.5.0 | ||||
|   - &rhead ruby-head | ||||
| 
 | ||||
| matrix: | ||||
|   fast_finish: true | ||||
|   allow_failures: | ||||
|     - rvm: *jruby | ||||
|     - rvm: *rhead | ||||
|   include: | ||||
|     - rvm: 2.3.0 | ||||
|       env: TEST_SUITE=fmt | ||||
|     - rvm: jruby-9.0.5.0 | ||||
|       env: TEST_SUITE=test | ||||
| env: | ||||
|   matrix: | ||||
|     - TEST_SUITE=test | ||||
|  |  | |||
							
								
								
									
										2
									
								
								Gemfile
								
								
								
								
							
							
						
						
									
										2
									
								
								Gemfile
								
								
								
								
							|  | @ -23,6 +23,8 @@ group :test do | |||
|   gem "nokogiri" | ||||
|   gem "rspec" | ||||
|   gem "test-theme", path: File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__)) | ||||
| 
 | ||||
|   gem "jruby-openssl" if RUBY_ENGINE == "jruby" | ||||
| end | ||||
| 
 | ||||
| # | ||||
|  |  | |||
|  | @ -0,0 +1,14 @@ | |||
| #!/bin/bash | ||||
| # ----------------------------------------------------------------------------- | ||||
| # If you send us a ruby then we use that, if you do not then we test with | ||||
| # whatever we can detect, this way you can run both suites when you test out | ||||
| # your source, we expect full coverage now, not just MRI. | ||||
| # ----------------------------------------------------------------------------- | ||||
| 
 | ||||
| rubies=() | ||||
| for r in jruby ruby; do | ||||
|   if which "$r" > /dev/null 2>&1 | ||||
|   then | ||||
|     echo $r | ||||
|   fi | ||||
| done | ||||
							
								
								
									
										22
									
								
								script/test
								
								
								
								
							
							
						
						
									
										22
									
								
								script/test
								
								
								
								
							|  | @ -31,26 +31,26 @@ then | |||
| 
 | ||||
|   shift | ||||
| else | ||||
|   rubies=() | ||||
|   for r in jruby ruby; do | ||||
|     if which "$r" | ||||
|     then | ||||
|       rubies+=( | ||||
|         $r | ||||
|       ) | ||||
|     fi | ||||
|   done | ||||
|   rubies=($(script/rubies)) | ||||
| fi | ||||
| 
 | ||||
| 
 | ||||
| for ruby in $rubies; do | ||||
|   if [[ "$ruby" == "jruby" ]] | ||||
|   then | ||||
|     testopts="" | ||||
|   else | ||||
|     testopts="--profile" | ||||
|   fi | ||||
| 
 | ||||
|   if [[ $# -lt 1 ]] | ||||
|   then | ||||
|     set -x | ||||
|     time $ruby -S bundle exec \ | ||||
|       rake TESTOPTS='--profile' test | ||||
|       rake TESTOPTS=$testopts test | ||||
|    else | ||||
|     set -x | ||||
|     time $ruby -S bundle exec ruby -Itest \ | ||||
|       "$@" --profile | ||||
|       "$@" $testops | ||||
|   fi | ||||
| done | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| require "webrick" | ||||
| require "mercenary" | ||||
| require "helper" | ||||
| require "openssl" | ||||
| 
 | ||||
| class TestCommandsServe < JekyllUnitTest | ||||
|   def custom_opts(what) | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| require "helper" | ||||
| require "colorator" | ||||
| 
 | ||||
| class TestConfiguration < JekyllUnitTest | ||||
|   test_config = { | ||||
|  | @ -260,7 +261,9 @@ class TestConfiguration < JekyllUnitTest | |||
|       allow(SafeYAML).to receive(:load_file).with(@path) do | ||||
|         raise SystemCallError, "No such file or directory - #{@path}" | ||||
|       end | ||||
|       allow($stderr).to receive(:puts).with("Configuration file: none".yellow) | ||||
|       allow($stderr).to receive(:puts).with( | ||||
|         Colorator.yellow("Configuration file: none") | ||||
|       ) | ||||
|       assert_equal site_configuration, Jekyll.configuration(test_config) | ||||
|     end | ||||
| 
 | ||||
|  | @ -275,13 +278,12 @@ class TestConfiguration < JekyllUnitTest | |||
|       allow($stderr) | ||||
|         .to receive(:puts) | ||||
|         .and_return( | ||||
|           ("WARNING: " | ||||
|              .rjust(20) + "Error reading configuration. Using defaults (and options).") | ||||
|               .yellow | ||||
|           "WARNING: ".rjust(20) + | ||||
|           Colorator.yellow("Error reading configuration. Using defaults (and options).") | ||||
|         ) | ||||
|       allow($stderr) | ||||
|         .to receive(:puts) | ||||
|         .and_return("Configuration file: (INVALID) #{@path}".yellow) | ||||
|         .and_return(Colorator.yellow("Configuration file: (INVALID) #{@path}")) | ||||
|       assert_equal site_configuration, Jekyll.configuration(test_config) | ||||
|     end | ||||
| 
 | ||||
|  | @ -291,10 +293,10 @@ class TestConfiguration < JekyllUnitTest | |||
|       end | ||||
|       allow($stderr) | ||||
|         .to receive(:puts) | ||||
|         .with(( | ||||
|         .with(Colorator.red( | ||||
|           "Fatal: ".rjust(20) + \ | ||||
|           "The configuration file '#{@user_config}' could not be found." | ||||
|         ).red) | ||||
|         )) | ||||
|       assert_raises LoadError do | ||||
|         Jekyll.configuration({ "config" => [@user_config] }) | ||||
|       end | ||||
|  |  | |||
|  | @ -320,7 +320,7 @@ class TestUtils < JekyllUnitTest | |||
|   context "The \`Utils.safe_glob\` method" do | ||||
|     should "not apply pattern to the dir" do | ||||
|       dir = "test/safe_glob_test[" | ||||
|       assert_equal [], Dir.glob(dir + "/*") | ||||
|       assert_equal [], Dir.glob(dir + "/*") unless jruby? | ||||
|       assert_equal ["test/safe_glob_test[/find_me.txt"], Utils.safe_glob(dir, "*") | ||||
|     end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue