kennethkalmer-smsinabox 0.0.2

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/smsinabox.gemspec ADDED
@@ -0,0 +1,44 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{smsinabox}
3
+ s.version = "0.0.2"
4
+
5
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
+ s.authors = ["Kenneth Kalmer"]
7
+ s.date = %q{2008-09-25}
8
+ s.description = %q{Ruby API for the SMS in a Box service, as well as command line utilities for interacting with SMS in a Box}
9
+ s.email = ["kenneth.kalmer@gmail.com"]
10
+ s.executables = ["sms-credit", "sms-send", "sms-setup"]
11
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "TODO.txt"]
12
+ s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "TODO.txt", "bin/sms-credit", "bin/sms-send", "bin/sms-setup", "config/hoe.rb", "config/requirements.rb", "lib/smsinabox.rb", "lib/smsinabox/configuration.rb", "lib/smsinabox/exceptions.rb", "lib/smsinabox/message.rb", "lib/smsinabox/version.rb", "script/console", "script/destroy", "script/generate", "setup.rb", "smsinabox.gemspec", "spec/message_spec.rb", "spec/smsinabox_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/rspec.rake", "tasks/website.rake"]
13
+ s.has_rdoc = true
14
+ s.homepage = %q{http://www.opensourcery.co.za/smsinabox}
15
+ s.post_install_message = %q{
16
+ For more information on smsinabox, see http://www.opensourcery.co.za/smsinabox
17
+
18
+ Setup your account by running sms-setup now. You can then use the following
19
+ commands to interact with SMS in a Box:
20
+
21
+ sms-send: Send SMS messages
22
+ sms-credit: Quick overview of the credit available
23
+ sms-replies: Quick access to your replies
24
+ sms-setup: To change the account details
25
+ }
26
+ s.rdoc_options = ["--main", "README.txt"]
27
+ s.require_paths = ["lib"]
28
+ s.rubyforge_project = %q{smsinabox}
29
+ s.rubygems_version = %q{1.2.0}
30
+ s.summary = %q{Ruby API for the SMS in a Box service, as well as command line utilities for interacting with SMS in a Box}
31
+
32
+ if s.respond_to? :specification_version then
33
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
34
+ s.specification_version = 2
35
+
36
+ if current_version >= 3 then
37
+ s.add_development_dependency(%q<hoe>, [">= 1.7.0"])
38
+ else
39
+ s.add_dependency(%q<hoe>, [">= 1.7.0"])
40
+ end
41
+ else
42
+ s.add_dependency(%q<hoe>, [">= 1.7.0"])
43
+ end
44
+ end
@@ -0,0 +1,47 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe Smsinabox::Message do
4
+
5
+ it "should accept a recipient" do
6
+ message = Smsinabox::Message.new( :recipient => '5555555555' )
7
+ message.recipient.should eql('5555555555')
8
+
9
+ message = Smsinabox::Message.new
10
+ message.recipient = '5555555555'
11
+ message.recipient.should eql('5555555555')
12
+ end
13
+
14
+ it "should accept a body" do
15
+ message = Smsinabox::Message.new( :body => 'text' )
16
+ message.body.should eql('text')
17
+
18
+ message = Smsinabox::Message.new
19
+ message.body = 'text'
20
+ message.body.should eql('text')
21
+ end
22
+
23
+ it "should only be valid if both the recipient and body is set" do
24
+ message = Smsinabox::Message.new
25
+ message.should_not be_valid
26
+
27
+ message.recipient = '5555555555'
28
+ message.should_not be_valid
29
+
30
+ message.body = 'text'
31
+ message.should be_valid
32
+
33
+ message.recipient = nil
34
+ message.should_not be_valid
35
+ end
36
+
37
+ it "should replace newlines with pipe (|) characters" do
38
+ message = Smsinabox::Message.new
39
+ message.body = <<-EOF
40
+ This
41
+ needs
42
+ pipes
43
+ EOF
44
+
45
+ message.body.should match( /This|\s+needs|\s+pipes/ )
46
+ end
47
+ end
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe "Smsinabox" do
4
+
5
+ it "should accept a username" do
6
+ Smsinabox.username = 'test'
7
+ Smsinabox.username.should eql('test')
8
+ end
9
+
10
+ it "should accept a password" do
11
+ Smsinabox.password = 'test'
12
+ Smsinabox.password.should eql('test')
13
+ end
14
+
15
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,10 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ gem 'rspec'
6
+ require 'spec'
7
+ end
8
+
9
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
10
+ require 'smsinabox'
@@ -0,0 +1,34 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
28
+
29
+ namespace :manifest do
30
+ desc 'Recreate Manifest.txt to include ALL files'
31
+ task :refresh do
32
+ `rake check_manifest | patch -p0 > Manifest.txt`
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
data/tasks/rspec.rake ADDED
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ require 'spec'
6
+ end
7
+ begin
8
+ require 'spec/rake/spectask'
9
+ rescue LoadError
10
+ puts <<-EOS
11
+ To use rspec for testing you must install rspec gem:
12
+ gem install rspec
13
+ EOS
14
+ exit(0)
15
+ end
16
+
17
+ desc "Run the specs under spec/models"
18
+ Spec::Rake::SpecTask.new do |t|
19
+ t.spec_opts = ['--options', "spec/spec.opts"]
20
+ t.spec_files = FileList['spec/**/*_spec.rb']
21
+ end
@@ -0,0 +1,9 @@
1
+ # stubs for the website generation
2
+ # To install the website framework:
3
+ # script/generate website
4
+
5
+ task :website_generate
6
+
7
+ task :website_upload
8
+
9
+ task :website => :publish_docs
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kennethkalmer-smsinabox
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Kenneth Kalmer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-09-25 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.7.0
23
+ version:
24
+ description: Ruby API for the SMS in a Box service, as well as command line utilities for interacting with SMS in a Box
25
+ email:
26
+ - kenneth.kalmer@gmail.com
27
+ executables:
28
+ - sms-credit
29
+ - sms-send
30
+ - sms-setup
31
+ extensions: []
32
+
33
+ extra_rdoc_files:
34
+ - History.txt
35
+ - Manifest.txt
36
+ - PostInstall.txt
37
+ - TODO.txt
38
+ files:
39
+ - History.txt
40
+ - Manifest.txt
41
+ - PostInstall.txt
42
+ - README.rdoc
43
+ - Rakefile
44
+ - TODO.txt
45
+ - bin/sms-credit
46
+ - bin/sms-send
47
+ - bin/sms-setup
48
+ - config/hoe.rb
49
+ - config/requirements.rb
50
+ - lib/smsinabox.rb
51
+ - lib/smsinabox/configuration.rb
52
+ - lib/smsinabox/exceptions.rb
53
+ - lib/smsinabox/message.rb
54
+ - lib/smsinabox/version.rb
55
+ - script/console
56
+ - script/destroy
57
+ - script/generate
58
+ - setup.rb
59
+ - smsinabox.gemspec
60
+ - spec/message_spec.rb
61
+ - spec/smsinabox_spec.rb
62
+ - spec/spec.opts
63
+ - spec/spec_helper.rb
64
+ - tasks/deployment.rake
65
+ - tasks/environment.rake
66
+ - tasks/rspec.rake
67
+ - tasks/website.rake
68
+ has_rdoc: true
69
+ homepage: http://www.opensourcery.co.za/smsinabox
70
+ post_install_message: |
71
+
72
+ For more information on smsinabox, see http://www.opensourcery.co.za/smsinabox
73
+
74
+ Setup your account by running sms-setup now. You can then use the following
75
+ commands to interact with SMS in a Box:
76
+
77
+ sms-send: Send SMS messages
78
+ sms-credit: Quick overview of the credit available
79
+ sms-replies: Quick access to your replies
80
+ sms-setup: To change the account details
81
+
82
+ rdoc_options:
83
+ - --main
84
+ - README.txt
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: "0"
92
+ version:
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
98
+ version:
99
+ requirements: []
100
+
101
+ rubyforge_project: smsinabox
102
+ rubygems_version: 1.2.0
103
+ signing_key:
104
+ specification_version: 2
105
+ summary: Ruby API for the SMS in a Box service, as well as command line utilities for interacting with SMS in a Box
106
+ test_files: []
107
+