holden-hostelify 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -7,22 +7,22 @@ lib/hostelify/gomio.rb
7
7
  lib/hostelify/hostelbookers.rb
8
8
  lib/hostelify/hostelify.rb
9
9
  lib/hostelify/hostelworld.rb
10
- pkg/hostelify-0.3.5.gem
11
- pkg/hostelify-0.3.5.tar.gz
12
- pkg/hostelify-0.3.5/Manifest
13
- pkg/hostelify-0.3.5/README.rdoc
14
- pkg/hostelify-0.3.5/Rakefile
15
- pkg/hostelify-0.3.5/hostelify.gemspec
16
- pkg/hostelify-0.3.5/lib/hostelify.rb
17
- pkg/hostelify-0.3.5/lib/hostelify/gomio.rb
18
- pkg/hostelify-0.3.5/lib/hostelify/hostelbookers.rb
19
- pkg/hostelify-0.3.5/lib/hostelify/hostelify.rb
20
- pkg/hostelify-0.3.5/lib/hostelify/hostelworld.rb
21
- pkg/hostelify-0.3.5/spec/_helper.rb
22
- pkg/hostelify-0.3.5/spec/hb_find_by_hostel.spec
23
- pkg/hostelify-0.3.5/spec/hb_find_hostels.spec
24
- pkg/hostelify-0.3.5/spec/hw_find_by_hostel.spec
25
- pkg/hostelify-0.3.5/spec/hw_find_hostels.spec
10
+ pkg/hostelify-0.3.6.gem
11
+ pkg/hostelify-0.3.6.tar.gz
12
+ pkg/hostelify-0.3.6/Manifest
13
+ pkg/hostelify-0.3.6/README.rdoc
14
+ pkg/hostelify-0.3.6/Rakefile
15
+ pkg/hostelify-0.3.6/hostelify.gemspec
16
+ pkg/hostelify-0.3.6/lib/hostelify.rb
17
+ pkg/hostelify-0.3.6/lib/hostelify/gomio.rb
18
+ pkg/hostelify-0.3.6/lib/hostelify/hostelbookers.rb
19
+ pkg/hostelify-0.3.6/lib/hostelify/hostelify.rb
20
+ pkg/hostelify-0.3.6/lib/hostelify/hostelworld.rb
21
+ pkg/hostelify-0.3.6/spec/_helper.rb
22
+ pkg/hostelify-0.3.6/spec/hb_find_by_hostel.spec
23
+ pkg/hostelify-0.3.6/spec/hb_find_hostels.spec
24
+ pkg/hostelify-0.3.6/spec/hw_find_by_hostel.spec
25
+ pkg/hostelify-0.3.6/spec/hw_find_hostels.spec
26
26
  spec/_helper.rb
27
27
  spec/hb_find_by_hostel.spec
28
28
  spec/hb_find_hostels.spec
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('hostelify', '0.3.5') do |p|
5
+ Echoe.new('hostelify', '0.3.6') do |p|
6
6
  p.description = "Simple Hostel Webscrapper."
7
7
  p.url = "http://github.com/holden/hostelify"
8
8
  p.author = "Holden Thomas"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hostelify}
5
- s.version = "0.3.5"
5
+ s.version = "0.3.6"
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"]
@@ -206,6 +206,8 @@ class Hostelworld
206
206
  form.field_with(:name => 'selDay').options[day-1].select
207
207
  form.field_with(:name => 'selYear').options[year].select
208
208
  form.field_with(:name => 'NumNights').options[no_days.to_i-1].select
209
+ form.field_with(:name => 'Persons').options[no_ppl.to_i-1].select
210
+ form.field_with(:name => 'Currency').options[4].select #US Currency
209
211
 
210
212
  Retryable.try 3 do
211
213
  page = agent.submit(form)
@@ -61,7 +61,8 @@ end
61
61
 
62
62
  describe "with dates to get availabilty and verify output!" do
63
63
  before(:all) do
64
- @h = Hostelworld.find_hostel_by_id(:id => 20763, :date => (Date.today+20).to_s)
64
+ #@h = Hostelworld.find_hostel_by_id(:id => 20763, :date => (Date.today+20).to_s)
65
+ @h = Hostelworld.find_hostel_by_id(:id => 7113, :date => (Date.today+20).to_s)
65
66
  end
66
67
 
67
68
  it "get first availability and check it merit" do
@@ -69,11 +70,11 @@ describe "with dates to get availabilty and verify output!" do
69
70
  end
70
71
 
71
72
  it "check number of avail beds" do
72
- @h.availability.first.spots.to_i.should be >= 1
73
+ @h.availability.last.spots.to_i.should be >= 1
73
74
  end
74
75
 
75
76
  it "last avail has a price > 5 US" do
76
- @h.availability.first.price.to_i.should be > 5
77
+ @h.availability.last.price.to_i.should be > 5
77
78
  end
78
79
 
79
80
  it "book date eq today + 10" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holden-hostelify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Holden Thomas