kave_rest_api 0.2.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 328af30f5dc7c6d97c3370a768011af852696b37a2ab72b566bdbc5f584cce52
4
- data.tar.gz: '01285a67958ec47f017e095adcf1ebcff7a3e851adf686db8b3875e59f1d9f81'
3
+ metadata.gz: f2709fbc88e59d5f33249fc71bc208f4ec23efc30b17258663466fda3dceaf1f
4
+ data.tar.gz: c932eabe3654225e41459cbae6a55b823aa7ee7ebfe621d90216d1330c05e7b6
5
5
  SHA512:
6
- metadata.gz: 9e17dfa574191040cdfbdc7a79efc0bc0fa7f74fe829c7a119d28b180253fe7ec2d9ae31d5ccffc56e84404d6c5c0b86d4c064d892b169398c2c9eb7d2dda658
7
- data.tar.gz: eb99c086c424f258046212b5a51fe3c79107acfb2c770e13d024dc0bd12399cc42d45bc29ac76041ffe732ea000c72a26f080c6368dd69eacaff26c3534f7be2
6
+ metadata.gz: 69785cf408ddd22f83c3c412e6be50926de1ceeeafe3b81ae4c535d77f01dacf224e154ac2943046befd1d903b851a47e86ad6f8009694c8ffebe382e091b0e5
7
+ data.tar.gz: 1ac0278947643c1219539bb5f9a2fa230a66b04ca4d66dd87ce4879c4a9262e1926f999a4931a0d4489529e4ce5f52de57ee6e685156c4495524f4faccea537a
@@ -5,7 +5,7 @@ module KaveRestApi
5
5
  attr_accessor :messageid
6
6
  attr_reader :response
7
7
  validates_presence_of :messageid
8
- validates_format_of :messageid, :with => /^\d*$/, :if => Proc.new { !messageid.nil? }
8
+ validates_format_of :messageid, :with => /^\d+(,\d+)*$/, :if => Proc.new { !messageid.nil? }
9
9
 
10
10
  def initialize(args = {})
11
11
  @ACTION_NAME = [:status,@FORMAT].join('.').freeze
@@ -21,7 +21,7 @@ module KaveRestApi
21
21
  def call
22
22
  connection = Faraday.new(url: "#{@API_URL}/sms/") do |faraday|
23
23
  faraday.adapter Faraday.default_adapter
24
- faraday.response @FORMAT.to_sym
24
+ faraday.response :json
25
25
  end
26
26
  response = connection.get(@ACTION_NAME, messageid: @messageid)
27
27
  @response.validate(response.body)
@@ -5,7 +5,7 @@ module KaveRestApi
5
5
  attr_reader :response,:message_size,:config
6
6
  validates_presence_of :message
7
7
  validates_presence_of :receptor
8
- validates_length_of :message, :within => 1..140
8
+ validates_length_of :message, :within => 1..900
9
9
  validates_format_of :sender, :with => /^\d*$/, :if => Proc.new { !sender.nil? }
10
10
  validates_format_of :unixdate, :with => /^\d*$/, :if => Proc.new { !unixdate.nil? }
11
11
 
@@ -1,3 +1,3 @@
1
1
  module KaveRestApi
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kave_rest_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mohammad mahmoudi