burger_game 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/burger_game.gemspec +1 -1
- data/lib/customer_request.rb +4 -2
- data/lib/recipe.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016a5be00bfc91801f7968d288aedbd6c465a83661bef6f2ce9eec89c53a2393
|
4
|
+
data.tar.gz: b4642b36acc216fdad31819e88855f076c925e49cc0ddd480cdeb7c21b4e5d1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45fb5e026aa06c0b7083550cc5c79143b6a4a04a8a56d7e139d2ee7304527e578a8111cf56a6380d5cb8c2840d7b4c0fc1bfccaf0f8ecca79ed4d6f7a01d25a5
|
7
|
+
data.tar.gz: 8f3fd3ff6e8f60c484256f830f873b9bc08822ad09f71863f0a5d310f01f64c93bfd37f2dc487cccb659ba387c4bd8d3b2fa6548bd30f5019cc73ace1c8bc913
|
data/burger_game.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "burger_game"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.6"
|
4
4
|
s.summary = "A Ruby Burger Game"
|
5
5
|
s.description = "A simple text-based Ruby terminal game, that simulates a burger shop, where you need to build the meal for the customers with different requests and preferences."
|
6
6
|
s.authors = ["Jessica Gozali"]
|
data/lib/customer_request.rb
CHANGED
@@ -5,7 +5,8 @@ class CustomerRequest
|
|
5
5
|
# ERROR HANDLING for reading files
|
6
6
|
begin
|
7
7
|
# Read customer_request.JSON file
|
8
|
-
customer_file = File.read('customer_request.json')
|
8
|
+
customer_file = File.read(File.join(File.dirname(__FILE__), './customer_request.json'))
|
9
|
+
|
9
10
|
rescue Errno::ENOENT => e
|
10
11
|
puts "Could not find customer_request.json file. Please put customer_request.json in the 'data' directory."
|
11
12
|
puts e.message
|
@@ -18,7 +19,8 @@ class CustomerRequest
|
|
18
19
|
|
19
20
|
begin
|
20
21
|
# Read customer_response.JSON file
|
21
|
-
response_file = File.read('customer_response.json')
|
22
|
+
response_file = File.read(File.join(File.dirname(__FILE__), './customer_response.json'))
|
23
|
+
|
22
24
|
rescue Errno::ENOENT => e
|
23
25
|
puts "Could not find customer_response.json file. Please put customer_response.json in the 'data' directory."
|
24
26
|
puts e.message
|
data/lib/recipe.rb
CHANGED
@@ -8,7 +8,8 @@ class Recipe
|
|
8
8
|
# ERROR HANDLING for reading files
|
9
9
|
begin
|
10
10
|
# Read recipe.JSON file
|
11
|
-
file = File.read('recipe.json')
|
11
|
+
file = File.read(File.join(File.dirname(__FILE__), './recipe.json'))
|
12
|
+
|
12
13
|
rescue Errno::ENOENT => e
|
13
14
|
puts "Could not find recipe.json file. Please put recipe.json in the 'data' directory."
|
14
15
|
puts e.message
|