data247 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/data247.rb +2 -2
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -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
- raise ArgumentError.new("Option missing: :status") unless options[:status]
60
+ options[:status] ||= "OK"
61
61
  options[:username]||= self.username
62
62
  options[:password]||= self.password
63
- FakeWeb.register_uri :get, "https://api.data24-7.com/carrier.php?username=#{options[:username]}&password=#{options[:password]}&p1=#{options[:msisdn]}", :body=> <<-MSG
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: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.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-05 00:00:00 +02:00
18
+ date: 2011-04-13 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency