skuby 0.0.4 → 0.0.5

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: 2c52c77e15060b1bcbb12ad652bc2fe79b84916f
4
- data.tar.gz: d6b1f9f1981d5be50d6aee7e414730c71a15cc6c
3
+ metadata.gz: 92ed33aacf3e5fdf228e59a8bee284ce9096b6d6
4
+ data.tar.gz: f6af9ebd6a35bfeffab968f3bde5848aea669515
5
5
  SHA512:
6
- metadata.gz: 8d1e5e6eed175232fa35ec731769f7ab9b509c46365374fbe3efe64354ee42e5d5a89d09623892f83579fab605acceaf6e73868f9a616fa133836d513c1ea55f
7
- data.tar.gz: 6d2d8ea12d1254568ed0a7c0f9404327d2387eb55aa7fea154ff92aa45142c4a108bf47dd08a68262c6f5a560f47c0e2006c6f511da3872812315ebf20c41454
6
+ metadata.gz: 0c52fdeeed1a5049b965444b42ed4118b4b41c723d8f2f6f5bab2a85ae202df31c9e788e274a2e8651ffec4a0f3a8d65310b9c63ac219ceb6e70681b9adf92ea
7
+ data.tar.gz: 355d0d3472f9bd6d2d4854fe07047eafa60502119e1e93e72f464a9045b517f01039b142fbf4e9a2dd93a582fb41b882ec81716c2c6a2d2762a4d072e258d4c3
@@ -56,10 +56,14 @@ module Skuby
56
56
  "#{STATUS_MAPPING[status]} - #{ERROR_CODES[error_code]}"
57
57
  end
58
58
 
59
- def sms_id
59
+ def message_id
60
60
  @raw["skebby_message_id"]
61
61
  end
62
62
 
63
+ def dispatch_id
64
+ @raw["skebby_dispatch_id"]
65
+ end
66
+
63
67
  def delivered_at
64
68
  Time.parse(@raw["operator_date_time"])
65
69
  end
@@ -1,3 +1,3 @@
1
1
  module Skuby
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -11,7 +11,8 @@ describe Skuby::Report do
11
11
  expect(report.success?).to be_false
12
12
  expect(report.error_code).to eq(502)
13
13
  expect(report.error_message).to be_present
14
- expect(report.sms_id).to eq('333')
14
+ expect(report.message_id).to eq('333')
15
+ expect(report.dispatch_id).to eq('444')
15
16
  expect(report.delivered_at).to eq(Time.new(2005,8,15,15,51,1,"+00:00"))
16
17
  end
17
18
  end
@@ -21,13 +22,14 @@ describe Skuby::Report do
21
22
 
22
23
  it "parses skebby response" do
23
24
  expect(report.success?).to be_true
24
- expect(report.sms_id).to eq('777')
25
+ expect(report.message_id).to eq('777')
26
+ expect(report.dispatch_id).to eq('666')
25
27
  expect(report.delivered_at).to eq(Time.new(2012,2,19,17,51,1,"+00:00"))
26
28
  end
27
29
  end
28
30
 
29
31
  def fixture_for_skebby_report(name)
30
- File.join(File.dirname(__FILE__), '..', 'fixtures', 'skebby_report', name)
32
+ File.join(File.dirname(__FILE__), 'fixtures', 'skebby_report', name)
31
33
  end
32
34
 
33
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skuby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabrizio Monti
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-11 00:00:00.000000000 Z
12
+ date: 2013-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -166,8 +166,6 @@ files:
166
166
  - LICENSE.txt
167
167
  - README.md
168
168
  - Rakefile
169
- - fixtures/skebby_report/delivered.yaml
170
- - fixtures/skebby_report/error.yaml
171
169
  - lib/skuby.rb
172
170
  - lib/skuby/configuration.rb
173
171
  - lib/skuby/credit.rb
@@ -177,6 +175,8 @@ files:
177
175
  - lib/skuby/version.rb
178
176
  - skuby.gemspec
179
177
  - spec/credit_spec.rb
178
+ - spec/fixtures/skebby_report/delivered.yaml
179
+ - spec/fixtures/skebby_report/error.yaml
180
180
  - spec/fixtures/vcr_cassettes/get_credit.yml
181
181
  - spec/fixtures/vcr_cassettes/get_credit_wrong_credentials.yml
182
182
  - spec/fixtures/vcr_cassettes/send_sms_basic.yml
@@ -213,6 +213,8 @@ specification_version: 4
213
213
  summary: Allows you to send SMS through Skebby SMS Gateway
214
214
  test_files:
215
215
  - spec/credit_spec.rb
216
+ - spec/fixtures/skebby_report/delivered.yaml
217
+ - spec/fixtures/skebby_report/error.yaml
216
218
  - spec/fixtures/vcr_cassettes/get_credit.yml
217
219
  - spec/fixtures/vcr_cassettes/get_credit_wrong_credentials.yml
218
220
  - spec/fixtures/vcr_cassettes/send_sms_basic.yml