whinytasks 0.0.1

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/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2008-09-06
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,7 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/whinytasks
6
+ lib/whinytasks.rb
7
+ test/test_whinytasks.rb
data/README.txt ADDED
@@ -0,0 +1,48 @@
1
+ = whinytasks
2
+
3
+ * FIX (url)
4
+
5
+ == DESCRIPTION:
6
+
7
+ FIX (describe your package)
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * FIX (list of features or problems)
12
+
13
+ == SYNOPSIS:
14
+
15
+ FIX (code sample of usage)
16
+
17
+ == REQUIREMENTS:
18
+
19
+ * FIX (list of requirements)
20
+
21
+ == INSTALL:
22
+
23
+ * FIX (sudo gem install, anything else)
24
+
25
+ == LICENSE:
26
+
27
+ (The MIT License)
28
+
29
+ Copyright (c) 2008 FIX
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ 'Software'), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+ require './lib/whinytasks.rb'
6
+
7
+ Hoe.new('whinytasks', Whinytasks::VERSION) do |p|
8
+ p.developer('Adam Thorsen', 'adam.thorsen@gmail.com')
9
+ end
10
+
11
+ # vim: syntax=Ruby
data/bin/whinytasks ADDED
File without changes
data/lib/whinytasks.rb ADDED
@@ -0,0 +1,36 @@
1
+ class Whinytasks
2
+ VERSION = '0.0.1'
3
+ end
4
+
5
+ WHINY_CONFIG={:from_alias => "Leads", :from => "admin@halogenguides.com",
6
+ :to_alias => "administrators", :to => "adam@halogenguides.com"}
7
+ class Object
8
+ def whine(subject, message)
9
+ msg = <<END_OF_MESSAGE
10
+ From: #{WHINY_CONFIG[:from_alias]} <#{WHINY_CONFIG[:from]}>
11
+ To: #{WHINY_CONFIG[:to_alias]} <#{WHINY_CONFIG[:to]}>
12
+ Subject: #{subject}
13
+
14
+ #{message}
15
+ END_OF_MESSAGE
16
+
17
+ Net::SMTP.start('localhost') do |smtp|
18
+ smtp.send_message msg, WHINY_CONFIG[:from], WHINY_CONFIG[:to]
19
+ end
20
+ end
21
+
22
+ def whiny_task(deps, &block)
23
+ if RAILS_ENV == "production"
24
+ block_with_exception_handling = Proc.new do
25
+ begin
26
+ block.call
27
+ rescue Exception => e
28
+ whine(e.message, "this is the message")
29
+ end
30
+ end
31
+ task deps, &block_with_exception_handling
32
+ else
33
+ task deps, &block
34
+ end
35
+ end
36
+ end
File without changes
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: whinytasks
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Adam Thorsen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-09-06 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.7.0
24
+ version:
25
+ description: FIX (describe your package)
26
+ email:
27
+ - adam.thorsen@gmail.com
28
+ executables:
29
+ - whinytasks
30
+ extensions: []
31
+
32
+ extra_rdoc_files:
33
+ - History.txt
34
+ - Manifest.txt
35
+ - README.txt
36
+ files:
37
+ - History.txt
38
+ - Manifest.txt
39
+ - README.txt
40
+ - Rakefile
41
+ - bin/whinytasks
42
+ - lib/whinytasks.rb
43
+ - test/test_whinytasks.rb
44
+ has_rdoc: true
45
+ homepage: FIX (url)
46
+ post_install_message:
47
+ rdoc_options:
48
+ - --main
49
+ - README.txt
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project: whinytasks
67
+ rubygems_version: 1.2.0
68
+ signing_key:
69
+ specification_version: 2
70
+ summary: FIX (describe your package)
71
+ test_files:
72
+ - test/test_whinytasks.rb