action_sms_gateways 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/action_sms_gateways.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{action_sms_gateways}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Wilkie"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-13}
|
13
13
|
s.email = %q{dwilkie@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.markdown"
|
@@ -46,8 +46,8 @@ module ActionSms
|
|
46
46
|
params["from"]
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
50
|
-
params
|
49
|
+
def authenticate(params)
|
50
|
+
params.delete("userfield") == @config[:authentication_key]
|
51
51
|
end
|
52
52
|
|
53
53
|
def deliver(sms)
|
@@ -60,9 +60,14 @@ module ActionSms
|
|
60
60
|
:to => sms.recipients,
|
61
61
|
:text => sms.body
|
62
62
|
}
|
63
|
+
if sms.respond_to?(:userfield)
|
64
|
+
userfield = sms.userfield
|
65
|
+
elsif @config[:authentication_key]
|
66
|
+
userfield = @config[:authentication_key]
|
67
|
+
end
|
63
68
|
params.merge!(
|
64
|
-
:userfield =>
|
65
|
-
) if
|
69
|
+
:userfield => userfield
|
70
|
+
) if userfield
|
66
71
|
send_http_request(@service_url.to_s, params)
|
67
72
|
end
|
68
73
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Wilkie
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-13 00:00:00 +07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|