real_talk 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/real_talk +3 -0
  3. data/lib/real_talk.rb +115 -0
  4. metadata +49 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a1519b71af4468329cc20eaa70378ba231991f06
4
+ data.tar.gz: a651aa968b652226805fc48afe1b344a460272e9
5
+ SHA512:
6
+ metadata.gz: 43d7f1ab8461490228b4679c46272fe6376e8f83c40b9b31b7ed38ac224fa81648e78587520b005f6e245f1f83802125f36d418f87c8280413daf5a90cac3898
7
+ data.tar.gz: ee4013b24e900154523ee9f1374ea6a2b8a002a28bce92dffeeaa6c28e9d7a613b446c36f4a6d3e1233ebefed3446b48f59dd5196e188e81245910090b553c05
data/bin/real_talk ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'real_talk'
data/lib/real_talk.rb ADDED
@@ -0,0 +1,115 @@
1
+ class RealTalk
2
+ HAPPY_TALK = [
3
+ "Be the reason someone smiles today.",
4
+ "Chocolate comes from cocoa, which is a tree, that makes it a plant, so chocolate is a salad!",
5
+ "Always be yourself. Unless you can be Batman. Then always be Batman.",
6
+ "Being happy never goes out of style!",
7
+ "A smile is the prettiest thing you can wear.",
8
+ "Keep being happy in this moment for this moment is your life.",
9
+ "Happiness is the secret to all beauty.",
10
+ "Keep it up.",
11
+ "Someone else is happy because you are happy.",
12
+ ]
13
+ SAD_TALK = [
14
+ "Remember, Frech Fries are gluten free.",
15
+ "Stop hating yourself for everything your aren't and start loving yourself for everything you already are.",
16
+ "Stars can't shine without darkness.",
17
+ "Just believe in yourself.",
18
+ "Everything will be ok in the end. If it's not ok, it's not the end.",
19
+ "Happy mind, happy life.",
20
+ "Fall seven times, sand up eight.",
21
+ "Keep being yourself!",
22
+ "What hurts you today will make you stronger tomorrow.",
23
+ "H.O.P.E: Hold On, Pain Ends.",
24
+ "Life is too short to spend time with people who suck the happiness out of you.",
25
+ ]
26
+ STRESSED_TALK = [
27
+ "You might have to fight a battle more than once to win it.",
28
+ "Every accomplishment starts with the decision to try it.",
29
+ "Life is like riding a bicycle. To keep your balance, you must keep moving.",
30
+ "Just keep swimming...",
31
+ "Failure will never overtake me if my determination to succeed is strong enough.",
32
+ "Start by doing what's necessary, then do what'd possible; and suddenly you are doing the impossible.",
33
+ "Remind yourself that it's ok to not be perfect.",
34
+ "Believe in yourself. ",
35
+ "You will never have this day again so make it count.",
36
+ "Problems are not stop signs, they are guidelines.",
37
+ ]
38
+ MAD_TALK = [
39
+ "I'll slap you so hard that even Google won't be able to find you.",
40
+ "Don't forget to be forgiving.",
41
+ "A moment of patience in a moment of anger saves you a hundred moments of regret.",
42
+ "Take a deep breath and let it go. ",
43
+ "Hating someone is like drinking poison and expecting the other person to die.",
44
+ "The more anger towards the past you carry in your heart, the less capable you are of loving in the present.",
45
+ "A quick temper will make a fool of you soon enough.",
46
+ "Put yourself in someone else's shoes and rethink the issue making you mad.",
47
+ "Suck it up and deal with it like an adult.",
48
+ "Don't get mad, get even.",
49
+ ]
50
+ EXCITED_TALK = [
51
+ "Go confidently in the direction of your dreams. Live the life you have imagined.",
52
+ "Don't call it a dream, call it a plan!",
53
+ "Never let go of your dreams!",
54
+ "Don't wait for the perfect moment. Take the moment and make it perfect.",
55
+ "Wake up with determination, go to bed with satisfaction.",
56
+ "When you clearly know what you want, you'll wake up every morning excited about life.",
57
+ "Way to let nothing kill your vibe!",
58
+ "You deserve a drink!",
59
+ "That makes me excited too!",
60
+ "Spread your excitement around and make someone else happy too!",
61
+ ]
62
+
63
+ def real_talk
64
+ puts "Welcome to Real Talk!"
65
+ welcome_message
66
+ while !valid_user_input?
67
+ print_bad_input_message
68
+ welcome_message
69
+ end
70
+ ask_question
71
+ response
72
+ end
73
+
74
+ private
75
+ attr_reader :feelings, :reason_for_feelings
76
+
77
+ def welcome_message
78
+ puts "\nHow are you feeling today?"
79
+ puts "HAPPY / SAD / STRESSED / MAD / EXCITED"
80
+ @feelings = gets.chomp.downcase.strip
81
+ end
82
+
83
+ def valid_user_input?
84
+ feelings == 'happy' ||
85
+ feelings == 'sad' ||
86
+ feelings == 'stressed' ||
87
+ feelings == 'mad' ||
88
+ feelings == 'excited'
89
+ end
90
+
91
+ def print_bad_input_message
92
+ puts "Sorry, #{feelings} is not a valid emotion. "
93
+ end
94
+
95
+ def ask_question
96
+ puts "\nWhat's making you feel that way? "
97
+ @reason_for_feelings = gets.chomp
98
+ end
99
+
100
+ def response
101
+ if feelings == 'happy'
102
+ puts "\n" + HAPPY_TALK.sample
103
+ elsif feelings == 'sad'
104
+ puts "\n" + SAD_TALK.sample
105
+ elsif feelings == 'stressed'
106
+ puts "\n" + STRESSED_TALK.sample
107
+ elsif feelings == 'mad'
108
+ puts "\n" + MAD_TALK.sample
109
+ else
110
+ puts "\n" + EXCITED_TALK.sample
111
+ end
112
+ end
113
+ end
114
+
115
+ RealTalk.new.real_talk
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: real_talk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Julie Graceffa
8
+ - Elizabeth de Moll
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-09-07 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Gives you advice and gives it to you straight
15
+ email:
16
+ - julie.graceffa@gmail.com
17
+ - ebdem4@gmail.com
18
+ executables:
19
+ - real_talk
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - bin/real_talk
24
+ - lib/real_talk.rb
25
+ homepage:
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.6.6
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Real talk
49
+ test_files: []