hostelify 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,7 +1,6 @@
1
1
  Manifest
2
2
  README.rdoc
3
3
  Rakefile
4
- hostelify.gemspec
5
4
  lib/hostelify.rb
6
5
  lib/hostelify/gomio.rb
7
6
  lib/hostelify/hostel.rb
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('hostelify', '0.4.6') do |p|
5
+ Echoe.new('hostelify', '0.4.7') do |p|
6
6
  p.description = "Simple Hostel Webscrapper."
7
7
  p.url = "http://github.com/holden/hostelify"
8
8
  p.author = "Holden Thomas"
data/hostelify.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hostelify}
5
- s.version = "0.4.6"
5
+ s.version = "0.4.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Holden Thomas"]
@@ -95,10 +95,10 @@ class Hostelbookers
95
95
  if available
96
96
  (available/"tr").each do |row|
97
97
  name = row.at("td.roomType/label/text()")
98
- people1 = row.at("td.people/select")
99
- people = people1.at("option:last-child").inner_text unless people.nil?
100
- price1 = row.at("td.price")
101
- price = price1.inner_text.to_s.match(/[\d.]{1,5}/)[0] unless price.nil?
98
+ people = row.at("td.people/select")
99
+ people = people.at("option:last-child").inner_text unless people.nil?
100
+ price = row.at("td.price")
101
+ price = price.inner_text.to_s.match(/[\d.]{1,5}/)[0] unless price.nil?
102
102
  (0..(options[:no_days].to_i-1)).each do |x|
103
103
  @availables << HostelifyAvailable.new(name,price,people,(date+x).to_s) unless price.nil?
104
104
  end
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  describe "all options" do
37
37
  before(:all) do
38
- @h = Hostelbookers.find_hostel_by_id(:location => "krakow,poland", :id => 9330, :all => true)
38
+ @h = Hostelbookers.find_hostel_by_id(:id => 9330, :all => true)
39
39
  end
40
40
 
41
41
  it "directions should have a certain length <" do
@@ -49,7 +49,7 @@ end
49
49
 
50
50
  describe "with dates to get availabilty and verify output!" do
51
51
  before(:all) do
52
- @h = Hostelbookers.find_hostel_by_id(:location => "krakow,poland", :id => 19831, :date => (Date.today+10).to_s)
52
+ @h = Hostelbookers.find_hostel_by_id(:id => 19831, :date => (Date.today+10).to_s)
53
53
  end
54
54
 
55
55
  it "get first availability and check it merit" do
@@ -57,7 +57,7 @@ describe "with dates to get availabilty and verify output!" do
57
57
  end
58
58
 
59
59
  it "check number of avail beds" do
60
- @h.availability.first.spots.to_i.should be > 1
60
+ @h.availability.first.spots.to_i.should be >= 1
61
61
  end
62
62
 
63
63
  it "last avail has a price > 5 US" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 6
9
- version: 0.4.6
8
+ - 7
9
+ version: 0.4.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Holden Thomas