twitter_alert 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.rdoc CHANGED
@@ -1,9 +1,34 @@
1
1
  = twitter_alert
2
+ The problem that twitter_alert attempts to solve is the programmatic sending of DMs to all the followers of a given Twitter account. It is a simple gem that provides one Class and one Module. The class is TwitterAlert::Account and represents the Twitter account you want to make announcements from. The Module is TwitterAlert::Alert and should be mixed in to a class that you want to represent the messages themselves.
2
3
 
3
- Description goes here.
4
+ DISCLAIMER: Please, please, please don't use this gem to spam people. If you do, I hope you get unfollowed or blocked. Seriously. Get permission. Make sure your followers know that by following your account they're signing up to get DMs from a machine.
5
+
6
+ == Installing
7
+ To install, simple:
8
+
9
+ sudo gem install twitter_alert
10
+
11
+ Note: This gem depends on Grackle for Twitter access.
12
+
13
+ == Getting Started
14
+ The most basic case is pretty simple and would look something like this:
15
+
16
+ require 'twitter_alert'
17
+
18
+ account = TwitterAlert::Account.new :user_name => 'benhamill', :password => 'thisisnotmyrealpassword'
19
+
20
+ class Alert
21
+ include TiwtterAlert::Alert
22
+ end
23
+
24
+ alert = Alert.new 'Very important message.', DateTime.now
25
+
26
+ account.announce alert
27
+
28
+ In a real program, I'd expect that your Alert class would actually be somewhat more complicated and probably inherit from ActiveRecord or something. The way I intend to use this is to set up a cron job to pull messages out of the DB that are marked for a given day and send them.
4
29
 
5
30
  == Note on Patches/Pull Requests
6
-
31
+ This is the standard Jeweler procedure.
7
32
  * Fork the project.
8
33
  * Make your feature addition or bug fix.
9
34
  * Add tests for it. This is important so I don't break it in a
@@ -14,5 +39,4 @@ Description goes here.
14
39
  * Send me a pull request. Bonus points for topic branches.
15
40
 
16
41
  == Copyright
17
-
18
42
  Copyright (c) 2009 Ben Hamill. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/doc/LICENSE.html ADDED
@@ -0,0 +1,115 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: LICENSE [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
43
+
44
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
45
+
46
+ </ul>
47
+ </div>
48
+
49
+
50
+ <div id="classindex-section" class="section project-section">
51
+ <h3 class="section-header">Class Index
52
+ <span class="search-toggle"><img src="./images/find.png"
53
+ height="16" width="16" alt="[+]"
54
+ title="show/hide quicksearch" /></span></h3>
55
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
56
+ <fieldset>
57
+ <legend>Quicksearch</legend>
58
+ <input type="text" name="quicksearch" value=""
59
+ class="quicksearch-field" />
60
+ </fieldset>
61
+ </form>
62
+
63
+ <ul class="link-list">
64
+
65
+ <li><a href="./TwitterAlert.html">TwitterAlert</a></li>
66
+
67
+ <li><a href="./TwitterAlert/Account.html">TwitterAlert::Account</a></li>
68
+
69
+ <li><a href="./TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
70
+
71
+ </ul>
72
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
73
+ </div>
74
+
75
+
76
+ </div>
77
+ </div>
78
+
79
+ <div id="documentation">
80
+ <p>
81
+ Copyright &#169; 2009 Ben Hamill
82
+ </p>
83
+ <p>
84
+ Permission is hereby granted, free of charge, to any person obtaining a
85
+ copy of this software and associated documentation files (the
86
+ &#8220;Software&#8221;), to deal in the Software without restriction,
87
+ including without limitation the rights to use, copy, modify, merge,
88
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
89
+ permit persons to whom the Software is furnished to do so, subject to the
90
+ following conditions:
91
+ </p>
92
+ <p>
93
+ The above copyright notice and this permission notice shall be included in
94
+ all copies or substantial portions of the Software.
95
+ </p>
96
+ <p>
97
+ THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND,
98
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
99
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
100
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
101
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
102
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
103
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
104
+ </p>
105
+
106
+ </div>
107
+
108
+ <div id="validator-badges">
109
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
111
+ Rdoc Generator</a> 1.1.6</small>.</p>
112
+ </div>
113
+ </body>
114
+ </html>
115
+
@@ -0,0 +1,173 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: README.rdoc [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
43
+
44
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
45
+
46
+ </ul>
47
+ </div>
48
+
49
+
50
+ <div id="classindex-section" class="section project-section">
51
+ <h3 class="section-header">Class Index
52
+ <span class="search-toggle"><img src="./images/find.png"
53
+ height="16" width="16" alt="[+]"
54
+ title="show/hide quicksearch" /></span></h3>
55
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
56
+ <fieldset>
57
+ <legend>Quicksearch</legend>
58
+ <input type="text" name="quicksearch" value=""
59
+ class="quicksearch-field" />
60
+ </fieldset>
61
+ </form>
62
+
63
+ <ul class="link-list">
64
+
65
+ <li><a href="./TwitterAlert.html">TwitterAlert</a></li>
66
+
67
+ <li><a href="./TwitterAlert/Account.html">TwitterAlert::Account</a></li>
68
+
69
+ <li><a href="./TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
70
+
71
+ </ul>
72
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
73
+ </div>
74
+
75
+
76
+ </div>
77
+ </div>
78
+
79
+ <div id="documentation">
80
+ <h1>twitter_alert</h1>
81
+ <p>
82
+ The problem that twitter_alert attempts to solve is the programmatic
83
+ sending of DMs to all the followers of a given Twitter account. It is a
84
+ simple gem that provides one Class and one Module. The class is <a
85
+ href="TwitterAlert/Account.html">TwitterAlert::Account</a> and represents
86
+ the Twitter account you want to make announcements from. The Module is <a
87
+ href="TwitterAlert/Alert.html">TwitterAlert::Alert</a> and should be mixed
88
+ in to a class that you want to represent the messages themselves.
89
+ </p>
90
+ <p>
91
+ DISCLAIMER: Please, please, please don&#8217;t use this gem to spam people.
92
+ If you do, I hope you get unfollowed or blocked. Seriously. Get permission.
93
+ Make sure your followers know that by following your account they&#8217;re
94
+ signing up to get DMs from a machine.
95
+ </p>
96
+ <h2>Installing</h2>
97
+ <p>
98
+ To install, simple:
99
+ </p>
100
+ <pre>
101
+ sudo gem install twitter_alert
102
+ </pre>
103
+ <p>
104
+ Note: This gem depends on Grackle for Twitter access.
105
+ </p>
106
+ <h2>Getting Started</h2>
107
+ <p>
108
+ The most basic case is pretty simple and would look something like this:
109
+ </p>
110
+ <pre>
111
+ require 'twitter_alert'
112
+
113
+ account = TwitterAlert::Account.new :user_name =&gt; 'benhamill', :password =&gt; 'thisisnotmyrealpassword'
114
+
115
+ class Alert
116
+ include TiwtterAlert::Alert
117
+ end
118
+
119
+ alert = Alert.new 'Very important message.', DateTime.now
120
+
121
+ account.announce alert
122
+ </pre>
123
+ <p>
124
+ In a real program, I&#8217;d expect that your Alert class would actually be
125
+ somewhat more complicated and probably inherit from ActiveRecord or
126
+ something. The way I intend to use this is to set up a cron job to pull
127
+ messages out of the DB that are marked for a given day and send them.
128
+ </p>
129
+ <h2>Note on Patches/Pull Requests</h2>
130
+ <p>
131
+ This is the standard Jeweler procedure.
132
+ </p>
133
+ <ul>
134
+ <li><p>
135
+ Fork the project.
136
+ </p>
137
+ </li>
138
+ <li><p>
139
+ Make your feature addition or bug fix.
140
+ </p>
141
+ </li>
142
+ <li><p>
143
+ Add tests for it. This is important so I don&#8217;t break it in a future
144
+ version unintentionally.
145
+ </p>
146
+ </li>
147
+ <li><p>
148
+ Commit, do not mess with rakefile, version, or history. (if you want to
149
+ have your own version, that is fine but bump version in a commit by itself
150
+ I can ignore when I pull)
151
+ </p>
152
+ </li>
153
+ <li><p>
154
+ Send me a pull request. Bonus points for topic branches.
155
+ </p>
156
+ </li>
157
+ </ul>
158
+ <h2>Copyright</h2>
159
+ <p>
160
+ Copyright &#169; 2009 Ben Hamill. See <a href="LICENSE.html">LICENSE</a>
161
+ for details.
162
+ </p>
163
+
164
+ </div>
165
+
166
+ <div id="validator-badges">
167
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
168
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
169
+ Rdoc Generator</a> 1.1.6</small>.</p>
170
+ </div>
171
+ </body>
172
+ </html>
173
+
@@ -0,0 +1,157 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: TwitterAlert</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="module">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="./lib/twitter_alert/alert_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/twitter_alert/alert.rb">lib/twitter_alert/alert.rb</a></li>
43
+
44
+ <li><a href="./lib/twitter_alert/account_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="lib/twitter_alert/account.rb">lib/twitter_alert/account.rb</a></li>
46
+
47
+ </ul>
48
+ </div>
49
+ </div>
50
+
51
+
52
+ </div>
53
+
54
+ <div id="class-metadata">
55
+
56
+ <!-- Parent Class -->
57
+
58
+
59
+ <!-- Namespace Contents -->
60
+
61
+ <div id="namespace-list-section" class="section">
62
+ <h3 class="section-header">Namespace</h3>
63
+ <ul class="link-list">
64
+
65
+ <li><span class="type">MODULE</span> <a href="TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
66
+
67
+ <li><span class="type">CLASS</span> <a href="TwitterAlert/Account.html">TwitterAlert::Account</a></li>
68
+
69
+ </ul>
70
+ </div>
71
+
72
+
73
+ <!-- Method Quickref -->
74
+
75
+
76
+ <!-- Included Modules -->
77
+
78
+ </div>
79
+
80
+ <div id="project-metadata">
81
+
82
+
83
+ <div id="fileindex-section" class="section project-section">
84
+ <h3 class="section-header">Files</h3>
85
+ <ul>
86
+
87
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
88
+
89
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+
95
+ <div id="classindex-section" class="section project-section">
96
+ <h3 class="section-header">Class Index
97
+ <span class="search-toggle"><img src="./images/find.png"
98
+ height="16" width="16" alt="[+]"
99
+ title="show/hide quicksearch" /></span></h3>
100
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
101
+ <fieldset>
102
+ <legend>Quicksearch</legend>
103
+ <input type="text" name="quicksearch" value=""
104
+ class="quicksearch-field" />
105
+ </fieldset>
106
+ </form>
107
+
108
+ <ul class="link-list">
109
+
110
+ <li><a href="./TwitterAlert.html">TwitterAlert</a></li>
111
+
112
+ <li><a href="./TwitterAlert/Account.html">TwitterAlert::Account</a></li>
113
+
114
+ <li><a href="./TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
115
+
116
+ </ul>
117
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
118
+ </div>
119
+
120
+
121
+ </div>
122
+ </div>
123
+
124
+ <div id="documentation">
125
+ <h1 class="module">TwitterAlert</h1>
126
+
127
+ <div id="description">
128
+
129
+ </div>
130
+
131
+ <!-- Constants -->
132
+
133
+
134
+ <!-- Attributes -->
135
+
136
+
137
+ <!-- Methods -->
138
+
139
+
140
+ </div>
141
+
142
+
143
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
144
+
145
+ <p>Disabled; run with --debug to generate this.</p>
146
+
147
+ </div>
148
+
149
+ <div id="validator-badges">
150
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
151
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
152
+ Rdoc Generator</a> 1.1.6</small>.</p>
153
+ </div>
154
+
155
+ </body>
156
+ </html>
157
+