restaurant_week_boston 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/Gemfile +3 -0
- data/README.md +76 -0
- data/Rakefile +2 -0
- data/bin/restaurant_week_boston +1 -1
- data/lib/restaurant_week_boston/marker.rb +22 -31
- data/lib/restaurant_week_boston/restaurant.rb +36 -57
- data/lib/restaurant_week_boston/runner.rb +36 -31
- data/lib/restaurant_week_boston/scraper.rb +13 -37
- data/lib/restaurant_week_boston/version.rb +3 -0
- data/restaurant_week_boston.gemspec +11 -30
- metadata +72 -59
- data/README.rdoc +0 -65
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8e469d09d6cd1565e1d1490d3fa0f1af61bc132c
|
4
|
+
data.tar.gz: 7f6e1a215b9df8e4ab2b950f4843ff97a8a3a9aa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 10eedee62d2a77a7c12a32d31f6a1f15be4ffa26e258eb5c0a45c1520e1ecec4152e45ae5e2341148ce608bfbdbee72c46e1d77e0e92ef0e06c4c29571e73794
|
7
|
+
data.tar.gz: e133f04627a6148104e260070c35e2c7b4063bf0100ab331225ec7f7071c942a075484e47e5c7e76bd57854f67e0bd215ae32fb349da12c91f7e9f71d4d980f8
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Restaurant Week Boston
|
2
|
+
|
3
|
+
This is just a silly little gem I made that parses the [Restaurant Week
|
4
|
+
Boston](http://www.restaurantweekboston.com/) website and lets you mark which
|
5
|
+
ones you want to go to for lunch, dinner, or lunch and dinner. This gem assumes
|
6
|
+
you have a few restaurants in mind and want to quickly compare their
|
7
|
+
lunch/dinner menus in tabs.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
gem install restaurant_week_boston
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Use the `restaurant_week_boston` command line script. Call it with `--help` for
|
16
|
+
help.
|
17
|
+
|
18
|
+
So if you want to go to Bond and Aquitaine Bis for lunch or dinner, you'd do:
|
19
|
+
|
20
|
+
$ restaurant_week_boston --any 'aquitaine bis',bond
|
21
|
+
|
22
|
+
If you want to check out Artu for lunch:
|
23
|
+
|
24
|
+
$ restaurant_week_boston --lunch artu
|
25
|
+
|
26
|
+
Or maybe Artu's dinner sounds better:
|
27
|
+
|
28
|
+
$ restaurant_week_boston --dinner artu
|
29
|
+
|
30
|
+
### More involved demo
|
31
|
+
|
32
|
+
$ restaurant_week_boston -a 'aquitaine bis' -l bond,asana -d bergamot,clink
|
33
|
+
Getting doc...done.
|
34
|
+
Parsing doc...done.
|
35
|
+
|
36
|
+
=== LUNCH ===
|
37
|
+
Name: Asana (short-name: asana)
|
38
|
+
Meals: Lunch, Dinner
|
39
|
+
Neighborhood: Back Bay
|
40
|
+
Phone: 617-535-8800
|
41
|
+
Lunch Menu: http://www.restaurantweekboston.com/fetch/asana/lunch/
|
42
|
+
Dinner Menu: http://www.restaurantweekboston.com/fetch/asana/dinner/
|
43
|
+
Map: http://www.restaurantweekboston.com/map/back-bay/asana/#topOfMap
|
44
|
+
--------------------------------------------------------------------------------
|
45
|
+
Name: Bond (short-name: bond)
|
46
|
+
Meals: Lunch, Dinner
|
47
|
+
Neighborhood: Downtown
|
48
|
+
Phone: 617-451-1900
|
49
|
+
Lunch Menu: http://www.restaurantweekboston.com/fetch/bond/lunch/
|
50
|
+
Dinner Menu: http://www.restaurantweekboston.com/fetch/bond/dinner/
|
51
|
+
Map: http://www.restaurantweekboston.com/map/downtown/bond/#topOfMap
|
52
|
+
|
53
|
+
=== DINNER ===
|
54
|
+
Name: Bergamot (short-name: bergamot)
|
55
|
+
Meals: Dinner
|
56
|
+
Neighborhood: Somerville
|
57
|
+
Phone: <no phone given>
|
58
|
+
Dinner Menu: http://www.restaurantweekboston.com/fetch/bergamot/dinner/
|
59
|
+
Map: http://www.restaurantweekboston.com/map/somerville/bergamot/#topOfMap
|
60
|
+
--------------------------------------------------------------------------------
|
61
|
+
Name: Clink. at the Liberty Hotel (short-name: clink)
|
62
|
+
Meals: Lunch, Dinner
|
63
|
+
Neighborhood: Beacon Hill
|
64
|
+
Phone: 617-224-4004
|
65
|
+
Lunch Menu: http://www.restaurantweekboston.com/fetch/clink/lunch/
|
66
|
+
Dinner Menu: http://www.restaurantweekboston.com/fetch/clink/dinner/
|
67
|
+
Map: http://www.restaurantweekboston.com/map/beacon-hill/clink/#topOfMap
|
68
|
+
|
69
|
+
=== LUNCH OR DINNER ===
|
70
|
+
Name: Aquitaine Bis (short-name: aquitaine-bis)
|
71
|
+
Meals: Lunch, Dinner
|
72
|
+
Neighborhood: Chestnut Hill
|
73
|
+
Phone: 617-734-8400
|
74
|
+
Lunch Menu: http://www.restaurantweekboston.com/fetch/aquitaine-bis/lunch/
|
75
|
+
Dinner Menu: http://www.restaurantweekboston.com/fetch/aquitaine-bis/dinner/
|
76
|
+
Map: http://www.restaurantweekboston.com/map/chestnut-hill/aquitaine-bis/#topOfMap
|
data/Rakefile
ADDED
data/bin/restaurant_week_boston
CHANGED
@@ -4,6 +4,8 @@ module RestaurantWeekBoston
|
|
4
4
|
# Uses a given Scraper and marks restaurants as good for lunch, dinner, any,
|
5
5
|
# etc.
|
6
6
|
class Marker
|
7
|
+
NONE_REQUESTED = '[No restaurants requested]'
|
8
|
+
|
7
9
|
# +opts+ is a hash with keys for +:lunch+, +:dinner+, and +:any+.
|
8
10
|
# The values of each of these keys should be an array suitable for passing
|
9
11
|
# to Scraper#special_find().
|
@@ -12,52 +14,41 @@ module RestaurantWeekBoston
|
|
12
14
|
@opts = opts
|
13
15
|
end
|
14
16
|
|
17
|
+
# Print all of the requested restaurants.
|
18
|
+
def all
|
19
|
+
lunch
|
20
|
+
puts
|
21
|
+
dinner
|
22
|
+
puts
|
23
|
+
any
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
15
28
|
# Print out restaurants that are good for lunch.
|
16
29
|
def lunch
|
17
|
-
unless @lunch
|
18
|
-
if @opts.key?(:lunch)
|
19
|
-
@lunch = @scraper.special_find(@opts[:lunch])
|
20
|
-
else
|
21
|
-
@lunch = '[no lunch options specified]'
|
22
|
-
end
|
23
|
-
end
|
24
30
|
puts "=== LUNCH ==="
|
25
|
-
puts @lunch
|
31
|
+
puts find(@opts[:lunch])
|
26
32
|
end
|
27
33
|
|
28
34
|
# Print out restaurants that are good for dinner.
|
29
35
|
def dinner
|
30
|
-
unless @dinner
|
31
|
-
if @opts.key?(:dinner)
|
32
|
-
@dinner = @scraper.special_find(@opts[:dinner])
|
33
|
-
else
|
34
|
-
@dinner = '[no dinner options specified]'
|
35
|
-
end
|
36
|
-
end
|
37
36
|
puts "=== DINNER ==="
|
38
|
-
puts @dinner
|
37
|
+
puts find(@opts[:dinner])
|
39
38
|
end
|
40
39
|
|
41
40
|
# Print out restaurants that are good for lunch or dinner.
|
42
41
|
def any
|
43
|
-
unless @any
|
44
|
-
if @opts.key?(:any)
|
45
|
-
@any = @scraper.special_find(@opts[:any])
|
46
|
-
else
|
47
|
-
@any = '[no "lunch or dinner" options specified]'
|
48
|
-
end
|
49
|
-
end
|
50
42
|
puts "=== LUNCH OR DINNER ==="
|
51
|
-
puts @any
|
43
|
+
puts find(@opts[:any])
|
52
44
|
end
|
53
45
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
any()
|
46
|
+
def find(names)
|
47
|
+
if names
|
48
|
+
@scraper.special_find(names)
|
49
|
+
else
|
50
|
+
NONE_REQUESTED
|
51
|
+
end
|
61
52
|
end
|
62
53
|
end
|
63
54
|
end
|
@@ -15,117 +15,96 @@ module RestaurantWeekBoston
|
|
15
15
|
@entry = entry
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
18
|
# Compares this Restaurant's name to +other+'s name, and returns -1, 0, 1
|
20
19
|
# as appropriate.
|
21
20
|
def <=>(other)
|
22
|
-
|
21
|
+
name <=> other.name
|
23
22
|
end
|
24
23
|
|
25
|
-
|
26
24
|
# Generate a pretty representation of the Restaurant.
|
27
25
|
def to_s
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
s += "\n"
|
35
|
-
s += "Neighborhood: #{pretty_neighborhood}"
|
36
|
-
s += "\n"
|
37
|
-
s += "Phone: #{phone}"
|
26
|
+
s = <<-EOS
|
27
|
+
Name: #{name}
|
28
|
+
Meals: #{meals.map(&:capitalize).join(', ')}
|
29
|
+
Neighborhood: #{neighborhood}
|
30
|
+
Phone: #{phone}
|
31
|
+
EOS
|
38
32
|
@meals.each do |meal|
|
33
|
+
s += "#{meal.capitalize} Menu: #{menu_link_for(meal)}"
|
39
34
|
s += "\n"
|
40
|
-
s += "%s Menu: #{menu_link_for(meal)}" % [meal.capitalize]
|
41
35
|
end
|
42
|
-
s += "\n"
|
43
36
|
s += "Map: #{map_link}"
|
44
37
|
s
|
45
38
|
end
|
46
39
|
|
47
|
-
|
48
40
|
# Returns "<Restaurant: #{restaurant-name}>"
|
49
41
|
def inspect
|
50
42
|
"<Restaurant: #{name}>"
|
51
43
|
end
|
52
44
|
|
53
|
-
#
|
54
|
-
def
|
55
|
-
|
45
|
+
# Return the full name of this Restaurant, e.g. "224 Boston Street".
|
46
|
+
def name
|
47
|
+
@name ||= @entry.css('h4 a[href^="/restaurant"]').text.strip
|
56
48
|
end
|
57
49
|
|
58
|
-
|
59
|
-
def offers_dinner?
|
60
|
-
meals.include?('dinner')
|
61
|
-
end
|
50
|
+
private
|
62
51
|
|
63
52
|
# Return the short name (e.g. '224-boston-street' for "224 Boston Street").
|
64
53
|
def short_name
|
65
54
|
@short_name ||= @entry[:id].sub('restaurantID-', '')
|
66
55
|
end
|
67
56
|
|
68
|
-
# Return
|
69
|
-
def name
|
70
|
-
unless @name
|
71
|
-
# UGLY, but it's not wrapped in a tag so there it is.
|
72
|
-
# split: ["224", "Boston", "Street", "[", "map", "]"]
|
73
|
-
split = @entry.css('h4')[0].text.strip.split(/\s+/)
|
74
|
-
# Remove [[", "map", "]"]
|
75
|
-
split.slice!(-3, 3)
|
76
|
-
@name = split.join(' ')
|
77
|
-
end
|
78
|
-
@name
|
79
|
-
end
|
80
|
-
|
81
|
-
# Return a 0-2 element array containing the meals offered by this
|
57
|
+
# Return a 0 to 2 element array containing the meals offered by this
|
82
58
|
# Restaurant: "lunch" and/or "dinner".
|
83
59
|
def meals
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
60
|
+
@meals ||= find_meals
|
61
|
+
end
|
62
|
+
|
63
|
+
def find_meals
|
64
|
+
meals = []
|
65
|
+
unless @entry.xpath('.//strong[.="Lunch"]').empty?
|
66
|
+
meals << 'lunch'
|
67
|
+
end
|
68
|
+
unless @entry.xpath('.//strong[.="Dinner"]').empty?
|
69
|
+
meals << 'dinner'
|
90
70
|
end
|
91
|
-
|
71
|
+
meals
|
92
72
|
end
|
93
73
|
|
94
|
-
# Return the neighborhood this Restaurant is in (e.g. "
|
74
|
+
# Return the neighborhood this Restaurant is in (e.g. "Back Bay")
|
95
75
|
def neighborhood
|
96
|
-
|
76
|
+
@neighborhood ||= begin
|
97
77
|
link = @entry.css('a[@href*="neighborhood"]').first
|
98
|
-
|
78
|
+
ugly_neighborhood = link.attributes['href'].value.sub('/?neighborhood=', '')
|
79
|
+
# back-bay -> "Back Bay"
|
80
|
+
ugly_neighborhood.split('-').map { |x| x.capitalize }.join(' ')
|
99
81
|
end
|
100
|
-
@neighborhood
|
101
82
|
end
|
102
83
|
|
103
|
-
|
104
84
|
# Return this Restaurant's phone number, or "<no phone given>" is none is
|
105
85
|
# provided.
|
106
86
|
def phone
|
107
|
-
|
108
|
-
# UGLY, but it's not wrapped in a tag so there
|
87
|
+
@phone ||= begin
|
88
|
+
# UGLY, but it's not wrapped in a tag so there isn't really a better
|
89
|
+
# way.
|
109
90
|
phone = @entry.css('.restaurantInfoBasic > p').children[6].to_s
|
110
91
|
if phone == '<br>'
|
111
|
-
|
92
|
+
'<no phone given>'
|
112
93
|
else
|
113
|
-
|
94
|
+
phone.sub(/^[^0-9]+/, '').strip
|
114
95
|
end
|
115
96
|
end
|
116
|
-
@phone
|
117
97
|
end
|
118
98
|
|
119
99
|
# +meal+ should be either "lunch" or "dinner"
|
120
100
|
def menu_link_for(meal)
|
121
101
|
if meal == 'lunch'
|
122
|
-
|
102
|
+
"http://www.restaurantweekboston.com/fetch/#{short_name}/lunch/"
|
123
103
|
elsif meal == 'dinner'
|
124
|
-
|
104
|
+
"http://www.restaurantweekboston.com/fetch/#{short_name}/dinner/"
|
125
105
|
end
|
126
106
|
end
|
127
107
|
|
128
|
-
|
129
108
|
# Return the URL to the map of this Restaurant at the RWB web site.
|
130
109
|
def map_link
|
131
110
|
@map_link ||= "http://www.restaurantweekboston.com/map/#{neighborhood}/#{short_name}/#topOfMap"
|
@@ -5,51 +5,56 @@ require 'restaurant_week_boston/marker'
|
|
5
5
|
module RestaurantWeekBoston
|
6
6
|
# Used in the executable script, +restaurant_week_boston+.
|
7
7
|
class Runner
|
8
|
-
# Pass in ARGV.
|
9
8
|
def initialize(argv)
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
@argv = argv
|
10
|
+
@options = {
|
11
|
+
:meal => :all,
|
12
|
+
:neighborhood => :all,
|
13
|
+
}
|
14
|
+
end
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
def run
|
17
|
+
parse_options
|
18
|
+
scraper = Scraper.new
|
19
|
+
marker = Marker.new(scraper, marker_options)
|
20
|
+
puts marker.all
|
21
|
+
end
|
18
22
|
|
19
|
-
|
20
|
-
|
21
|
-
|
23
|
+
private
|
24
|
+
|
25
|
+
def marker_options
|
26
|
+
{
|
27
|
+
:any => @options[:any],
|
28
|
+
:dinner => @options[:dinner],
|
29
|
+
:lunch => @options[:lunch],
|
30
|
+
}
|
31
|
+
end
|
22
32
|
|
23
|
-
|
24
|
-
|
33
|
+
def parse_options
|
34
|
+
option_parser.parse!(@argv)
|
35
|
+
end
|
36
|
+
|
37
|
+
def option_parser
|
38
|
+
OptionParser.new do |opts|
|
39
|
+
opts.banner = "Usage: #{$0} [-l r1,... | -d r1,... | -a r1,... ]"
|
40
|
+
|
41
|
+
opts.on('-l', '--lunch RESTO1,RESTO2', 'Mark restaurants as good for lunch') do |lunches|
|
42
|
+
@options[:lunch] = lunches.split(',')
|
25
43
|
end
|
26
44
|
|
27
|
-
opts.on('-
|
28
|
-
options[:
|
45
|
+
opts.on('-d', '--dinner RESTO1,RESTO2', 'Mark restaurants as good for dinner') do |dinners|
|
46
|
+
@options[:dinner] = dinners.split(',')
|
29
47
|
end
|
30
48
|
|
31
|
-
|
32
|
-
|
33
|
-
'Only get restaurants in this neighborhood (dorchester, back-bay, etc)') do |n|
|
34
|
-
n = :all if n == 'any' # :any makes it choke
|
35
|
-
options[:neighborhood] = n
|
49
|
+
opts.on('-a', '--any RESTO1,RESTO2', 'Mark restaurants as good for either lunch or dinner') do |any|
|
50
|
+
@options[:any] = any.split(',')
|
36
51
|
end
|
37
52
|
|
38
53
|
opts.on('-h', '--help', 'Display this help') do
|
39
54
|
puts opts
|
40
|
-
|
55
|
+
exit 0
|
41
56
|
end
|
42
57
|
end
|
43
|
-
optparse.parse!(argv)
|
44
|
-
@options = options
|
45
|
-
end
|
46
|
-
|
47
|
-
def run
|
48
|
-
scraper = Scraper.new(:meal => @options[:meal],
|
49
|
-
:neighborhood => @options[:neighborhood])
|
50
|
-
marker = Marker.new(scraper, @options)
|
51
|
-
|
52
|
-
puts marker.all
|
53
58
|
end
|
54
59
|
end
|
55
60
|
end
|
@@ -7,33 +7,14 @@ module RestaurantWeekBoston
|
|
7
7
|
# Scrapes Restaurant Week site.
|
8
8
|
class Scraper
|
9
9
|
include Enumerable
|
10
|
-
# +opts+ is a hash of options, with the following keys:
|
11
|
-
# :neighborhood:: dorchester, back-bay, etc. (default: "all")
|
12
|
-
# :meal:: lunch, dinner, both, or any (default: "any"). Will create a
|
13
|
-
# file in your home directory called ".restaurant_week_boston.cache"
|
14
|
-
# which contains the HTML from the RWB site, just so it doesn't have to
|
15
|
-
# keep getting it. You can delete that file, it'll just take longer next
|
16
|
-
# time since it will have to re-get the HTML.
|
17
|
-
def initialize(opts = {})
|
18
|
-
@url = create_url(opts)
|
19
|
-
@dump = File.expand_path('~/.restaurant_week_boston.cache')
|
20
|
-
entries = doc().css('.restaurantEntry')
|
21
|
-
@restaurants = entries.map{ |entry| Restaurant.new(entry) }
|
22
|
-
end
|
23
10
|
|
24
|
-
|
25
|
-
# :neighborhood:: dorchester, back-bay, etc. (default: :all)
|
26
|
-
# :meal:: lunch, dinner, both, or any (default: :any)
|
27
|
-
def create_url(opts = {})
|
28
|
-
# meal: any/lunch/dinner/both
|
29
|
-
# &view=all
|
30
|
-
default_opts = {:neighborhood => :all,
|
31
|
-
:meal => :any }
|
32
|
-
opts = default_opts.merge!(opts)
|
33
|
-
sprintf('http://www.restaurantweekboston.com/?neighborhood=%s&meal=%s&view=all',
|
34
|
-
opts[:neighborhood].to_s, opts[:meal].to_s)
|
35
|
-
end
|
11
|
+
URL = "http://www.restaurantweekboston.com/?neighborhood=all&meal=all&view=all&cuisine=all"
|
36
12
|
|
13
|
+
def initialize
|
14
|
+
@cache = File.expand_path('~/.restaurant_week_boston.cache')
|
15
|
+
entries = doc().css('.restaurantEntry')
|
16
|
+
@restaurants = entries.map { |entry| Restaurant.new(entry) }
|
17
|
+
end
|
37
18
|
|
38
19
|
# Iterates over @restaurants. All methods in Enumerable work.
|
39
20
|
def each(&blk)
|
@@ -43,13 +24,11 @@ module RestaurantWeekBoston
|
|
43
24
|
# Returns the result of open()ing the url from create_url(), as a String.
|
44
25
|
def get_html
|
45
26
|
print "Getting doc..."
|
46
|
-
if File.size?
|
47
|
-
html = File.read(@
|
27
|
+
if File.size?(@cache)
|
28
|
+
html = File.read(@cache)
|
48
29
|
else
|
49
|
-
html = open(
|
50
|
-
|
51
|
-
f.write(html)
|
52
|
-
f.close()
|
30
|
+
html = open(URL).read
|
31
|
+
IO.write(@cache, html)
|
53
32
|
end
|
54
33
|
puts "done."
|
55
34
|
html
|
@@ -71,15 +50,12 @@ module RestaurantWeekBoston
|
|
71
50
|
# thinking of, and this will get those. So, if you're thinking of Bond,
|
72
51
|
# 224 Boston Street, and Artu, you can pass in ['bond', 'boston street',
|
73
52
|
# 'artu'].
|
74
|
-
def special_find(
|
75
|
-
array.map! do |name|
|
76
|
-
/#{Regexp.escape(name)}/i
|
77
|
-
end
|
53
|
+
def special_find(names)
|
78
54
|
results = @restaurants.find_all do |restaurant|
|
79
|
-
|
55
|
+
names.detect { |name| name.casecmp(restaurant.name) == 0 }
|
80
56
|
end
|
81
57
|
# Add separators
|
82
|
-
results.join("\n" +
|
58
|
+
results.join("\n" + ("-" * 80) + "\n")
|
83
59
|
end
|
84
60
|
end
|
85
61
|
end
|
@@ -1,44 +1,25 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'restaurant_week_boston/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = %q{restaurant_week_boston}
|
8
9
|
s.version = RestaurantWeekBoston::VERSION
|
9
10
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gabe Berke-Williams"]
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
|
15
|
-
s.
|
16
|
-
s.
|
17
|
-
s.executables = ["restaurant_week_boston"]
|
18
|
-
s.default_executable = %q{restaurant_week_boston}
|
19
|
-
s.files = [
|
20
|
-
"ChangeLog",
|
21
|
-
"LICENSE",
|
22
|
-
"README.rdoc",
|
23
|
-
"bin/restaurant_week_boston",
|
24
|
-
"lib/restaurant_week_boston.rb",
|
25
|
-
"lib/restaurant_week_boston/scraper.rb",
|
26
|
-
"lib/restaurant_week_boston/marker.rb",
|
27
|
-
"lib/restaurant_week_boston/restaurant.rb",
|
28
|
-
"lib/restaurant_week_boston/runner.rb",
|
29
|
-
"restaurant_week_boston.gemspec"
|
30
|
-
]
|
12
|
+
s.summary= 'A fast, easy way to search the Boston Restaurant Week site and mark your favorites.'
|
13
|
+
s.email = 'gabebw@gabebw.com'
|
14
|
+
|
15
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
16
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
31
17
|
s.homepage = %q{http://github.com/gabebw/restaurant_week_boston}
|
32
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
33
18
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = %q{1.3.7}
|
35
19
|
s.test_files = []
|
36
|
-
|
37
|
-
if s.respond_to? :specification_version then
|
38
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
39
|
-
s.specification_version = 3
|
40
|
-
end
|
20
|
+
s.license = "MIT"
|
41
21
|
|
42
22
|
s.add_dependency(%q<nokogiri>, [">= 1.4.3.0"])
|
23
|
+
s.add_development_dependency "bundler", "~> 1.12"
|
24
|
+
s.add_development_dependency "rake", "~> 10.0"
|
43
25
|
end
|
44
|
-
|
metadata
CHANGED
@@ -1,88 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: restaurant_week_boston
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 1
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 1.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Gabe Berke-Williams
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2016-09-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: nokogiri
|
22
|
-
|
23
|
-
|
24
|
-
none: false
|
25
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
26
17
|
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 4
|
31
|
-
- 3
|
32
|
-
- 0
|
18
|
+
- !ruby/object:Gem::Version
|
33
19
|
version: 1.4.3.0
|
34
20
|
type: :runtime
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.4.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description:
|
56
|
+
email: gabebw@gabebw.com
|
57
|
+
executables:
|
39
58
|
- restaurant_week_boston
|
40
59
|
extensions: []
|
41
|
-
|
42
|
-
|
43
|
-
-
|
44
|
-
files:
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
45
63
|
- ChangeLog
|
64
|
+
- Gemfile
|
46
65
|
- LICENSE
|
47
|
-
- README.
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
48
68
|
- bin/restaurant_week_boston
|
49
69
|
- lib/restaurant_week_boston.rb
|
50
|
-
- lib/restaurant_week_boston/scraper.rb
|
51
70
|
- lib/restaurant_week_boston/marker.rb
|
52
71
|
- lib/restaurant_week_boston/restaurant.rb
|
53
72
|
- lib/restaurant_week_boston/runner.rb
|
73
|
+
- lib/restaurant_week_boston/scraper.rb
|
74
|
+
- lib/restaurant_week_boston/version.rb
|
54
75
|
- restaurant_week_boston.gemspec
|
55
|
-
has_rdoc: true
|
56
76
|
homepage: http://github.com/gabebw/restaurant_week_boston
|
57
|
-
licenses:
|
58
|
-
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
59
80
|
post_install_message:
|
60
|
-
rdoc_options:
|
61
|
-
|
62
|
-
require_paths:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
63
83
|
- lib
|
64
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
|
66
|
-
requirements:
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
67
86
|
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
75
91
|
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
- 0
|
79
|
-
version: "0"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
80
94
|
requirements: []
|
81
|
-
|
82
95
|
rubyforge_project:
|
83
|
-
rubygems_version:
|
96
|
+
rubygems_version: 2.5.1
|
84
97
|
signing_key:
|
85
|
-
specification_version:
|
86
|
-
summary: A fast, easy way to search the Boston Restaurant Week site and mark your
|
98
|
+
specification_version: 4
|
99
|
+
summary: A fast, easy way to search the Boston Restaurant Week site and mark your
|
100
|
+
favorites.
|
87
101
|
test_files: []
|
88
|
-
|
data/README.rdoc
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
= Restaurant Week Boston
|
2
|
-
This is just a silly little gem I made that parses the Restaurant Week
|
3
|
-
Boston (http://www.restaurantweekboston.com/) website and lets you mark which
|
4
|
-
ones you want to go to for lunch, dinner, or lunch and dinner.
|
5
|
-
|
6
|
-
= Installation
|
7
|
-
<tt>gem install restaurant_week_boston</tt>
|
8
|
-
|
9
|
-
= Usage
|
10
|
-
Use the +restaurant_week_boston+ command line script.
|
11
|
-
Use -a/--all, -l/--lunch, and -d/--dinner options to mark restaurants that
|
12
|
-
you want to go to for lunch *and* dinner, lunch, or dinner, respectively.
|
13
|
-
|
14
|
-
So if you want to go to Bond and Aquitaine Bis for lunch and dinner, you'd
|
15
|
-
do
|
16
|
-
|
17
|
-
<tt>$ restaurant_week_boston -a 'aquitaine bis',bond</tt>
|
18
|
-
|
19
|
-
=== More involved demo
|
20
|
-
|
21
|
-
<tt>$ restaurant_week_boston -a 'aquitaine bis' -l bond,asana -d bergamot,clink</tt>
|
22
|
-
Getting doc...done.
|
23
|
-
Parsing doc...done.
|
24
|
-
|
25
|
-
=== LUNCH ===
|
26
|
-
Name: Asana (short-name: asana)
|
27
|
-
Meals: Lunch, Dinner
|
28
|
-
Neighborhood: Back Bay
|
29
|
-
Phone: 617-535-8800
|
30
|
-
Lunch Menu: http://www.restaurantweekboston.com/fetch/asana/lunch/
|
31
|
-
Dinner Menu: http://www.restaurantweekboston.com/fetch/asana/dinner/
|
32
|
-
Map: http://www.restaurantweekboston.com/map/back-bay/asana/#topOfMap
|
33
|
-
--------------------------------------------------------------------------------
|
34
|
-
Name: Bond (short-name: bond)
|
35
|
-
Meals: Lunch, Dinner
|
36
|
-
Neighborhood: Downtown
|
37
|
-
Phone: 617-451-1900
|
38
|
-
Lunch Menu: http://www.restaurantweekboston.com/fetch/bond/lunch/
|
39
|
-
Dinner Menu: http://www.restaurantweekboston.com/fetch/bond/dinner/
|
40
|
-
Map: http://www.restaurantweekboston.com/map/downtown/bond/#topOfMap
|
41
|
-
|
42
|
-
=== DINNER ===
|
43
|
-
Name: Bergamot (short-name: bergamot)
|
44
|
-
Meals: Dinner
|
45
|
-
Neighborhood: Somerville
|
46
|
-
Phone: <no phone given>
|
47
|
-
Dinner Menu: http://www.restaurantweekboston.com/fetch/bergamot/dinner/
|
48
|
-
Map: http://www.restaurantweekboston.com/map/somerville/bergamot/#topOfMap
|
49
|
-
--------------------------------------------------------------------------------
|
50
|
-
Name: Clink. at the Liberty Hotel (short-name: clink)
|
51
|
-
Meals: Lunch, Dinner
|
52
|
-
Neighborhood: Beacon Hill
|
53
|
-
Phone: 617-224-4004
|
54
|
-
Lunch Menu: http://www.restaurantweekboston.com/fetch/clink/lunch/
|
55
|
-
Dinner Menu: http://www.restaurantweekboston.com/fetch/clink/dinner/
|
56
|
-
Map: http://www.restaurantweekboston.com/map/beacon-hill/clink/#topOfMap
|
57
|
-
|
58
|
-
=== LUNCH OR DINNER ===
|
59
|
-
Name: Aquitaine Bis (short-name: aquitaine-bis)
|
60
|
-
Meals: Lunch, Dinner
|
61
|
-
Neighborhood: Chestnut Hill
|
62
|
-
Phone: 617-734-8400
|
63
|
-
Lunch Menu: http://www.restaurantweekboston.com/fetch/aquitaine-bis/lunch/
|
64
|
-
Dinner Menu: http://www.restaurantweekboston.com/fetch/aquitaine-bis/dinner/
|
65
|
-
Map: http://www.restaurantweekboston.com/map/chestnut-hill/aquitaine-bis/#topOfMap
|