srfax 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 923cf0d5cd313366bbbafaa0aabcc7efd4106b27
4
- data.tar.gz: d3b8c94e74e0428b8eeef199c3befe2a310bee2e
3
+ metadata.gz: 519cae942398f436ad1d601bbfe3822e7a9c7da2
4
+ data.tar.gz: 7183876eafd95a9a0ce73666f4a3079862b59ec3
5
5
  SHA512:
6
- metadata.gz: e9c12fb72f4f99b467915269bdfbc59880c391d8a86a2f564e2cff5d79082b691277aaf0f02708d700ae5c37fff12b92b840ce8765ad2760953318b4d9a1473d
7
- data.tar.gz: bdb9233921b832aa404d878232a882a25c062e27ab109fd24f1e44bdde624c03fcc4e29ff905a2a7a0be5edac1f2ae09a72aaee14b3c0cc962227d2fc52a0b8c
6
+ metadata.gz: a81ce3671da581a5316da5dc11eef082f4e5523402f9cae8f73fc3cd01b2ccd06f5b4f4a6d75d66ea79c68e0c91f3205915fa8ff6bedda93973f2bbe649cf09f
7
+ data.tar.gz: 11989c4fc28a8dadafe7d0eac38f8dbac0b92e8c39e6b381599b9c53d3beb5a008dfa636a7437006867e856ebd8e9e6042b8c0b6069ed0c272b406edf2c75399
data/.gitignore CHANGED
@@ -9,3 +9,4 @@ gemfiles/*.lock
9
9
  /spec/reports/
10
10
  /tmp/
11
11
  *.gem
12
+ .DS_Store
data/README.md CHANGED
@@ -7,7 +7,7 @@ This is the 'unofficial' SRFax (http://www.srfax.com) API wrapper for ruby. The
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'sr_fax'
10
+ gem 'srfax'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -16,7 +16,7 @@ And then execute:
16
16
 
17
17
  Or install it yourself using:
18
18
 
19
- $ gem install sr_fax
19
+ $ gem install srfax
20
20
 
21
21
  ## Usage
22
22
 
@@ -29,7 +29,7 @@ require 'srfax'
29
29
  SrFax.setup do |config|
30
30
  config.defaults[:access_id] = '1234'
31
31
  config.defaults[:access_pwd] = 'password'
32
- config.connection_defaults[:timeout] = 180
32
+ config.logger = Rails.logger
33
33
  end
34
34
 
35
35
  SrFax.view_inbox
@@ -35,14 +35,8 @@ module SrFax
35
35
  sResponseFormat: 'JSON' # XML or JSON
36
36
  }
37
37
 
38
- mattr_accessor :connection_defaults
39
- # Default values to use with the RestClient connection
40
- @@connection_defaults = {
41
- timeout: 180
42
- }
43
-
44
38
  mattr_accessor :logger
45
- # Logger object for use in standalone mode or with Rails
39
+ # Logger object for use in standalone mode or with Rails.
46
40
  if defined?(Rails)
47
41
  @@logger = Rails.logger
48
42
  else
@@ -90,7 +84,7 @@ module SrFax
90
84
  res = execute(postVariables)
91
85
 
92
86
  if res[:Status] != 'Failure'
93
- faxcount = res['Result'].count
87
+ faxcount = res['Result'].length
94
88
  faxcount > 0 ? logger.debug("Found #{faxcount} new fax(es)") : logger.debug('No faxes found matching that criteria')
95
89
  end
96
90
 
@@ -109,7 +103,7 @@ module SrFax
109
103
  # Example Payload for Return:
110
104
  # {"Status"=>"Success", "Result"=>[{"UserID"=>1234, "Period"=>"ALL",
111
105
  # "ClientName"=>nil, "SubUserID"=>0, "BillingNumber"=>"8888888888", "NumberOfFaxes"=>5, "NumberOfPages"=>8}]}
112
- def view_usage(_options = {})
106
+ def view_usage(options = {})
113
107
  logger.debug 'Viewing fax usage from cloud service'
114
108
  postVariables = { action: 'Get_Fax_Usage' }
115
109
  res = execute(postVariables)
@@ -124,13 +118,13 @@ module SrFax
124
118
  # @option options [String] :sEndDate Used with :sPeriod and denotes the period to endd at. Format is 'YYYYMMDD'
125
119
  # @option options [String] :sIncludeSubUsers Include subuser accounts ('Y' or 'N')
126
120
  # @return [Hash] A hash containing the return value (Success/Failure) and the payload where applicable
127
- def view_outbox(_options = {})
121
+ def view_outbox(options = {})
128
122
  logger.debug 'Viewing fax outbox from cloud service'
129
123
  postVariables = { action: 'Get_Fax_Outbox' }
130
124
  res = execute(postVariables)
131
125
 
132
126
  if res[:Status] != 'Failure'
133
- faxcount = res['Result'].count
127
+ faxcount = res['Result'].length
134
128
  faxcount > 0 ? logger.debug("Found #{faxcount} new fax(es)") : logger.debug('No faxes found matching that criteria')
135
129
  end
136
130
 
@@ -1,3 +1,3 @@
1
1
  module SrFax
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.5.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srfax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Klink
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-07-11 00:00:00.000000000 Z
13
+ date: 2016-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest