data247 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/data247.rb +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/data247.rb
CHANGED
@@ -57,10 +57,10 @@ class Data247
|
|
57
57
|
def setup_fakeweb_response(options={})
|
58
58
|
raise "FakeWeb is not defined. Please require 'fakeweb' and make sure the fakeweb rubygem is installed." unless defined?(FakeWeb)
|
59
59
|
raise ArgumentError.new("Option missing: :msisdn") unless options[:msisdn]
|
60
|
-
|
60
|
+
options[:status] ||= "OK"
|
61
61
|
options[:username]||= self.username
|
62
62
|
options[:password]||= self.password
|
63
|
-
FakeWeb.register_uri :get, "
|
63
|
+
FakeWeb.register_uri :get, "http://api.data24-7.com/carrier.php?username=#{options[:username]}&password=#{options[:password]}&p1=#{options[:msisdn]}", :body=> <<-MSG
|
64
64
|
<?xml version="1.0"?><response><results><result item="1"><status>#{options[:status]}</status><number>#{options[:msisdn]}</number><wless>y</wless><carrier_name>T-Mobile</carrier_name><carrier_id>#{options[:result]}</carrier_id><sms_address>#{options[:msisdn]}@tmomail.net</sms_address><mms_address>#{options[:msisdn]}@tmomail.net</mms_address></result></results><balance>21.5000</balance></response>
|
65
65
|
MSG
|
66
66
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data247
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gerard de Brieder
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-13 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|