voipfone_client 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/voipfone_client/session.rb +1 -1
- data/lib/voipfone_client/version.rb +1 -1
- data/lib/voipfone_client.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee54fd477c4e06f5f4e87ec4a2a6a12a8adc431d
|
4
|
+
data.tar.gz: 91f85001e66204b87d4c019234d33ad8db9895e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a4b11969d27743d76230926feb588e3efce532d3f88b1f5dce04053fb151dad73254ba947d48bde98285fc2b120d9fd3392d8f11db4038706b2cb8e499722c3
|
7
|
+
data.tar.gz: ea825c060db7eaa1796e1b423c24382e2975660f4f686f0bd486af6518d74bf525a0425cf6e0e120ce395f623685d3afa4225bb6e26c0112738a9f5e45a325e1
|
data/README.md
CHANGED
@@ -74,6 +74,8 @@ s.from = "[sender number]" # a number which is in the list of registered mobiles
|
|
74
74
|
s.to = "[recipient number]" #your recipient number
|
75
75
|
s.message = "your message" #message is truncated at 160 chars; UTF-8 not supported.
|
76
76
|
|
77
|
+
```
|
78
|
+
|
77
79
|
Spaces are stripped from phone numbers (which need to be supplied as a string); international format with a + symbol is OK.
|
78
80
|
|
79
81
|
### Voipfone::GlobalDivert
|
@@ -34,7 +34,7 @@ module VoipfoneClient
|
|
34
34
|
def login
|
35
35
|
username = VoipfoneClient.configuration.username
|
36
36
|
password = VoipfoneClient.configuration.password
|
37
|
-
cookie_file = File.join(VoipfoneClient::TMP_FOLDER,"
|
37
|
+
cookie_file = File.join(VoipfoneClient::TMP_FOLDER,"voipfone_client_cookies.yaml")
|
38
38
|
|
39
39
|
# load existing cookies from the file on disk
|
40
40
|
if File.exists?(cookie_file)
|
data/lib/voipfone_client.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'mechanize'
|
3
3
|
require 'require_all'
|
4
|
+
require 'tmpdir'
|
4
5
|
require_rel 'voipfone_client'
|
5
6
|
|
6
7
|
module VoipfoneClient
|
7
8
|
BASE_URL = "https://www.voipfone.co.uk"
|
8
9
|
API_GET_URL = "#{BASE_URL}/api/srv"
|
9
10
|
API_POST_URL = "#{BASE_URL}/api/upd"
|
10
|
-
TMP_FOLDER =
|
11
|
+
TMP_FOLDER = Dir.tmpdir
|
11
12
|
|
12
13
|
class << self
|
13
14
|
attr_accessor :configuration
|