From dd6fcffdcdffe1fac7b2ac6a2d4a1927dcade1ec Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Tue, 21 Oct 2014 09:00:14 -0700 Subject: [PATCH 1/7] Initial appveyor.yml file. --- appveyor.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..12def43697 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,27 @@ +version: "{build}" + +branches: + only: + - master + +build: off + +install: + - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% + - ruby --version + - gem --version + - gem install bundler + - bundler --version + - bundle install + +test_script: + - bundle exec rspec + +environment: + matrix: + - ruby_version: '187' + - ruby_version: '193' + - ruby_version: '21' + +matrix: + fast_finish: true From 4c880e6f336c1b681cb91c3be373c9e04edf23da Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Tue, 21 Oct 2014 09:29:14 -0700 Subject: [PATCH 2/7] Appveyor build updates. - For now build only one ruby version. - Windows does not support symlinking. - Ansicon is needed for color. --- appveyor.yml | 3 +-- spec/support/shared_example_groups.rb | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 12def43697..df7929d862 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,15 +13,14 @@ install: - gem install bundler - bundler --version - bundle install + - cinst ansicon test_script: - bundle exec rspec environment: matrix: - - ruby_version: '187' - ruby_version: '193' - - ruby_version: '21' matrix: fast_finish: true diff --git a/spec/support/shared_example_groups.rb b/spec/support/shared_example_groups.rb index 5751babf60..2e85c93dd2 100644 --- a/spec/support/shared_example_groups.rb +++ b/spec/support/shared_example_groups.rb @@ -15,6 +15,10 @@ include_context "isolated directory" let(:project_dir) { Dir.getwd } + before(:example, :if => RSpec::Support::OS.windows?) do + pending "Windows does not support symlinking" + end + it "finds the files" do foos_dir = File.join(project_dir, "spec/foos") FileUtils.mkdir_p foos_dir From 0601f8cee8b469b75ba6d9b46ecb736e146a9a72 Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Tue, 21 Oct 2014 09:31:15 -0700 Subject: [PATCH 3/7] Update matrix. --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index df7929d862..4fd9863a23 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,5 @@ test_script: environment: matrix: - ruby_version: '193' + - ruby_version: '21' -matrix: - fast_finish: true From 69ff08d5730b38745bc126adc2599ae349b35425 Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Wed, 22 Oct 2014 23:20:46 -0700 Subject: [PATCH 4/7] =?UTF-8?q?`[.]`=20doesn=E2=80=99t=20appear=20to=20wor?= =?UTF-8?q?k=20well=20on=20windows.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rspec/core/configuration.rb | 2 +- spec/rspec/core/configuration_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rspec/core/configuration.rb b/lib/rspec/core/configuration.rb index dcf59c7a6a..bc30e8d21a 100644 --- a/lib/rspec/core/configuration.rb +++ b/lib/rspec/core/configuration.rb @@ -1374,7 +1374,7 @@ def get_files_to_run(paths) def paths_to_check(paths) return paths if pattern_might_load_specs_from_vendored_dirs? - paths + ['.'] + paths + [Dir.getwd] end def pattern_might_load_specs_from_vendored_dirs? diff --git a/spec/rspec/core/configuration_spec.rb b/spec/rspec/core/configuration_spec.rb index a5357f6276..1ba814b758 100644 --- a/spec/rspec/core/configuration_spec.rb +++ b/spec/rspec/core/configuration_spec.rb @@ -578,11 +578,11 @@ def loaded_files end def specify_consistent_ordering_of_files_to_run + allow(File).to receive(:directory?).and_call_original allow(File).to receive(:directory?).with('a') { true } - allow(File).to receive(:directory?).with('.') { true } globbed_files = nil allow(Dir).to receive(:[]).with(/^\{?a/) { globbed_files } - allow(Dir).to receive(:[]).with(/^\{?\./) { [] } + allow(Dir).to receive(:[]).with(a_string_starting_with(Dir.getwd)) { [] } orderings = [ %w[ a/1.rb a/2.rb a/3.rb ], From 0437631e8c2b7b01603f41b7937c73b72a527353 Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Wed, 22 Oct 2014 23:20:55 -0700 Subject: [PATCH 5/7] See what the host os is repotted as on appveyor. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 4fd9863a23..58b14f7d56 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,7 @@ build: off install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version + - ruby -e "puts RbConfig::CONFIG['host_os']" - gem --version - gem install bundler - bundler --version From 7d5cf44a847d240d895af85c9771d85ebbc66d94 Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Wed, 22 Oct 2014 23:33:07 -0700 Subject: [PATCH 6/7] Fix windows pending logic --- appveyor.yml | 1 - spec/support/shared_example_groups.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 58b14f7d56..4fd9863a23 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,6 @@ build: off install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - ruby --version - - ruby -e "puts RbConfig::CONFIG['host_os']" - gem --version - gem install bundler - bundler --version diff --git a/spec/support/shared_example_groups.rb b/spec/support/shared_example_groups.rb index 2e85c93dd2..4a732c1baa 100644 --- a/spec/support/shared_example_groups.rb +++ b/spec/support/shared_example_groups.rb @@ -15,9 +15,9 @@ include_context "isolated directory" let(:project_dir) { Dir.getwd } - before(:example, :if => RSpec::Support::OS.windows?) do + before(:example) do pending "Windows does not support symlinking" - end + end if RSpec::Support::OS.windows? it "finds the files" do foos_dir = File.join(project_dir, "spec/foos") From 77c89b011176cecf3e5443d22f1ccf130886d9be Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Thu, 23 Oct 2014 00:03:00 -0700 Subject: [PATCH 7/7] Force non-ANSICON environment. On appveyor we install ANSICON. --- spec/rspec/core/configuration_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/rspec/core/configuration_spec.rb b/spec/rspec/core/configuration_spec.rb index 1ba814b758..cded1676bc 100644 --- a/spec/rspec/core/configuration_spec.rb +++ b/spec/rspec/core/configuration_spec.rb @@ -1036,6 +1036,8 @@ def metadata_hash(*args) end context "with ANSICON NOT available" do + around { |e| without_env_vars('ANSICON', &e) } + before do allow_warning end