Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix incompatibility with Ruby 1.8

  • Loading branch information...
commit c061445fb873b2b8fb0c3c923cbce40159d5102f 1 parent c9160d8
@weppos authored
View
2  lib/whois/record/parser/whois.nic.fr.rb
@@ -137,7 +137,7 @@ def parse_contact(element, type)
:fax => values["fax-no"],
:email => values["e-mail"],
# :created_on => nil,
- :updated_on => Time.new(*values["changed"].split(" ").first.split("/").reverse),
+ :updated_on => Time.utc(*values["changed"].split(" ").first.split("/").reverse),
})
end
View
6 spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == "+1 650 253 0000"
should: %s[0].fax == "+1 650 618 8571"
should: %s[0].email == "dns-admin@google.com"
- should: %s[0].updated_on == Time.parse("2009-07-09")
+ should: %s[0].updated_on == Time.parse("2009-07-09 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 6 50 33 00 10"
should: %s[0].fax == nil
should: %s[0].email == "dns-admin@google.com"
- should: %s[0].updated_on == Time.parse("2009-02-24")
+ should: %s[0].updated_on == Time.parse("2009-02-24 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+01 2083895740"
should: %s[0].fax == nil
should: %s[0].email == "ccops@markmonitor.com"
- should: %s[0].updated_on == Time.parse("2008-10-10")
+ should: %s[0].updated_on == Time.parse("2008-10-10 00:00:00 UTC")
#nameservers
View
6 spec/fixtures/responses/whois.nic.fr/pm/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == nil
should: %s[0].fax == nil
should: %s[0].email == nil
- should: %s[0].updated_on == Time.parse("2008-10-09")
+ should: %s[0].updated_on == Time.parse("2008-10-09 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#nameservers
View
6 spec/fixtures/responses/whois.nic.fr/re/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == nil
should: %s[0].fax == nil
should: %s[0].email == nil
- should: %s[0].updated_on == Time.parse("2009-12-02")
+ should: %s[0].updated_on == Time.parse("2009-12-02 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#nameservers
View
6 spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == nil
should: %s[0].fax == nil
should: %s[0].email == nil
- should: %s[0].updated_on == Time.parse("2008-10-09")
+ should: %s[0].updated_on == Time.parse("2008-10-09 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#nameservers
View
6 spec/fixtures/responses/whois.nic.fr/wf/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == nil
should: %s[0].fax == nil
should: %s[0].email == nil
- should: %s[0].updated_on == Time.parse("2008-10-09")
+ should: %s[0].updated_on == Time.parse("2008-10-09 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#nameservers
View
6 spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected
@@ -36,7 +36,7 @@
should: %s[0].phone == nil
should: %s[0].fax == nil
should: %s[0].email == nil
- should: %s[0].updated_on == Time.parse("2008-10-09")
+ should: %s[0].updated_on == Time.parse("2008-10-09 00:00:00 UTC")
#admin_contacts
should: %s be_a(Array)
@@ -55,7 +55,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#technical_contacts
should: %s be_a(Array)
@@ -74,7 +74,7 @@
should: %s[0].phone == "+33 1 39 30 83 00"
should: %s[0].fax == nil
should: %s[0].email == "hostmaster@nic.fr"
- should: %s[0].updated_on == Time.parse("2005-08-23")
+ should: %s[0].updated_on == Time.parse("2005-08-23 00:00:00 UTC")
#nameservers
View
6 spec/whois/record/parser/responses/whois.nic.fr/fr/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == "+1 650 253 0000"
@parser.registrant_contacts[0].fax.should == "+1 650 618 8571"
@parser.registrant_contacts[0].email.should == "dns-admin@google.com"
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2009-07-09")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2009-07-09 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 6 50 33 00 10"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "dns-admin@google.com"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2009-02-24")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2009-02-24 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+01 2083895740"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "ccops@markmonitor.com"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2008-10-10")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2008-10-10 00:00:00 UTC")
end
end
describe "#nameservers" do
View
6 spec/whois/record/parser/responses/whois.nic.fr/pm/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == nil
@parser.registrant_contacts[0].fax.should == nil
@parser.registrant_contacts[0].email.should == nil
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#nameservers" do
View
6 spec/whois/record/parser/responses/whois.nic.fr/re/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == nil
@parser.registrant_contacts[0].fax.should == nil
@parser.registrant_contacts[0].email.should == nil
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2009-12-02")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2009-12-02 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#nameservers" do
View
6 spec/whois/record/parser/responses/whois.nic.fr/tf/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == nil
@parser.registrant_contacts[0].fax.should == nil
@parser.registrant_contacts[0].email.should == nil
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#nameservers" do
View
6 spec/whois/record/parser/responses/whois.nic.fr/wf/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == nil
@parser.registrant_contacts[0].fax.should == nil
@parser.registrant_contacts[0].email.should == nil
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#nameservers" do
View
6 spec/whois/record/parser/responses/whois.nic.fr/yt/status_registered_spec.rb
@@ -70,7 +70,7 @@
@parser.registrant_contacts[0].phone.should == nil
@parser.registrant_contacts[0].fax.should == nil
@parser.registrant_contacts[0].email.should == nil
- @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2008-10-09 00:00:00 UTC")
end
end
describe "#admin_contacts" do
@@ -91,7 +91,7 @@
@parser.admin_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.admin_contacts[0].fax.should == nil
@parser.admin_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#technical_contacts" do
@@ -112,7 +112,7 @@
@parser.technical_contacts[0].phone.should == "+33 1 39 30 83 00"
@parser.technical_contacts[0].fax.should == nil
@parser.technical_contacts[0].email.should == "hostmaster@nic.fr"
- @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2005-08-23 00:00:00 UTC")
end
end
describe "#nameservers" do
Please sign in to comment.
Something went wrong with that request. Please try again.