{"action":"created","issue":{"url":"https://api.github.com/repos/onelogin/ruby-saml/issues/198","labels_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/198/comments","events_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/198/events","html_url":"https://github.com/onelogin/ruby-saml/issues/198","id":60014720,"number":198,"title":"0.9.1 gem appears to require Nokogiri ~> 1.6.0 on Ruby 1.8.7","user":{"login":"Umofomia","id":480318,"avatar_url":"https://avatars.githubusercontent.com/u/480318?v=3","gravatar_id":"","url":"https://api.github.com/users/Umofomia","html_url":"https://github.com/Umofomia","followers_url":"https://api.github.com/users/Umofomia/followers","following_url":"https://api.github.com/users/Umofomia/following{/other_user}","gists_url":"https://api.github.com/users/Umofomia/gists{/gist_id}","starred_url":"https://api.github.com/users/Umofomia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Umofomia/subscriptions","organizations_url":"https://api.github.com/users/Umofomia/orgs","repos_url":"https://api.github.com/users/Umofomia/repos","events_url":"https://api.github.com/users/Umofomia/events{/privacy}","received_events_url":"https://api.github.com/users/Umofomia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-05T20:57:23Z","updated_at":"2015-03-06T00:21:26Z","closed_at":null,"body":"#194 loosened the runtime requirement on Nokogiri so that version `~> 1.6.0` would be accepted for Ruby 1.9 and above:\r\n\r\n```ruby\r\nif RUBY_VERSION < '1.9'\r\n  # 1.8.7\r\n  s.add_runtime_dependency('nokogiri', '~> 1.5.10')\r\nelse\r\n  s.add_runtime_dependency('nokogiri', '~> 1.6.0')\r\nend\r\n```\r\n\r\nHowever, this code does not appear to be working and `~> 1.6.0` is being enforced for 1.8.7 as well.\r\n\r\nThe easiest way to reproduce this issue is to create a clean project with the following Gemfile:\r\n\r\n```ruby\r\nsource \"http://rubygems.org\"\r\ngem \"ruby-saml\", \"~> 0.9.1\"\r\n```\r\n\r\nThis results in the following:\r\n\r\n```\r\nFetching gem metadata from http://rubygems.org/..........\r\nResolving dependencies...\r\nInstalling systemu (2.6.4) \r\nInstalling macaddr (1.7.1) \r\nInstalling mini_portile (0.6.2) \r\nInstalling nokogiri (1.6.6.2) \r\nGem::InstallError: nokogiri requires Ruby version >= 1.9.2.\r\nAn error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.\r\nMake sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.\r\n```\r\n\r\nIf you try to add a version constraint for Nokogiri in the Gemfile, you end up getting the following error instead:\r\n\r\n```\r\nFetching gem metadata from http://rubygems.org/.........\r\nResolving dependencies...\r\nBundler could not find compatible versions for gem \"nokogiri\":\r\n  In Gemfile:\r\n    ruby-saml (~> 0.9.1) ruby depends on\r\n      nokogiri (~> 1.6.0) ruby\r\n\r\n    nokogiri (1.5.11)\r\n```\r\n\r\nSo it doesn't appear that bundler is honoring the version-dependent dependency. One possible fix I can think of is to have just one dependency that is `>= 1.5.10`; however, I don't know whether you would consider that to be too broad."},"comment":{"url":"https://api.github.com/repos/onelogin/ruby-saml/issues/comments/77482152","html_url":"https://github.com/onelogin/ruby-saml/issues/198#issuecomment-77482152","issue_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/198","id":77482152,"user":{"login":"Lordnibbler","id":199422,"avatar_url":"https://avatars.githubusercontent.com/u/199422?v=3","gravatar_id":"","url":"https://api.github.com/users/Lordnibbler","html_url":"https://github.com/Lordnibbler","followers_url":"https://api.github.com/users/Lordnibbler/followers","following_url":"https://api.github.com/users/Lordnibbler/following{/other_user}","gists_url":"https://api.github.com/users/Lordnibbler/gists{/gist_id}","starred_url":"https://api.github.com/users/Lordnibbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lordnibbler/subscriptions","organizations_url":"https://api.github.com/users/Lordnibbler/orgs","repos_url":"https://api.github.com/users/Lordnibbler/repos","events_url":"https://api.github.com/users/Lordnibbler/events{/privacy}","received_events_url":"https://api.github.com/users/Lordnibbler/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T00:21:26Z","updated_at":"2015-03-06T00:21:26Z","body":"@Umofomia I'm ok with this approach -- can you please verify that this works as expected both in 1.8.7 and newer, and submit a pull request?"}}