Skip to content

Commit a664278

Browse files
author
Sam Phippen
committed
Merge pull request #1534 from rspec/use-same-version-of-nokogiri-in-example-app
Use the same version of nokogiri in example app
2 parents 6f06b28 + 49536d3 commit a664278

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ matrix:
104104
- rvm: 2.3.0
105105
env: RAILS_VERSION='~> 3.1.12'
106106
allow_failures:
107+
- rvm: 1.8.7
108+
env: RAILS_VERSION='~> 3.2.17'
107109
- rvm: 2.2.2
108110
env: RAILS_VERSION=master
109111
- rvm: 2.3.0

example_app_generator/generate_app.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'nokogiri/version'
2+
13
rspec_rails_repo_path = File.expand_path("../../", __FILE__)
24
rspec_dependencies_gemfile = File.join(rspec_rails_repo_path, 'Gemfile-rspec-dependencies')
35
rails_dependencies_gemfile = File.join(rspec_rails_repo_path, 'Gemfile-rails-dependencies')
@@ -18,9 +20,13 @@
1820
gsub_file "Gemfile", /.*debugger.*/, ''
1921

2022
if Rails::VERSION::STRING >= '5.0.0'
21-
append_to_file('Gemfile', "gem 'rails-controller-testing', :git => 'https://github.com/rails/rails-controller-testing'")
23+
append_to_file('Gemfile', "gem 'rails-controller-testing', :git => 'https://github.com/rails/rails-controller-testing'\n")
2224
end
2325

26+
# Nokogiri version is pinned in rspec-rails' Gemfile since it tend to cause installation problems
27+
# on Travis CI, so we pin nokogiri in this example app also.
28+
append_to_file 'Gemfile', "gem 'nokogiri', '#{Nokogiri::VERSION}'\n"
29+
2430
# Use our version of RSpec and Rails
2531
append_to_file 'Gemfile', <<-EOT.gsub(/^ +\|/, '')
2632
|# Rack::Cache 1.3.0 requires Ruby >= 2.0.0

0 commit comments

Comments
 (0)