From f653dccb56454cb6f0b86889fcc4b9f0969b7ac6 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Fri, 21 Jun 2013 10:02:21 -0700 Subject: [PATCH 1/3] Create separate Gemfile for Ruby 1.8.7 --- .travis.yml | 17 ++++++++++++++++- Gemfile.1.8.7 | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Gemfile.1.8.7 diff --git a/.travis.yml b/.travis.yml index 2eec06a4f..3326053a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ language: ruby +gemfile: + - Gemfile + - Gemfile.1.8.7 + rvm: - 1.8.7 - 1.9.2 @@ -8,9 +12,20 @@ rvm: script: FOG_MOCK=true bundle exec shindont +matrix: + exclude: + - rvm: 1.8.7 + gemfile: Gemfile + - rvm: 1.9.2 + gemfile: Gemfile.1.8.7 + - rvm: 1.9.3 + gemfile: Gemfile.1.8.7 + - rvm: 2.0.0 + gemfile: Gemfile.1.8.7 + notifications: email: false - irc: + irc: channels: - "irc.freenode.org#ruby-fog" template: diff --git a/Gemfile.1.8.7 b/Gemfile.1.8.7 new file mode 100644 index 000000000..6994674b0 --- /dev/null +++ b/Gemfile.1.8.7 @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem 'nokogiri', '~>1.5.0' + +gemspec From 9824db51788f5546baa6537cf16896091b472a38 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Fri, 21 Jun 2013 10:02:47 -0700 Subject: [PATCH 2/3] Update nokogiri dependency to version ~>1.5 --- fog.gemspec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fog.gemspec b/fog.gemspec index 9a2762588..32bb01d58 100644 --- a/fog.gemspec +++ b/fog.gemspec @@ -47,12 +47,9 @@ Gem::Specification.new do |s| s.add_dependency('mime-types') s.add_dependency('net-scp', '~>1.1') s.add_dependency('net-ssh', '>=2.1.3') + s.add_dependency('nokogiri', '~>1.5') s.add_dependency('ruby-hmac') - # Nokogiri >= 1.6 drops support for Ruby 1.8.7 so should not be used - # See https://github.com/fog/fog/issues/1878 for more details - s.add_dependency('nokogiri', '~>1.5.0') - ## List your development dependencies here. Development dependencies are ## those that are only needed during development s.add_development_dependency('jekyll') From f62c28995c6bddcf8a74362a72c3aac8cd7c1a33 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Tue, 2 Jul 2013 00:47:25 +0200 Subject: [PATCH 3/3] Add note about installing on Ruby 1.8.7 [ci skip] --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f1cdbc08..c6ab7f30a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ fog is the Ruby cloud services library, top to bottom: sudo gem install fog -Now type `fog` to try stuff, confident that fog will let you know what to do. +Now type `fog` to try stuff, confident that fog will let you know what to do. Here is an example of wading through server creation for Amazon Elastic Compute Cloud: >> server = Compute[:aws].servers.create @@ -27,10 +27,31 @@ Here is an example of wading through server creation for Amazon Elastic Compute >> server.destroy # cleanup after yourself or regret it, trust me true +## Ruby 1.8.7 + +The maintainers of this project, in concert with the maintainers of Ruby, +**strongly** recommend using the latest patchlevel of Ruby 1.9.2 or later. +[As of July 1, 2013, Ruby 1.8.7 is no longer officially maintained.][retired] +This means fixes will no longer be provided, even for known security +vulnerabilities. + +[retired]: http://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/ + +With this caveat, if you wish to bundle `fog` into your application on Ruby +1.8.7, you must add the following line to your `Gemfile`. + + gem 'nokogiri', '~>1.5.0' + +Also, ensure that you are using LibXML version 2.8.0, since there is an +[issue with LibXML version 2.9.0][issue829] ([and 2.9.1][issue904]). + +[issue829]: https://github.com/sparklemotion/nokogiri/issues/829 +[issue904]: https://github.com/sparklemotion/nokogiri/issues/904 + ## Collections A high level interface to each cloud is provided through collections, such as `images` and `servers`. -You can see a list of available collections by calling `collections` on the connection object. +You can see a list of available collections by calling `collections` on the connection object. You can try it out using the `fog` command: >> Compute[:aws].collections