moonshado-sms 0.4.1 → 0.5.0
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/.gitignore +1 -3
- data/VERSION.yml +2 -2
- data/lib/moonshado/configuration.rb +3 -1
- data/lib/moonshado/sms.rb +5 -1
- data/moonshado-sms.gemspec +6 -3
- data/test/configuration_test.rb +2 -2
- metadata +6 -6
data/.gitignore
CHANGED
data/VERSION.yml
CHANGED
@@ -16,6 +16,7 @@ module Moonshado
|
|
16
16
|
attr_accessor :host
|
17
17
|
attr_accessor :auto_register_keywords
|
18
18
|
attr_accessor :production_environment
|
19
|
+
attr_accessor :port
|
19
20
|
|
20
21
|
alias_method :secure?, :secure
|
21
22
|
|
@@ -27,7 +28,8 @@ module Moonshado
|
|
27
28
|
@production_environment = true
|
28
29
|
@sms_uri = '/sms'
|
29
30
|
@keywords_uri = '/keywords'
|
30
|
-
@auto_register_keywords
|
31
|
+
@auto_register_keywords = false
|
32
|
+
@port = default_port
|
31
33
|
end
|
32
34
|
|
33
35
|
def api_key
|
data/lib/moonshado/sms.rb
CHANGED
@@ -11,7 +11,11 @@ module Moonshado
|
|
11
11
|
yield(configuration)
|
12
12
|
self.sender = Sender.new(configuration)
|
13
13
|
if configuration.auto_register_keywords
|
14
|
-
|
14
|
+
begin
|
15
|
+
Moonshado::Sms::Keywords.register_keywords
|
16
|
+
rescue Exception => e
|
17
|
+
puts "Failed to auto register keywords: #{e.message}"
|
18
|
+
end
|
15
19
|
end
|
16
20
|
end
|
17
21
|
|
data/moonshado-sms.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{moonshado-sms}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kevin Patel"]
|
12
|
-
s.date = %q{2010-06
|
12
|
+
s.date = %q{2010-08-06}
|
13
13
|
s.email = %q{tech@moonshado.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -29,7 +29,10 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/moonshado/sender.rb",
|
30
30
|
"lib/moonshado/sms.rb",
|
31
31
|
"moonshado-sms.gemspec",
|
32
|
-
"test/
|
32
|
+
"test/configuration_test.rb",
|
33
|
+
"test/helper.rb",
|
34
|
+
"test/keywords_test.rb",
|
35
|
+
"test/sms_test.rb"
|
33
36
|
]
|
34
37
|
s.homepage = %q{http://github.com/moonshado/moonshado-sms}
|
35
38
|
s.rdoc_options = ["--charset=UTF-8"]
|
data/test/configuration_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
|
-
class
|
4
|
-
context Moonshado do
|
3
|
+
class Moonshado::SmsTest < Test::Unit::TestCase
|
4
|
+
context Moonshado::Configuration do
|
5
5
|
setup do
|
6
6
|
Moonshado::Sms.configure do |config|
|
7
7
|
config.api_key = 'http://20lsdjf2@localhost:3000/sms'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moonshado-sms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin Patel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06
|
18
|
+
date: 2010-08-06 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -101,8 +101,8 @@ files:
|
|
101
101
|
- lib/moonshado/sender.rb
|
102
102
|
- lib/moonshado/sms.rb
|
103
103
|
- moonshado-sms.gemspec
|
104
|
-
- test/helper.rb
|
105
104
|
- test/configuration_test.rb
|
105
|
+
- test/helper.rb
|
106
106
|
- test/keywords_test.rb
|
107
107
|
- test/sms_test.rb
|
108
108
|
has_rdoc: true
|