Skip to content

Commit 90fdb4b

Browse files
committed
Merge pull request #199 from Umofomia/nokogiri-dependency
Change Nokogiri's runtime dependency to fix support for Ruby 1.8.7.
2 parents c8deef8 + 89559fc commit 90fdb4b

File tree

4 files changed

+36
-7
lines changed

4 files changed

+36
-7
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ rvm:
55
- 2.0.0
66
- 2.1.5
77
- ree
8+
gemfile:
9+
- Gemfile
10+
- gemfiles/nokogiri-1.5.gemfile
11+
matrix:
12+
exclude:
13+
- rvm: 1.8.7
14+
gemfile: Gemfile
15+
- rvm: ree
16+
gemfile: Gemfile

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ gem 'ruby-saml', '~> 0.9.1'
4141
gem 'ruby-saml', :github => 'onelogin/ruby-saml'
4242
```
4343

44-
Using Bundler
44+
Using RubyGems
4545

4646
```sh
4747
gem install ruby-saml
@@ -58,6 +58,22 @@ or just the required components individually:
5858
require 'onelogin/ruby-saml/authrequest'
5959
```
6060

61+
### Installation on Ruby 1.8.7
62+
63+
This gem has a dependency on Nokogiri, which dropped support for Ruby 1.8.x in Nokogiri 1.6. When installing this gem on Ruby 1.8.7, you will need to make sure a version of Nokogiri prior to 1.6 is installed or specified if it hasn't been already.
64+
65+
Using `Gemfile`
66+
67+
```ruby
68+
gem 'nokogiri', '~> 1.5.10'
69+
```
70+
71+
Using RubyGems
72+
73+
```sh
74+
gem install nokogiri --version '~> 1.5.10'
75+
````
76+
6177
## The Initialization Phase
6278

6379
This is the first request you will get from the identity provider. It will hit your application at a specific URL (that you've announced as being your SAML initialization point). The response to this initialization, is a redirect back to the identity provider, which can look something like this (ignore the saml_settings method call for now):

gemfiles/nokogiri-1.5.gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'http://rubygems.org'
2+
3+
gem "nokogiri", "~> 1.5.10"
4+
5+
gemspec :path => "../"

ruby-saml.gemspec

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ Gem::Specification.new do |s|
2626
s.test_files = `git ls-files test/*`.split("\n")
2727

2828
s.add_runtime_dependency('uuid', '~> 2.3')
29-
if RUBY_VERSION < '1.9'
30-
# 1.8.7
31-
s.add_runtime_dependency('nokogiri', '~> 1.5.10')
32-
else
33-
s.add_runtime_dependency('nokogiri', '~> 1.6.0')
34-
end
29+
30+
# Because runtime dependencies are determined at build time, we cannot make
31+
# Nokogiri's version dependent on the Ruby version, even though we would
32+
# have liked to constrain Ruby 1.8.7 to install only the 1.5.x versions.
33+
s.add_runtime_dependency('nokogiri', '>= 1.5.10')
3534

3635
s.add_development_dependency('minitest', '~> 5.5')
3736
s.add_development_dependency('mocha', '~> 0.14')

0 commit comments

Comments
 (0)