big_eyed_al 0.0.2 → 0.1.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 +4 -4
- data/README.md +3 -5
- data/lib/big_eyed_al.rb +4 -2
- data/lib/big_eyed_al/version.rb +2 -2
- data/spec/big_eyed_al_spec.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6ec13c51bda7d9b59be63f3897cce16b3182fe4
|
4
|
+
data.tar.gz: 6a810fe431608afca6508459e2dedcecbf1f4a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45fa1e997565067c33470744b64cf5db0bfa7dc9ff36e6a8f22cbe0fda0ba83e136a1b7a46f1502156a5a85133a0d57ace5bf88a2d31aa33ae6282ad7e6ec78b
|
7
|
+
data.tar.gz: 2e2b1c8aa830fe15d5399782199599c28f262ac37f9231a4fc73bbfd292f1539e3798d7e546fd47957037eaa0ed73cc58bbec6fe82cae82eed0eab94cf083f81
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# BigEyedAl
|
2
2
|
|
3
|
-
|
3
|
+
A gem that prints out a different phrase depending on the string passed.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,11 +18,9 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
-
|
21
|
+
- run IRB/Pry
|
22
22
|
- require 'big_eyed_al'
|
23
|
-
-
|
24
|
-
- create an instance of Alex
|
25
|
-
- run the method 'said' on the instance along with a statement or question as an argument
|
23
|
+
- run BigEyedAl.said(string)
|
26
24
|
|
27
25
|
|
28
26
|
## Contributing
|
data/lib/big_eyed_al.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
require "big_eyed_al/version"
|
2
2
|
|
3
|
-
|
3
|
+
class BigEyedAl
|
4
4
|
|
5
|
-
def said(sentence)
|
5
|
+
def self.said(sentence)
|
6
6
|
if sentence.include? "?"
|
7
|
+
%x( say "Stop asking questions, Alex.")
|
7
8
|
"Stop asking questions, Alex."
|
8
9
|
else
|
10
|
+
%x( say "Stop making silly statements, Alex.")
|
9
11
|
"Stop making silly statements, Alex."
|
10
12
|
end
|
11
13
|
end
|
data/lib/big_eyed_al/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.0
|
1
|
+
class BigEyedAl
|
2
|
+
VERSION = "0.1.0"
|
3
3
|
end
|
data/spec/big_eyed_al_spec.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
class Alex; include BigEyedAl; end
|
4
|
-
|
5
3
|
describe BigEyedAl do
|
6
4
|
|
7
|
-
let(:alex) {
|
5
|
+
let(:alex) { BigEyedAl }
|
8
6
|
|
9
7
|
context 'when Alex makes a statement' do
|
10
8
|
|
11
9
|
it 'it should say stop making silly statements' do
|
12
|
-
expect(alex.
|
10
|
+
expect(alex).to receive(:`).with(' say "Stop making silly statements, Alex."')
|
11
|
+
alex.said("Hello")
|
13
12
|
end
|
14
13
|
|
15
14
|
end
|
@@ -17,7 +16,8 @@ require 'spec_helper'
|
|
17
16
|
context 'when Alex asks a question' do
|
18
17
|
|
19
18
|
it 'it should say stop asking questions' do
|
20
|
-
expect(alex.
|
19
|
+
expect(alex).to receive(:`).with(' say "Stop asking questions, Alex."')
|
20
|
+
alex.said("Why?")
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|