newman 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/lib/newman/version.rb +1 -1
- metadata +6 -7
- data/examples/jester_clone.rb +0 -43
data/README.md
CHANGED
@@ -5,3 +5,6 @@ email-based applications. It is based on ideas from an exercise in
|
|
5
5
|
Mendicant University's January 2012 core skills course, and also serves as a
|
6
6
|
demo application for an article in the Practicing Ruby Journal.
|
7
7
|
|
8
|
+
For a demonstration of how Newman is used, check out
|
9
|
+
[Jester](http://github.com/mendicant-university/jester) as well as some of the
|
10
|
+
simple examples in this repository.
|
data/lib/newman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152968480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152968480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: tilt
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152967720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 1.3.3
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152967720
|
36
36
|
description: A microframework for mail-centric applications
|
37
37
|
email:
|
38
38
|
- gregory.t.brown@gmail.com
|
@@ -57,7 +57,6 @@ files:
|
|
57
57
|
- examples/config/gmail.rb.example
|
58
58
|
- examples/config/test.rb
|
59
59
|
- examples/example_helper.rb
|
60
|
-
- examples/jester_clone.rb
|
61
60
|
- examples/libre_list_clone.rb
|
62
61
|
- examples/live_test.rb
|
63
62
|
- examples/ping_pong.rb
|
data/examples/jester_clone.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
require_relative "example_helper"
|
2
|
-
|
3
|
-
module Newman
|
4
|
-
module Examples
|
5
|
-
Jester = Newman::Application.new do
|
6
|
-
match :genre, '\S+'
|
7
|
-
match :title, '.*'
|
8
|
-
match :email, '[\w\d\._-]+@[\w\d\._-]+' #not legit, I'm sure
|
9
|
-
|
10
|
-
subject(:match, "a {genre} story '{title}'") do
|
11
|
-
respond :subject => "No one would consider '#{params[:title]}' to be #{params[:genre]}"
|
12
|
-
end
|
13
|
-
|
14
|
-
subject(:match, "what stories do you know?") do
|
15
|
-
respond :subject => "What stories do YOU know?"
|
16
|
-
end
|
17
|
-
|
18
|
-
subject(:match, "tell something {genre} to {email}") do
|
19
|
-
respond :subject => "Why don't you tell something #{params[:genre]} to #{params[:email]}?"
|
20
|
-
end
|
21
|
-
|
22
|
-
subject(:match, "tell me something {genre}") do
|
23
|
-
respond :subject => "Your face is #{params[:genre]}"
|
24
|
-
end
|
25
|
-
|
26
|
-
subject(:match, "tell me '{title}'") do
|
27
|
-
respond :subject => "Once upon a time there was a #{params[:title]}. THE END."
|
28
|
-
end
|
29
|
-
|
30
|
-
subject(:match, "help") do
|
31
|
-
respond :subject => "Please deposit $10, and then try again"
|
32
|
-
end
|
33
|
-
|
34
|
-
default do
|
35
|
-
respond :subject => "FAIL"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
if __FILE__ == $PROGRAM_NAME
|
42
|
-
Newman::Server.simple(Newman::Examples::Jester, "config/environment.rb")
|
43
|
-
end
|