herpes 0.0.1a1

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.
data/README.md ADDED
@@ -0,0 +1,6 @@
1
+ Herpes - it's always there and sometimes it reminds you of its presence
2
+ =======================================================================
3
+ This aims to be a general way to handle events and notifications, for example handling
4
+ certain RSS feeds by sending mails, or IRC events, or new emails incoming, or whatever comes to your mind.
5
+
6
+ Plugin writing will be really simple.
data/examples/rss.rb ADDED
@@ -0,0 +1,26 @@
1
+ # load the RSS module
2
+ use :rss do
3
+ # register sankaku with the following tags for the generated events
4
+ tag :anime, :manga, :japan, :nsfw do
5
+ register 'http://www.sankakucomplex.com/feed/'
6
+ end
7
+
8
+ # register incomaemeglio in the blog group
9
+ group :blog do
10
+ register 'http://feeds.feedburner.com/incomaemeglio'
11
+ end
12
+ end
13
+
14
+ on -> e { e.tags.include?(:nsfw) } do |event|
15
+ with :email do
16
+ from 'rss-nsfw@events'
17
+ to 'meh@paranoici.org'
18
+ end.send(event)
19
+ end
20
+
21
+ on :anything_else do |event|
22
+ with :email do
23
+ from 'rss@events'
24
+ to 'meh@paranoici.org'
25
+ end.send(event)
26
+ end
data/herpes.gemspec ADDED
@@ -0,0 +1,16 @@
1
+ Kernel.load 'lib/herpes/version.rb'
2
+
3
+ Gem::Specification.new {|s|
4
+ s.name = 'herpes'
5
+ s.version = Herpes.version
6
+ s.author = 'meh.'
7
+ s.email = 'meh@paranoici.org'
8
+ s.homepage = 'http://github.com/meh/herpes'
9
+ s.platform = Gem::Platform::RUBY
10
+ s.summary = 'A event/notification handler.'
11
+
12
+ s.files = `git ls-files`.split("\n")
13
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
14
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ s.require_paths = ['lib']
16
+ }
@@ -0,0 +1,15 @@
1
+ #--
2
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ # Version 2, December 2004
4
+ #
5
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6
+ # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7
+ #
8
+ # 0. You just DO WHAT THE FUCK YOU WANT TO.
9
+ #++
10
+
11
+ module Herpes
12
+ def self.version
13
+ '0.0.1a1'
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: herpes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1a1
5
+ prerelease: 5
6
+ platform: ruby
7
+ authors:
8
+ - meh.
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-21 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description:
15
+ email: meh@paranoici.org
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - README.md
21
+ - examples/rss.rb
22
+ - herpes.gemspec
23
+ - lib/herpes/version.rb
24
+ homepage: http://github.com/meh/herpes
25
+ licenses: []
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>'
40
+ - !ruby/object:Gem::Version
41
+ version: 1.3.1
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 1.8.10
45
+ signing_key:
46
+ specification_version: 3
47
+ summary: A event/notification handler.
48
+ test_files: []