clickatell 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +13 -2
- data/Manifest.txt +1 -0
- data/Rakefile +10 -0
- data/bin/sms +28 -5
- data/lib/clickatell/api.rb +27 -0
- data/lib/clickatell/response.rb +3 -0
- data/lib/clickatell/utility/options.rb +22 -4
- data/lib/clickatell/version.rb +1 -1
- data/spec/api_spec.rb +34 -1
- data/spec/response_spec.rb +10 -0
- data/website/index.html +33 -4
- data/website/index.txt +24 -2
- data/website/stylesheets/rdoc.css +208 -0
- data/website/stylesheets/screen.css +4 -0
- data/website/template.rhtml +3 -2
- metadata +2 -1
data/History.txt
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
+
== 0.2.0
|
2
|
+
|
3
|
+
* Added Clickatell API error handling to API and sms utility.
|
4
|
+
|
5
|
+
* Handle required/optional arguments for sms utility correctly
|
6
|
+
|
7
|
+
* Added further sms utility usage information to website
|
8
|
+
|
9
|
+
* Make sure sms utility gracefully handles missing recipient/message
|
10
|
+
|
11
|
+
* Added balance query support to API and SMS utility (--check-balance).
|
12
|
+
|
1
13
|
== 0.1.0 2007-08-17
|
2
14
|
|
3
|
-
*
|
4
|
-
* Initial release
|
15
|
+
* Initial release.
|
data/Manifest.txt
CHANGED
@@ -25,5 +25,6 @@ website/javascripts/codehighlighter/code_highlighter.js
|
|
25
25
|
website/javascripts/codehighlighter/ruby.js
|
26
26
|
website/javascripts/rounded_corners_lite.inc.js
|
27
27
|
website/stylesheets/limechoc.css
|
28
|
+
website/stylesheets/rdoc.css
|
28
29
|
website/stylesheets/screen.css
|
29
30
|
website/template.rhtml
|
data/Rakefile
CHANGED
@@ -127,6 +127,16 @@ task :check_version do
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
+
Rake::RDocTask.new('docs') do |rd|
|
131
|
+
rd.main = 'README.txt'
|
132
|
+
rd.rdoc_files.include('README.txt', 'License.txt', 'lib/**/*.rb')
|
133
|
+
rd.rdoc_dir = 'doc'
|
134
|
+
rd.options << '--style=http://clickatell.rubyforge.org/stylesheets/rdoc.css'
|
135
|
+
rd.options << '--tab-width=2'
|
136
|
+
rd.options << '--inline-source'
|
137
|
+
rd.options << '--line-numbers'
|
138
|
+
end
|
139
|
+
|
130
140
|
namespace :spec do
|
131
141
|
desc "Run the specs under spec"
|
132
142
|
Spec::Rake::SpecTask.new('all') do |t|
|
data/bin/sms
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'pp'
|
3
2
|
|
4
3
|
local_libs = [
|
5
4
|
File.join(File.dirname(__FILE__), *%w[../lib/clickatell]),
|
@@ -17,7 +16,31 @@ end
|
|
17
16
|
options = Clickatell::Utility::Options.parse(ARGV)
|
18
17
|
connection = Clickatell::Connection.new(options.api_key, options.username, options.password)
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
puts "
|
23
|
-
exit 0
|
19
|
+
if options.show_balance
|
20
|
+
puts "Retrieving account balance..."
|
21
|
+
puts "You have #{connection.account_balance} credits remaining."
|
22
|
+
exit 0
|
23
|
+
else
|
24
|
+
begin
|
25
|
+
puts "Sending '#{options.message}' to #{options.recipient}..."
|
26
|
+
connection.send_message(options.recipient, options.message)
|
27
|
+
puts "Done."
|
28
|
+
exit 0
|
29
|
+
rescue Clickatell::API::Error => e
|
30
|
+
case e.code
|
31
|
+
when '001', '002', '003', '005'
|
32
|
+
puts "Authentication failed. Please check your username, password and API key and try again."
|
33
|
+
exit 1
|
34
|
+
when '004'
|
35
|
+
puts "Your account has been frozen. Please contact Clickatell support."
|
36
|
+
exit 1
|
37
|
+
when '007'
|
38
|
+
puts "Requests for this API key are not permitted from this IP address."
|
39
|
+
exit 1
|
40
|
+
else
|
41
|
+
puts "Unexpected error occurred. #{e.message} (error code: #{e.code})."
|
42
|
+
puts "Please contact the author (contact@lukeredpath.co.uk) with the above error."
|
43
|
+
exit 1
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/clickatell/api.rb
CHANGED
@@ -52,6 +52,13 @@ module Clickatell
|
|
52
52
|
}.merge( auth_hash(auth_options) ))
|
53
53
|
parse_response(response)['Status']
|
54
54
|
end
|
55
|
+
|
56
|
+
# Returns the number of credits remaining as a float.
|
57
|
+
# See send_message() for auth_options.
|
58
|
+
def account_balance(auth_options)
|
59
|
+
response = execute_command('getbalance', auth_hash(auth_options))
|
60
|
+
parse_response(response)['Credit'].to_f
|
61
|
+
end
|
55
62
|
|
56
63
|
protected
|
57
64
|
# Builds a command and sends it via HTTP GET.
|
@@ -104,5 +111,25 @@ module Clickatell
|
|
104
111
|
end
|
105
112
|
end
|
106
113
|
|
114
|
+
# Clickatell API Error exception.
|
115
|
+
class Error < StandardError
|
116
|
+
attr_reader :code, :message
|
117
|
+
|
118
|
+
def initialize(code, message)
|
119
|
+
@code, @message = code, message
|
120
|
+
end
|
121
|
+
|
122
|
+
# Creates a new Error from a Clickatell HTTP response string
|
123
|
+
# e.g.:
|
124
|
+
#
|
125
|
+
# Error.parse("ERR: 001, Authentication error")
|
126
|
+
# # => #<Clickatell::API::Error code='001' message='Authentication error'>
|
127
|
+
def self.parse(error_string)
|
128
|
+
error_details = error_string.split(':').last.strip
|
129
|
+
code, message = error_details.split(',').map { |s| s.strip }
|
130
|
+
self.new(code, message)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
107
134
|
end
|
108
135
|
end
|
data/lib/clickatell/response.rb
CHANGED
@@ -10,6 +10,9 @@ module Clickatell
|
|
10
10
|
|
11
11
|
# Returns the HTTP response body data as a hash.
|
12
12
|
def parse(http_response)
|
13
|
+
if http_response.body.scan(/ERR/).any?
|
14
|
+
raise Clickatell::API::Error.parse(http_response.body)
|
15
|
+
end
|
13
16
|
YAML.load(http_response.body.scan(PARSE_REGEX).join("\n"))
|
14
17
|
end
|
15
18
|
|
@@ -7,25 +7,30 @@ module Clickatell
|
|
7
7
|
def self.parse(args)
|
8
8
|
options = self.default_options
|
9
9
|
parser = OptionParser.new do |opts|
|
10
|
-
opts.banner = "Usage: sms [options]
|
10
|
+
opts.banner = "Usage: sms [options] recipient message"
|
11
11
|
opts.separator ""
|
12
12
|
opts.separator "Specific options:"
|
13
13
|
|
14
|
-
opts.on('-u', '--username
|
14
|
+
opts.on('-u', '--username USERNAME',
|
15
15
|
"Specify the clickatell username (overrides ~/.clickatell setting)") do |username|
|
16
16
|
options.username = username
|
17
17
|
end
|
18
18
|
|
19
|
-
opts.on('-p', '--password
|
19
|
+
opts.on('-p', '--password PASSWORD',
|
20
20
|
"Specify the clickatell password (overrides ~/.clickatell setting)") do |password|
|
21
21
|
options.password = password
|
22
22
|
end
|
23
23
|
|
24
|
-
opts.on('-k', '--apikey
|
24
|
+
opts.on('-k', '--apikey API_KEY',
|
25
25
|
"Specify the clickatell API key (overrides ~/.clickatell setting)") do |key|
|
26
26
|
options.api_key = key
|
27
27
|
end
|
28
28
|
|
29
|
+
opts.on('-b', '--show-balance',
|
30
|
+
"Shows the total number of credits remaining on your account") do
|
31
|
+
options.show_balance = true
|
32
|
+
end
|
33
|
+
|
29
34
|
opts.on_tail('-h', '--help', "Show this message") do
|
30
35
|
puts opts
|
31
36
|
exit
|
@@ -40,7 +45,20 @@ module Clickatell
|
|
40
45
|
parser.parse!(args)
|
41
46
|
options.recipient = ARGV[-2]
|
42
47
|
options.message = ARGV[-1]
|
48
|
+
|
49
|
+
if (options.message.nil? || options.recipient.nil?) && !options.show_balance
|
50
|
+
puts "You must specify a recipient and message!"
|
51
|
+
puts parser
|
52
|
+
exit
|
53
|
+
end
|
54
|
+
|
43
55
|
return options
|
56
|
+
|
57
|
+
rescue OptionParser::MissingArgument => e
|
58
|
+
switch_given = e.message.split(':').last.strip
|
59
|
+
puts "The #{switch_given} option requires an argument."
|
60
|
+
puts parser
|
61
|
+
exit
|
44
62
|
end
|
45
63
|
|
46
64
|
def self.default_options
|
data/lib/clickatell/version.rb
CHANGED
data/spec/api_spec.rb
CHANGED
@@ -24,7 +24,7 @@ module Clickatell
|
|
24
24
|
end
|
25
25
|
|
26
26
|
describe "Command executor" do
|
27
|
-
it "should create an API command and send it via HTTP get" do
|
27
|
+
it "should create an API command and send it via HTTP get, returning the raw http response" do
|
28
28
|
API::Command.should_receive(:new).with('cmdname').and_return(cmd=mock('command'))
|
29
29
|
cmd.should_receive(:with_params).with(:param_one => 'foo').and_return(uri=mock('uri'))
|
30
30
|
Net::HTTP.should_receive(:get_response).with(uri).and_return(raw_response=mock('http response'))
|
@@ -93,6 +93,39 @@ module Clickatell
|
|
93
93
|
Response.should_receive(:parse).with(response).and_return('ID' => 'message_id', 'Status' => 'message_status')
|
94
94
|
API.message_status('messageid', :session_id => 'abcde').should == 'message_status'
|
95
95
|
end
|
96
|
+
|
97
|
+
it "should support balance query with authentication, returning number of credits as a float" do
|
98
|
+
API.should_receive(:execute_command).with('getbalance',
|
99
|
+
:api_id => '1234',
|
100
|
+
:user => 'joebloggs',
|
101
|
+
:password => 'superpass'
|
102
|
+
).and_return(response=mock('response'))
|
103
|
+
Response.should_receive(:parse).with(response).and_return('Credit' => '10.0')
|
104
|
+
API.account_balance(:username => 'joebloggs', :password => 'superpass', :api_key => '1234').should == 10.0
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should support balance query with pre-auth, returning number of credits as a float" do
|
108
|
+
API.should_receive(:execute_command).with('getbalance',
|
109
|
+
:session_id => 'abcde'
|
110
|
+
).and_return(response=mock('response'))
|
111
|
+
Response.should_receive(:parse).with(response).and_return('Credit' => '10.0')
|
112
|
+
API.account_balance(:session_id => 'abcde').should == 10.0
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should raise an API::Error if the response parser raises" do
|
116
|
+
API.stub!(:execute_command)
|
117
|
+
Response.stub!(:parse).and_raise(Clickatell::API::Error.new('', ''))
|
118
|
+
proc { API.account_balance({}) }.should raise_error(Clickatell::API::Error)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe "API Error" do
|
123
|
+
it "should parse http response string to create error" do
|
124
|
+
response_string = "ERR: 001, Authentication error"
|
125
|
+
error = Clickatell::API::Error.parse(response_string)
|
126
|
+
error.code.should == '001'
|
127
|
+
error.message.should == 'Authentication error'
|
128
|
+
end
|
96
129
|
end
|
97
130
|
|
98
131
|
end
|
data/spec/response_spec.rb
CHANGED
@@ -4,11 +4,21 @@ require File.dirname(__FILE__) + '/../lib/clickatell'
|
|
4
4
|
module Clickatell
|
5
5
|
|
6
6
|
describe "Response parser" do
|
7
|
+
before do
|
8
|
+
Clickatell::API::Error.stub!(:parse).and_return(Clickatell::API::Error.new('', ''))
|
9
|
+
end
|
10
|
+
|
7
11
|
it "should return hash for one-line success response" do
|
8
12
|
raw_response = stub('response')
|
9
13
|
raw_response.stub!(:body).and_return('k1: foo k2: bar')
|
10
14
|
Response.parse(raw_response).should == {'k1' => 'foo', 'k2' => 'bar'}
|
11
15
|
end
|
16
|
+
|
17
|
+
it "should raise API::Error if response contains an error message" do
|
18
|
+
raw_response = stub('response')
|
19
|
+
raw_response.stub!(:body).and_return('ERR: 001, Authentication failed')
|
20
|
+
proc { Response.parse(raw_response) }.should raise_error(Clickatell::API::Error)
|
21
|
+
end
|
12
22
|
end
|
13
23
|
|
14
24
|
end
|
data/website/index.html
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<div id="header">
|
18
18
|
|
19
|
-
<h1>Clickatell Ruby API 0.
|
19
|
+
<h1>Clickatell Ruby API <span class="version">0.2.0</span>
|
20
20
|
<span class="tagline">gem install clickatell</span></h1>
|
21
21
|
|
22
22
|
</div>
|
@@ -31,10 +31,15 @@
|
|
31
31
|
<h3>Installing</h3>
|
32
32
|
|
33
33
|
|
34
|
-
<p>Download the <a href="http://rubyforge.org/projects/clickatell">latest version of gem</a> or install using RubyGems
|
34
|
+
<p>Download the <a href="http://rubyforge.org/projects/clickatell">latest version of gem</a> or install using RubyGems.</p>
|
35
35
|
|
36
36
|
<pre><code>$ sudo gem install clickatell</code></pre>
|
37
37
|
|
38
|
+
<p>Getting the latest version from Subversion:</p>
|
39
|
+
|
40
|
+
|
41
|
+
<pre><code>& svn co svn://lukeredpath.co.uk/var/svn/opensource/clickatell/trunk clickatell-trunk</code></pre>
|
42
|
+
|
38
43
|
<h3>The basics</h3>
|
39
44
|
|
40
45
|
|
@@ -58,6 +63,9 @@ connection = Clickatell::Connection.new('your_api_id', 'your_username', 'your_pa
|
|
58
63
|
connection.send_message('447771234567', 'Hello from clickatell')
|
59
64
|
</code></pre>
|
60
65
|
|
66
|
+
<p>Full documentation for the <span class="caps">API</span> is available in the <a href="rdoc/">RDocs</a>.</p>
|
67
|
+
|
68
|
+
|
61
69
|
<h4>Command-line <span class="caps">SMS</span> Utility</h4>
|
62
70
|
|
63
71
|
|
@@ -76,13 +84,33 @@ username: your_username
|
|
76
84
|
password: your_password
|
77
85
|
</code></pre>
|
78
86
|
|
79
|
-
<p>You can then use the sms utility to send a message to a single recipient:</p>
|
87
|
+
<p>You can then use the <ins>sms</ins> utility to send a message to a single recipient:</p>
|
80
88
|
|
81
89
|
|
82
90
|
<pre><code>
|
83
91
|
$ sms 447771234567 'Hello from clickatell'
|
84
92
|
</code></pre>
|
85
93
|
|
94
|
+
<p>Alternatively, you can specify your authentication details manually by passing in options to the <ins>sms</ins> command.</p>
|
95
|
+
|
96
|
+
|
97
|
+
<pre><code>
|
98
|
+
$ sms -u your_username -p your_password -k your_api_key 447771234567 'Hello from clickatell'
|
99
|
+
</code></pre>
|
100
|
+
|
101
|
+
<p>These values will take presedence over any values in your ~/.clickatell file.</p>
|
102
|
+
|
103
|
+
|
104
|
+
<p>You can also use the <ins>sms</ins> utility to check your Clickatell account balance:</p>
|
105
|
+
|
106
|
+
|
107
|
+
<pre><code>
|
108
|
+
$ sms --show-balance
|
109
|
+
</code></pre>
|
110
|
+
|
111
|
+
<p>Run <ins>sms</ins> without any arguments for a full list of options.</p>
|
112
|
+
|
113
|
+
|
86
114
|
<h3>License</h3>
|
87
115
|
|
88
116
|
|
@@ -101,7 +129,8 @@ $ sms 447771234567 'Hello from clickatell'
|
|
101
129
|
<div id="footer">
|
102
130
|
<p class="copyright">
|
103
131
|
<a href="http://rubyforge.org/projects/clickatell">Rubyforge Project Page</a> |
|
104
|
-
<a href="http://rubyforge.org/
|
132
|
+
<a href="http://rubyforge.org/frs/?group_id=4295&release_id=13922">Download latest version (0.2.0)</a> |
|
133
|
+
<a href="rdoc/">RDoc</a>
|
105
134
|
</p>
|
106
135
|
</div>
|
107
136
|
</div>
|
data/website/index.txt
CHANGED
@@ -6,10 +6,14 @@ A Ruby interface to the "Clickatell":http://www.clickatell.com SMS gateway API.
|
|
6
6
|
|
7
7
|
h3. Installing
|
8
8
|
|
9
|
-
<p>Download the <a href="http://rubyforge.org/projects/clickatell">latest version of gem</a> or install using RubyGems
|
9
|
+
<p>Download the <a href="http://rubyforge.org/projects/clickatell">latest version of gem</a> or install using RubyGems.</p>
|
10
10
|
|
11
11
|
<pre><code>$ sudo gem install clickatell</code></pre>
|
12
12
|
|
13
|
+
Getting the latest version from Subversion:
|
14
|
+
|
15
|
+
<pre><code>& svn co svn://lukeredpath.co.uk/var/svn/opensource/clickatell/trunk clickatell-trunk</code></pre>
|
16
|
+
|
13
17
|
h3. The basics
|
14
18
|
|
15
19
|
To use this gem, you will need sign up for an account at "the Clickatell website":http://www.clickatell.com.
|
@@ -28,6 +32,8 @@ require 'clickatell'
|
|
28
32
|
connection = Clickatell::Connection.new('your_api_id', 'your_username', 'your_password')
|
29
33
|
connection.send_message('447771234567', 'Hello from clickatell')
|
30
34
|
</code></pre>
|
35
|
+
|
36
|
+
Full documentation for the API is available in the <a href="rdoc/">RDocs</a>.
|
31
37
|
|
32
38
|
h4. Command-line SMS Utility
|
33
39
|
|
@@ -44,12 +50,28 @@ username: your_username
|
|
44
50
|
password: your_password
|
45
51
|
</code></pre>
|
46
52
|
|
47
|
-
You can then use the sms utility to send a message to a single recipient:
|
53
|
+
You can then use the +sms+ utility to send a message to a single recipient:
|
48
54
|
|
49
55
|
<pre><code>
|
50
56
|
$ sms 447771234567 'Hello from clickatell'
|
51
57
|
</code></pre>
|
52
58
|
|
59
|
+
Alternatively, you can specify your authentication details manually by passing in options to the +sms+ command.
|
60
|
+
|
61
|
+
<pre><code>
|
62
|
+
$ sms -u your_username -p your_password -k your_api_key 447771234567 'Hello from clickatell'
|
63
|
+
</code></pre>
|
64
|
+
|
65
|
+
These values will take presedence over any values in your ~/.clickatell file.
|
66
|
+
|
67
|
+
You can also use the +sms+ utility to check your Clickatell account balance:
|
68
|
+
|
69
|
+
<pre><code>
|
70
|
+
$ sms --show-balance
|
71
|
+
</code></pre>
|
72
|
+
|
73
|
+
Run +sms+ without any arguments for a full list of options.
|
74
|
+
|
53
75
|
h3. License
|
54
76
|
|
55
77
|
This code is free to use under the terms of the MIT license.
|
@@ -0,0 +1,208 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
4
|
+
font-size: 90%;
|
5
|
+
margin: 0;
|
6
|
+
margin-left: 40px;
|
7
|
+
padding: 0;
|
8
|
+
background: white;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
12
|
+
h1 { font-size: 150%; }
|
13
|
+
h2,h3,h4 { margin-top: 1em; }
|
14
|
+
|
15
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
16
|
+
a:hover { background: #039; color: #eef; }
|
17
|
+
|
18
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
19
|
+
td > a {
|
20
|
+
background: transparent;
|
21
|
+
color: #039;
|
22
|
+
text-decoration: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* and inside a section title */
|
26
|
+
.section-title > a {
|
27
|
+
background: transparent;
|
28
|
+
color: #eee;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* === Structural elements =================================== */
|
33
|
+
|
34
|
+
div#index {
|
35
|
+
margin: 0;
|
36
|
+
margin-left: -40px;
|
37
|
+
padding: 0;
|
38
|
+
font-size: 90%;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
div#index a {
|
43
|
+
margin-left: 0.7em;
|
44
|
+
}
|
45
|
+
|
46
|
+
div#index .section-bar {
|
47
|
+
margin-left: 0px;
|
48
|
+
padding-left: 0.7em;
|
49
|
+
background: #ccc;
|
50
|
+
font-size: small;
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
div#classHeader, div#fileHeader {
|
55
|
+
width: auto;
|
56
|
+
color: white;
|
57
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
58
|
+
margin: 0;
|
59
|
+
margin-left: -40px;
|
60
|
+
border-bottom: 3px solid #006;
|
61
|
+
}
|
62
|
+
|
63
|
+
div#classHeader a, div#fileHeader a {
|
64
|
+
background: inherit;
|
65
|
+
color: white;
|
66
|
+
}
|
67
|
+
|
68
|
+
div#classHeader td, div#fileHeader td {
|
69
|
+
background: inherit;
|
70
|
+
color: white;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
div#fileHeader {
|
75
|
+
background: #057;
|
76
|
+
}
|
77
|
+
|
78
|
+
div#classHeader {
|
79
|
+
background: #048;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
.class-name-in-header {
|
84
|
+
font-size: 180%;
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
div#bodyContent {
|
90
|
+
padding: 0 1.5em 0 1.5em;
|
91
|
+
}
|
92
|
+
|
93
|
+
div#description {
|
94
|
+
padding: 0.5em 1.5em;
|
95
|
+
background: #efefef;
|
96
|
+
border: 1px dotted #999;
|
97
|
+
}
|
98
|
+
|
99
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
100
|
+
color: #125;;
|
101
|
+
background: transparent;
|
102
|
+
}
|
103
|
+
|
104
|
+
div#validator-badges {
|
105
|
+
text-align: center;
|
106
|
+
}
|
107
|
+
div#validator-badges img { border: 0; }
|
108
|
+
|
109
|
+
div#copyright {
|
110
|
+
color: #333;
|
111
|
+
background: #efefef;
|
112
|
+
font: 0.75em sans-serif;
|
113
|
+
margin-top: 5em;
|
114
|
+
margin-bottom: 0;
|
115
|
+
padding: 0.5em 2em;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/* === Classes =================================== */
|
120
|
+
|
121
|
+
table.header-table {
|
122
|
+
color: white;
|
123
|
+
font-size: small;
|
124
|
+
}
|
125
|
+
|
126
|
+
.type-note {
|
127
|
+
font-size: small;
|
128
|
+
color: #DEDEDE;
|
129
|
+
}
|
130
|
+
|
131
|
+
.xxsection-bar {
|
132
|
+
background: #eee;
|
133
|
+
color: #333;
|
134
|
+
padding: 3px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.section-bar {
|
138
|
+
color: #333;
|
139
|
+
border-bottom: 1px solid #999;
|
140
|
+
margin-left: -20px;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
.section-title {
|
145
|
+
background: #79a;
|
146
|
+
color: #eee;
|
147
|
+
padding: 3px;
|
148
|
+
margin-top: 2em;
|
149
|
+
margin-left: -30px;
|
150
|
+
border: 1px solid #999;
|
151
|
+
}
|
152
|
+
|
153
|
+
.top-aligned-row { vertical-align: top }
|
154
|
+
.bottom-aligned-row { vertical-align: bottom }
|
155
|
+
|
156
|
+
/* --- Context section classes ----------------------- */
|
157
|
+
|
158
|
+
.context-row { }
|
159
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
160
|
+
.context-item-value { font-size: small; color: #448; }
|
161
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
162
|
+
|
163
|
+
/* --- Method classes -------------------------- */
|
164
|
+
.method-detail {
|
165
|
+
background: #efefef;
|
166
|
+
padding: 0;
|
167
|
+
margin-top: 0.5em;
|
168
|
+
margin-bottom: 1em;
|
169
|
+
border: 1px dotted #ccc;
|
170
|
+
}
|
171
|
+
.method-heading {
|
172
|
+
color: black;
|
173
|
+
background: #ccc;
|
174
|
+
border-bottom: 1px solid #666;
|
175
|
+
padding: 0.2em 0.5em 0 0.5em;
|
176
|
+
}
|
177
|
+
.method-signature { color: black; background: inherit; }
|
178
|
+
.method-name { font-weight: bold; }
|
179
|
+
.method-args { font-style: italic; }
|
180
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
181
|
+
|
182
|
+
/* --- Source code sections -------------------- */
|
183
|
+
|
184
|
+
a.source-toggle { font-size: 90%; }
|
185
|
+
div.method-source-code {
|
186
|
+
background: #262626;
|
187
|
+
color: #ffdead;
|
188
|
+
margin: 1em;
|
189
|
+
padding: 0.5em;
|
190
|
+
border: 1px dashed #999;
|
191
|
+
overflow: hidden;
|
192
|
+
}
|
193
|
+
|
194
|
+
div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
195
|
+
|
196
|
+
/* --- Ruby keyword styles --------------------- */
|
197
|
+
|
198
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
199
|
+
|
200
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
201
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
202
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
203
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
204
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
205
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
206
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
207
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
208
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
data/website/template.rhtml
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<div id="header">
|
18
18
|
|
19
|
-
<h1><%= title %>
|
19
|
+
<h1><%= title %> <span class="version"><%= version %></span>
|
20
20
|
<span class="tagline">gem install clickatell</span></h1>
|
21
21
|
|
22
22
|
</div>
|
@@ -31,7 +31,8 @@
|
|
31
31
|
<div id="footer">
|
32
32
|
<p class="copyright">
|
33
33
|
<a href="http://rubyforge.org/projects/clickatell">Rubyforge Project Page</a> |
|
34
|
-
<a href="
|
34
|
+
<a href="http://rubyforge.org/frs/?group_id=4295&release_id=13922">Download latest version (<%= version %>)</a> |
|
35
|
+
<a href="rdoc/">RDoc</a>
|
35
36
|
</p>
|
36
37
|
</div>
|
37
38
|
</div>
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: clickatell
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
6
|
+
version: 0.2.0
|
7
7
|
date: 2007-08-21 00:00:00 +01:00
|
8
8
|
summary: Ruby interface to the Clickatell SMS gateway service.
|
9
9
|
require_paths:
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- website/javascripts/codehighlighter/ruby.js
|
57
57
|
- website/javascripts/rounded_corners_lite.inc.js
|
58
58
|
- website/stylesheets/limechoc.css
|
59
|
+
- website/stylesheets/rdoc.css
|
59
60
|
- website/stylesheets/screen.css
|
60
61
|
- website/template.rhtml
|
61
62
|
test_files: []
|