short_message 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 645a87fabfb9ba3d3b0c512924b93ee17f97e7e7
4
- data.tar.gz: 5059c8c723070d9a2489cf3215f4cdac5fb56ca6
3
+ metadata.gz: 424aa45ae67916e20fa8caea3f7354252ab90faf
4
+ data.tar.gz: a6d251aa7c2989003ce7b985018e2de172a86a6f
5
5
  SHA512:
6
- metadata.gz: 00d9428ce0a4db4637c240c9ba10920982c755c2f360e1841eff261c248a0ff474016803cd59b5f49870dddd397787e41a6cf8315776b247c25cb37cdf8afd9f
7
- data.tar.gz: 62f75e96adf922cc70fddfb2b63d86cec1e3d610141ed4c288e66a09fc222faf99f8b701e9e407aec379eb874c703d65bd9889c58cdc38e5e446bf126b010d05
6
+ metadata.gz: 4959df7c5ddda6cd757112db8eb13a2457fc81937bb46ac66f8744245812f3c8315bf5e7385aa3d7ec6dab18ed14b9391b64655abe54ba16a94126f606f60686
7
+ data.tar.gz: f4cbc211da54a80a105220a1d8590850ff3a4988ad41892b0057fc0ab00e28ad8e409cdf39391b5c40823bc6f31cdbcabc8b53d7e868137b90b65bd6f5ad0d28
@@ -11,15 +11,15 @@ module ShortMessage
11
11
  end
12
12
 
13
13
  response, data = http.post(ShortMessage.config.send_file_path, build_deliver_params_string)
14
+ result_set = response.body.gsub("(","").gsub(")","").split(" ")
15
+ response_code = result_set[0].to_i
14
16
 
15
- if response.code == "200" or response.code == "402"
16
- if response.code == "402" and not ShortMessage.config.reload_notification_email.blank?
17
+ if response_code == 200 or response_code == 402
18
+ if response_code == 402 and not ShortMessage.config.reload_notification_email.blank?
17
19
  ShortMessage::Mailer.payment_required_notification(self, response).deliver_now
18
20
  end
19
21
 
20
- result_set = response.body.gsub("(","").gsub(")","").split(" ")
21
22
  self.message_key = result_set[2] unless result_set[2].blank?
22
-
23
23
  return self.save
24
24
  else
25
25
  ShortMessage::Mailer.error_notification(self, response).deliver_now unless ShortMessage.config.admin_notification_email.blank?
@@ -1,3 +1,3 @@
1
1
  module ShortMessage
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: short_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andi Saurer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-25 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails