nutrition_facts 0.8.0 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 051c404a01d0b641b7bc51261222a5ea1c1558ee
4
- data.tar.gz: c0d1671d2114dc1e7b853d858426aca7f09c8007
3
+ metadata.gz: e2748a305d7ff1f00d7a4dcaf2bb3aa7437afd7f
4
+ data.tar.gz: 909b426f8ac1e05d8f026bd3aa0738af485284d7
5
5
  SHA512:
6
- metadata.gz: 98580bf36402ecf548a7a35aff490028ebd22fa71f356789d2ad97a2c1fa2162eb7ccc543d264fe95a8e66aa9c3c1011a165fb184d455b0f26665b9ee5563cf7
7
- data.tar.gz: 7a7c8a8696063cb3eb18e4dee7bcb9df6e0d71c0617ea75da168d26398abe6869a38f70c473cbe3103a5f87f06110978a7a19372bd191e9dd2c50bca2ada4591
6
+ metadata.gz: 02522350e08530266bd2215b23f576e54457795eb79a2ca7dfc2e98ed0423640964e8e3160072a93bf5ea4bb8a32402b380b5c9f040092f6a4be9fb1486ac34e
7
+ data.tar.gz: 83d59194a1f28c1687f9fad885f33e94b88549119e259ae3adcdd75eb51268d39fb76fc1535a22fedcc41446a4f50f976ec12faae17b82ab155718380f252c8f
@@ -90,22 +90,22 @@ class NutritionFacts::CLI
90
90
  puts ''
91
91
  puts food_item_data.item_name.to_s
92
92
  puts '---'
93
- puts "Serving Size: #{food_item_data.nf_serving_size_qty} #{food_item_data.nf_serving_size_unit}"
94
- puts "Serving Weight: #{food_item_data.nf_serving_weight_grams}g"
95
- puts "Calories: #{food_item_data.nf_calories} kcal"
96
- puts "Calories from fat: #{food_item_data.nf_calories_from_fat} kcal"
97
- puts "Total Fat: #{food_item_data.nf_total_fat}g"
98
- puts "Saturated Fat: #{food_item_data.nf_saturated_fat}g"
99
- puts "Cholesterol: #{food_item_data.nf_cholesterol}mg"
100
- puts "Protein: #{food_item_data.nf_protein}g"
101
- puts "Total Carbohydrates: #{food_item_data.nf_total_carbohydrate}g"
102
- puts "Sugar: #{food_item_data.nf_sugars}g"
103
- puts "Dietary Fiber: #{food_item_data.nf_dietary_fiber}g"
104
- puts "Sodium: #{food_item_data.nf_sodium}mg"
105
- puts "Vitamin C: #{food_item_data.nf_vitamin_c_dv}%"
106
- puts "Vitamin A: #{food_item_data.nf_vitamin_a_dv}%"
107
- puts "Calcium: #{food_item_data.nf_calcium_dv}%"
108
- puts "Iron: #{food_item_data.nf_iron_dv}%"
93
+ puts "Serving Size: #{food_item_data.nf_serving_size_qty} #{food_item_data.nf_serving_size_unit}" unless food_item_data.nf_serving_size_unit.nil?
94
+ puts "Serving Weight: #{food_item_data.nf_serving_weight_grams}g" unless food_item_data.nf_serving_weight_grams.nil?
95
+ puts "Calories: #{food_item_data.nf_calories} kcal" unless food_item_data.nf_calories.nil?
96
+ puts "Calories from fat: #{food_item_data.nf_calories_from_fat} kcal" unless food_item_data.nf_calories_from_fat.nil?
97
+ puts "Total Fat: #{food_item_data.nf_total_fat}g" unless food_item_data.nf_total_fat.nil?
98
+ puts "Saturated Fat: #{food_item_data.nf_saturated_fat}g" unless food_item_data.nf_saturated_fat.nil?
99
+ puts "Cholesterol: #{food_item_data.nf_cholesterol}mg" unless food_item_data.nf_cholesterol.nil?
100
+ puts "Protein: #{food_item_data.nf_protein}g" unless food_item_data.nf_protein.nil?
101
+ puts "Total Carbohydrates: #{food_item_data.nf_total_carbohydrate}g" unless food_item_data.nf_total_carbohydrate.nil?
102
+ puts "Sugar: #{food_item_data.nf_sugars}g" unless food_item_data.nf_sugars.nil?
103
+ puts "Dietary Fiber: #{food_item_data.nf_dietary_fiber}g" unless food_item_data.nf_dietary_fiber.nil?
104
+ puts "Sodium: #{food_item_data.nf_sodium}mg" unless food_item_data.nf_sodium.nil?
105
+ puts "Vitamin C: #{food_item_data.nf_vitamin_c_dv}%" unless food_item_data.nf_vitamin_c_dv.nil?
106
+ puts "Vitamin A: #{food_item_data.nf_vitamin_a_dv}%" unless food_item_data.nf_vitamin_a_dv.nil?
107
+ puts "Calcium: #{food_item_data.nf_calcium_dv}%" unless food_item_data.nf_calcium_dv.nil?
108
+ puts "Iron: #{food_item_data.nf_iron_dv}%" unless food_item_data.nf_iron_dv.nil?
109
109
  loop_or_quit
110
110
  end
111
111
  end
@@ -1,3 +1,3 @@
1
1
  module NutritionFacts
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutrition_facts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Preiser