memetron 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,6 +45,8 @@ module Memetron
45
45
 
46
46
  :orly => /(.*) orly\?/i,
47
47
 
48
- :all => /(.*) all the things/
48
+ :all => /(.*) all the things/i,
49
+
50
+ :obama => /(.*) not bad/i
49
51
  }
50
52
  end
@@ -1,3 +1,3 @@
1
1
  module Memetron
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -204,4 +204,34 @@ describe Memetron::Matcher, "#match" do
204
204
  subject.parse(:sean_bean, "Prepare yourself, the memes are coming").should == ["memes"]
205
205
  end
206
206
  end
207
+
208
+ context "orly?" do
209
+ it "is detected" do
210
+ subject.match("Another test orly?").should == :orly
211
+ end
212
+
213
+ it "is parsed" do
214
+ subject.parse(:orly, "Another test orly?").should == ["Another test"]
215
+ end
216
+ end
217
+
218
+ context "All the things" do
219
+ it "is detected" do
220
+ subject.match("Test all the things").should == :all
221
+ end
222
+
223
+ it "is parsed" do
224
+ subject.parse(:all, "Test all the things").should == ["Test"]
225
+ end
226
+ end
227
+
228
+ context "Obama face" do
229
+ it "is detected" do
230
+ subject.match("New meme not bad").should == :obama
231
+ end
232
+
233
+ it "is parsed" do
234
+ subject.parse(:obama, "New meme not bad").should == ["New meme"]
235
+ end
236
+ end
207
237
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memetron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-22 00:00:00.000000000 Z
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Recognize common internet memes using regular expressions
15
15
  email: