ma_breweries 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3fb5f15bbc1a8d1f4068b443020a095d948013296319c9408a2f6e9d70efd40
4
- data.tar.gz: dfeea8b72bda4d870722ae468d4d15aea1cb3d1237f683600f0fccdadca1e6ca
3
+ metadata.gz: 1134c924b6dc7e2ca7d30a9243ae07345f4252bf81fea2a6cfdea771c60f6487
4
+ data.tar.gz: a42b4d4ef06ff9b89a41536973a586ce57edef10bbf6fc7ceeca10e3668ceac2
5
5
  SHA512:
6
- metadata.gz: 8f368f7f80c25543cc8c82072910b9b9c7bfc2a28b0e71fec21eea270fb362dea08c193ea83fc5ac0e912d41c8f763276def2534814fc7621760873478701963
7
- data.tar.gz: a30e666b0cd168ce4878f0367660af2bcc90ec8636713610950ffc8b201e7310eb78dfabf57e268a74d2d360b2fb6e9381bad5153487b04f01f2eaf24afa34ad
6
+ metadata.gz: 4bec02233311a6d6163ba4910425b452979e7e96aff442d6133090d9235a606b85e6a7fb8124c4a85cc5576fb376aa173a404e054f6e233aacfd671b0a20ff59
7
+ data.tar.gz: 6e58370a1e3cc66eb50bbe5334f61ccbf95bc3d77cf0868d6fe35171ed8f166f25b52d5ffb61832b2b90817f41ec9a536ef7c89be77be9a935de6004ea3df1ba
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MaBreweries
2
2
 
3
- Brewery search that allows you to find all of the local Massachusetts breweries. You are able to list all of the breweries by name in a numbered list. Also you can search all of the breweries by Name, Brewery type, Street, and City. This CLI project is based on the Open Brewery DB API.
3
+ Brewery search that allows you to find all of the local Massachusetts breweries. You are able to list all of the breweries by name in a numbered list. Also you can search all of the breweries by Name, Brewery type, and City. This CLI project is based on the Open Brewery DB API.
4
4
  ## Installation
5
5
 
6
6
  Add this line to your application's Gemfile:
@@ -31,9 +31,9 @@ class MaBreweries::BREWERY
31
31
  self.all.select {|brewery| brewery.brewery_type.downcase == brewery_type.downcase}
32
32
  end
33
33
 
34
- def self.find_by_street(street)
35
- self.all.select {|brewery| brewery.street.downcase == street.downcase}
36
- end
34
+ # def self.find_by_street(street)
35
+ # self.all.select {|brewery| brewery.street.downcase == street.downcase}
36
+ # end
37
37
 
38
38
  def self.find_by_city(city)
39
39
  self.all.select {|brewery| brewery.city.downcase == city.downcase}
@@ -30,14 +30,15 @@ class MaBreweries::CLI
30
30
  puts "\n"
31
31
 
32
32
  menu
33
+ puts "\n"
33
34
  brewery_input = gets.chomp.downcase
34
35
  while (brewery_input != "exit")
35
36
  if brewery_input == "name"
36
37
  search_breweries_by_name
37
38
  elsif brewery_input == "type"
38
39
  search_breweries_by_type
39
- elsif brewery_input == "street"
40
- search_breweries_by_street
40
+ # elsif brewery_input == "street"
41
+ # search_breweries_by_street
41
42
  elsif brewery_input == "city"
42
43
  search_breweries_by_city
43
44
  elsif brewery_input == "all"
@@ -45,9 +46,11 @@ class MaBreweries::CLI
45
46
  else
46
47
  puts " ** I am sorry you won't find any brews that way! ** "
47
48
  end
49
+ puts "\n"
48
50
  menu
49
51
  brewery_input = gets.chomp.downcase
50
52
  end
53
+ puts "\n"
51
54
  puts " ** Peace out! Have fun and drive carefully! ** "
52
55
  end
53
56
 
@@ -56,15 +59,16 @@ class MaBreweries::CLI
56
59
  puts "\n"
57
60
  puts " * To search by brewery name please enter - Name"
58
61
  puts " * To search by brewery type please enter - Type"
59
- puts " * To search by street name please enter - Street"
62
+ # puts " * To search by street name please enter - Street"
60
63
  puts " * To search by city please enter - City"
61
64
  puts " * To list all the breweries by name please enter - All"
62
- puts "\n"
63
65
  puts " * To exit please enter - exit"
66
+
64
67
  end
65
68
 
66
69
  def search_breweries_by_name
67
70
  puts "Please enter the brewery name: "
71
+ puts "\n"
68
72
  input = gets.chomp
69
73
  brewery = MaBreweries::BREWERY.find_by_name(input)
70
74
  if brewery
@@ -74,6 +78,7 @@ class MaBreweries::CLI
74
78
 
75
79
  def search_breweries_by_type
76
80
  puts "Please enter the brewery type: "
81
+ puts "\n"
77
82
  input = gets.chomp
78
83
  breweries = MaBreweries::BREWERY.find_by_brewery_type(input)
79
84
  if breweries
@@ -84,21 +89,22 @@ class MaBreweries::CLI
84
89
  end
85
90
  end
86
91
 
87
- def search_breweries_by_street
88
- puts "Pease enter the street you think the brews are on:"
89
- input = gets.chomp
90
- breweries = MaBreweries::BREWERY.find_by_street(input)
91
- if breweries
92
- breweries.each do |brewery|
93
- brewery.brew_info
94
- puts "\n"
95
- end
96
- end
97
- end
92
+ # def search_breweries_by_street
93
+ # puts "Pease enter the street you think the brews are on:"
94
+ # input = gets.chomp
95
+ # breweries = MaBreweries::BREWERY.find_by_street(input)
96
+ # if breweries
97
+ # breweries.each do |brewery|
98
+ # brewery.brew_info
99
+ # puts "\n"
100
+ # end
101
+ # end
102
+ # end
98
103
 
99
104
 
100
105
  def search_breweries_by_city
101
106
  puts "Please enter the city you would like to search in:"
107
+ puts"\n"
102
108
  input = gets.chomp
103
109
  breweries = MaBreweries::BREWERY.find_by_city(input)
104
110
  if breweries
@@ -1,3 +1,3 @@
1
1
  module MaBreweries
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ma_breweries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Justin Beaulieu'"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-08 00:00:00.000000000 Z
11
+ date: 2019-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler