diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-04-28 11:20:44 +0200 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-13 11:12:22 -0500 |
commit | 6adfeb94c48fefb48e572d70b1c216cbd3ec1292 (patch) | |
tree | dc2961fa47e61cb7b5814daa46e5387d9f1691e4 | |
parent | b40745584bcba89dce042b5b28bb84b1de1d3d48 (diff) | |
download | bundler-6adfeb94c48fefb48e572d70b1c216cbd3ec1292.tar.gz |
Disallow making realworld network requests on CI
-rw-r--r-- | Rakefile | 3 | ||||
-rw-r--r-- | spec/support/artifice/vcr.rb | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -190,6 +190,9 @@ begin task :travis do rg = ENV["RGV"] || raise("RubyGems version is required on Travis!") + # disallow making network requests on CI + ENV["BUNDLER_SPEC_PRE_RECORDED"] = "TRUE" + if RUBY_VERSION >= "2.0.0" puts "\n\e[1;33m[Travis CI] Running bundler linter\e[m\n\n" Rake::Task["rubocop"].invoke diff --git a/spec/support/artifice/vcr.rb b/spec/support/artifice/vcr.rb index 576fe57d82..3d0c2c6dd6 100644 --- a/spec/support/artifice/vcr.rb +++ b/spec/support/artifice/vcr.rb @@ -35,7 +35,7 @@ class BundlerVCRHTTP < Net::HTTP end def recorded_response? - return true if ENV["BUNDLER_SPEC_RECORDING"] + return true if ENV["BUNDLER_SPEC_PRE_RECORDED"] request_pair_paths.all? {|f| File.exist?(f) } end |