questioning_alex 0.0.2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/questioning_alex.rb +5 -3
- data/lib/questioning_alex/version.rb +2 -2
- data/spec/questioning_alex_spec.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f82ae563716078257ca013a47b90e353a0f0a3
|
4
|
+
data.tar.gz: 23bcfbd0b9d6d320b521e55556a9b5ca0eb7441f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b8e3bb79395d29799a22bfec548eda132ad33f7691b61f4ab7d46608c22202ad6a464d155b6b196ae051a1b16b1ff492071638f319da69be73f355f5c804a8
|
7
|
+
data.tar.gz: 5b0a99f72a9c3d35c04d600a579d0b54a4b74a9faa5838d98bff2067740e9235db26e169ff8208b50abbb08028683cd945c96c68c74e66c06002aa36e2bb6dcf
|
data/README.md
CHANGED
@@ -18,13 +18,13 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
22
|
-
class Alex
|
23
|
-
require QuestioningAlex
|
24
|
-
end
|
21
|
+
require the gem
|
25
22
|
|
26
|
-
|
27
|
-
|
23
|
+
$ require 'questioning_alex'
|
24
|
+
|
25
|
+
use the gem
|
26
|
+
|
27
|
+
$ QuestioningAlex.said("Whatever he said here")
|
28
28
|
|
29
29
|
|
30
30
|
## Contributing
|
data/lib/questioning_alex.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
require_relative "questioning_alex/version"
|
2
2
|
|
3
|
-
|
3
|
+
class QuestioningAlex
|
4
4
|
|
5
|
-
def said(string)
|
5
|
+
def self.said(string)
|
6
6
|
if string.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
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.
|
1
|
+
class QuestioningAlex
|
2
|
+
VERSION = "0.1.1"
|
3
3
|
end
|
@@ -1,16 +1,15 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
class Alex; include QuestioningAlex; end
|
4
|
-
|
5
3
|
describe QuestioningAlex do
|
6
|
-
let(:alex){Alex.new}
|
7
4
|
|
8
5
|
it 'should return a phrase if Alex asked a question' do
|
9
|
-
expect(
|
6
|
+
expect(QuestioningAlex.said("What?")).to eq 'Stop asking questions, Alex'
|
10
7
|
end
|
11
8
|
|
12
9
|
it 'should return a different phrase if Alex made a statement' do
|
13
|
-
expect(
|
10
|
+
expect(QuestioningAlex.said("What")).to eq 'Stop making silly statements, Alex'
|
14
11
|
end
|
15
12
|
|
13
|
+
|
14
|
+
|
16
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: questioning_alex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Camilla van Klinken
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|