holden-hostelify 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('hostelify', '0.2.9') do |p|
5
+ Echoe.new('hostelify', '0.3.0') 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.2.9"
5
+ s.version = "0.3.0"
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"]
@@ -8,9 +8,9 @@ class Hostelbookers
8
8
  @default_options = { :date => date=(Date.today+4).to_s, :no_days => "7", :live => true }
9
9
 
10
10
  def self.find_hostels_by_location(options) #location
11
-
12
- city = options[:location].split(',').first.gsub(' ','')
13
- country = options[:location].split(',').last.gsub(' ','')
11
+ city = options[:location].split(',').first.rstrip.lstrip.gsub(' ','-').squeeze("-")
12
+ country = options[:location].split(',').last.rstrip.lstrip.gsub(' ','-').squeeze("-")
13
+
14
14
  url = HB_PLURAL_HOSTELS_URL + "#{country}/#{city}"
15
15
 
16
16
  if options[:date]
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.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Holden Thomas
@@ -43,7 +43,6 @@ files:
43
43
  - spec/hw_find_hostels.spec
44
44
  has_rdoc: true
45
45
  homepage: http://github.com/holden/hostelify
46
- licenses:
47
46
  post_install_message:
48
47
  rdoc_options:
49
48
  - --line-numbers
@@ -69,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
68
  requirements: []
70
69
 
71
70
  rubyforge_project: hostelify
72
- rubygems_version: 1.3.5
71
+ rubygems_version: 1.2.0
73
72
  signing_key:
74
73
  specification_version: 2
75
74
  summary: Simple Hostel Webscrapper.