sms_gateway 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/sms_gateway/adapters/sms_global.rb +1 -1
- data/lib/sms_gateway/adapters/sms_trade.rb +1 -1
- data/lib/sms_gateway/version.rb +1 -1
- data/sms_gateway.gemspec +0 -1
- data/test/sms_gateway_test.rb +9 -6
- metadata +15 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ee8ba39fd167bf8e8b93e8216af71e81b1ed3746
|
4
|
+
data.tar.gz: 8e0aac794101802e67ef1bacc23604dc7a140277
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b69c19605382533e5be82a70e529e3de488f7c35ffd37f6ff67dbec8a21e5369db0e5da901503a297f0f4381ceca6880d51e03d2615a91cf32ff1923c5ddc195
|
7
|
+
data.tar.gz: 285f6913428fedf61c68435d4136b0c2e306d502b44739cc4750a1ffb32fc561847398d68070b8a8c7cc5c245fee5a217ba015b0f905043b0ed83c954dffb820
|
@@ -14,7 +14,7 @@ module SmsGateway
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def send_sms(sms)
|
17
|
-
options = @config.merge({:action => "sendsms", :to => sms.to, :text => sms.text})
|
17
|
+
options = @config.merge({:action => "sendsms", :from => sms.from, :to => sms.to, :text => sms.text})
|
18
18
|
self.class.post('/http-api.php', :query => options)
|
19
19
|
end
|
20
20
|
|
@@ -13,7 +13,7 @@ module SmsGateway
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def send_sms(sms)
|
16
|
-
options = @config.merge({:to => sms.to, :message => sms.text, :charset => "UTF-8"})
|
16
|
+
options = @config.merge({:from => sms.from, :to => sms.to, :message => sms.text, :charset => "UTF-8"})
|
17
17
|
self.class.get('/', :query => options)
|
18
18
|
end
|
19
19
|
|
data/lib/sms_gateway/version.rb
CHANGED
data/sms_gateway.gemspec
CHANGED
data/test/sms_gateway_test.rb
CHANGED
@@ -17,15 +17,18 @@ class SmsGateway::Adapters::SmsGatewayTest < Test::Unit::TestCase
|
|
17
17
|
:adapter => 'sms_global'
|
18
18
|
}
|
19
19
|
|
20
|
-
stub_request(:post, "http://www.smsglobal.com/http-api.php?action=sendsms&from=
|
20
|
+
stub_request(:post, "http://www.smsglobal.com/http-api.php?action=sendsms&from=4930123456&password=secret&text=hello&to=493088888888&user=userid").
|
21
21
|
to_return(:status => 200, :body => "OK: 0;", :headers => {})
|
22
22
|
|
23
|
-
sms = Sms.new(:to => '493088888888',
|
23
|
+
sms = Sms.new(:from => '4930123456', :to => '493088888888',
|
24
24
|
:text => "hello")
|
25
25
|
|
26
26
|
sms.deliver
|
27
27
|
|
28
|
-
assert_requested(:post, "http://www.smsglobal.com/http-api.php?action=sendsms&from=
|
28
|
+
assert_requested(:post, "http://www.smsglobal.com/http-api.php?action=sendsms&from=4930123456&password=secret&text=hello&to=493088888888&user=userid")
|
29
|
+
|
30
|
+
|
31
|
+
|
29
32
|
end
|
30
33
|
|
31
34
|
|
@@ -38,14 +41,14 @@ class SmsGateway::Adapters::SmsGatewayTest < Test::Unit::TestCase
|
|
38
41
|
:from => 'SMSTRADE'
|
39
42
|
}
|
40
43
|
|
41
|
-
sms = Sms.new(:to => '491701234567', :text => "Hallö Ümläut.")
|
44
|
+
sms = Sms.new(:to => '491701234567', :text => "Hallö Ümläut.", :from => 'SENDER')
|
42
45
|
|
43
|
-
stub_request(:get, "http://gateway.smstrade.de/?charset=UTF-8&from=
|
46
|
+
stub_request(:get, "http://gateway.smstrade.de/?charset=UTF-8&from=SENDER&key=KEY&message=#{URI.encode(sms.text)}&route=direct&to=491701234567").
|
44
47
|
to_return(:status => 200, :body => "", :headers => {})
|
45
48
|
|
46
49
|
sms.deliver
|
47
50
|
|
48
|
-
assert_requested(:get, "http://gateway.smstrade.de/?key=KEY&to=491701234567&message=#{URI.encode(sms.text)}&route=direct&from=
|
51
|
+
assert_requested(:get, "http://gateway.smstrade.de/?key=KEY&to=491701234567&message=#{URI.encode(sms.text)}&route=direct&from=SENDER&charset=UTF-8")
|
49
52
|
end
|
50
53
|
|
51
54
|
|
metadata
CHANGED
@@ -1,94 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sms_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kai Rubarth
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: httparty
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: resque
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: webmock
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: debugger
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
66
|
+
- - '>='
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '0'
|
94
69
|
description: Provides an interface to SMS Gateways. So far it supports smsglobal.com
|
@@ -122,26 +97,25 @@ files:
|
|
122
97
|
- test/test_helper.rb
|
123
98
|
homepage: ''
|
124
99
|
licenses: []
|
100
|
+
metadata: {}
|
125
101
|
post_install_message:
|
126
102
|
rdoc_options: []
|
127
103
|
require_paths:
|
128
104
|
- lib
|
129
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
106
|
requirements:
|
132
|
-
- -
|
107
|
+
- - '>='
|
133
108
|
- !ruby/object:Gem::Version
|
134
109
|
version: '0'
|
135
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
111
|
requirements:
|
138
|
-
- -
|
112
|
+
- - '>='
|
139
113
|
- !ruby/object:Gem::Version
|
140
114
|
version: '0'
|
141
115
|
requirements: []
|
142
116
|
rubyforge_project: sms_gateway
|
143
|
-
rubygems_version:
|
117
|
+
rubygems_version: 2.0.0
|
144
118
|
signing_key:
|
145
|
-
specification_version:
|
119
|
+
specification_version: 4
|
146
120
|
summary: Simple and flexible interface to SMS Gateways
|
147
121
|
test_files: []
|